Replace all occurrences of ServerRequest[*CallToolParams] and other concrete instantiations with CallToolRequest and the like. Make the XXXRequest types aliases, to preserve the convenience of generics for the internal machinery (see shared.go, for example.) I will expand the aliases in a followup PR.
24 lines
1.1 KiB
Go
24 lines
1.1 KiB
Go
// Copyright 2025 The Go MCP SDK Authors. All rights reserved.
|
|
// Use of this source code is governed by an MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// This file holds the request types.
|
|
|
|
package mcp
|
|
|
|
// TODO: expand the aliases
|
|
type (
|
|
CallToolRequest = ServerRequest[*CallToolParams]
|
|
CompleteRequest = ServerRequest[*CompleteParams]
|
|
GetPromptRequest = ServerRequest[*GetPromptParams]
|
|
InitializedRequest = ServerRequest[*InitializedParams]
|
|
ListPromptsRequest = ServerRequest[*ListPromptsParams]
|
|
ListResourcesRequest = ServerRequest[*ListResourcesParams]
|
|
ListResourceTemplatesRequest = ServerRequest[*ListResourceTemplatesParams]
|
|
ListToolsRequest = ServerRequest[*ListToolsParams]
|
|
ProgressNotificationRequest = ServerRequest[*ProgressNotificationParams]
|
|
ReadResourceRequest = ServerRequest[*ReadResourceParams]
|
|
RootsListChangedRequest = ServerRequest[*RootsListChangedParams]
|
|
SubscribeRequest = ServerRequest[*SubscribeParams]
|
|
UnsubscribeRequest = ServerRequest[*UnsubscribeParams]
|
|
)
|