@@ -618,7 +618,7 @@ type Tool struct {
618618}
619619
620620// A ToolHandlerFor handles a call to tools/call with typed arguments and results.
621- type ToolHandlerFor[In, Out any] func (context.Context , *RequestFor[*ServerSession, *CallToolParamsFor[In]]) (*CallToolResultFor[Out], error )
621+ type ToolHandlerFor[In, Out any] func (context.Context , *ServerRequest[ *CallToolParamsFor[In]]) (*CallToolResultFor[Out], error )
622622
623623` ` `
624624
@@ -669,7 +669,7 @@ type AddParams struct {
669669 Y int ` json:"y"`
670670}
671671
672- func addHandler (ctx context.Context , req *mcp.RequestFor [*mcp. ServerSession , *mcp.CallToolParamsFor [AddParams]]) (*mcp.CallToolResultFor [int ], error ) {
672+ func addHandler (ctx context.Context , req *mcp.ServerRequest [ *mcp.CallToolParamsFor [AddParams]]) (*mcp.CallToolResultFor [int ], error ) {
673673 return &mcp.CallToolResultFor [int ]{StructuredContent: req.Params .Arguments .X + req.Params .Arguments .Y }, nil
674674}
675675` ` `
@@ -772,9 +772,9 @@ If a server author wants to support resource subscriptions, they must provide ha
772772type ServerOptions struct {
773773 ...
774774 // Function called when a client session subscribes to a resource.
775- SubscribeHandler func (context.Context , *RequestFor[*ServerSession, *SubscribeParams]) error
775+ SubscribeHandler func (context.Context , *ServerRequest[ *SubscribeParams]) error
776776 // Function called when a client session unsubscribes from a resource.
777- UnsubscribeHandler func (context.Context , *RequestFor[*ServerSession, *UnsubscribeParams]) error
777+ UnsubscribeHandler func (context.Context , *ServerRequest[ *UnsubscribeParams]) error
778778}
779779` ` `
780780
@@ -793,10 +793,10 @@ When a list of tools, prompts or resources changes as the result of an AddXXX or
793793` ` ` go
794794type ClientOptions struct {
795795 ...
796- ToolListChangedHandler func (context.Context , *RequestFor[*ClientSession, *ToolListChangedParams])
797- PromptListChangedHandler func (context.Context , *RequestFor[*ClientSession, *PromptListChangedParams])
796+ ToolListChangedHandler func (context.Context , *ClientRequest[ *ToolListChangedParams])
797+ PromptListChangedHandler func (context.Context , *ClientRequest[ *PromptListChangedParams])
798798 // For both resources and resource templates.
799- ResourceListChangedHandler func (context.Context , *RequestFor[*ClientSession, *ResourceListChangedParams])
799+ ResourceListChangedHandler func (context.Context , *ClientRequest[ *ResourceListChangedParams])
800800}
801801` ` `
802802
@@ -810,7 +810,7 @@ Clients call the spec method `Complete` to request completions. If a server inst
810810type ServerOptions struct {
811811 ...
812812 // If non-nil, called when a client sends a completion request.
813- CompletionHandler func (context.Context , *RequestFor[*ServerSession, *CompleteParams]) (*CompleteResult, error )
813+ CompletionHandler func (context.Context , *ServerRequest[ *CompleteParams]) (*CompleteResult, error )
814814}
815815` ` `
816816
0 commit comments