@@ -78,6 +78,8 @@ type CallToolResultFor[Out any] struct {
7878 IsError bool `json:"isError,omitempty"`
7979}
8080
81+ func (* CallToolResultFor [Out ]) mcpResult () {}
82+
8183// UnmarshalJSON handles the unmarshalling of content into the Content
8284// interface.
8385func (x * CallToolResultFor [Out ]) UnmarshalJSON (data []byte ) error {
@@ -97,6 +99,7 @@ func (x *CallToolResultFor[Out]) UnmarshalJSON(data []byte) error {
9799 return nil
98100}
99101
102+ func (x * CallToolParamsFor [Out ]) mcpParams () {}
100103func (x * CallToolParamsFor [Out ]) GetProgressToken () any { return getProgressToken (x ) }
101104func (x * CallToolParamsFor [Out ]) SetProgressToken (t any ) { setProgressToken (x , t ) }
102105
@@ -114,6 +117,7 @@ type CancelledParams struct {
114117 RequestID any `json:"requestId"`
115118}
116119
120+ func (x * CancelledParams ) mcpParams () {}
117121func (x * CancelledParams ) GetProgressToken () any { return getProgressToken (x ) }
118122func (x * CancelledParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
119123
@@ -207,6 +211,8 @@ type CompleteParams struct {
207211 Ref * CompleteReference `json:"ref"`
208212}
209213
214+ func (* CompleteParams ) mcpParams () {}
215+
210216type CompletionResultDetails struct {
211217 HasMore bool `json:"hasMore,omitempty"`
212218 Total int `json:"total,omitempty"`
@@ -221,6 +227,8 @@ type CompleteResult struct {
221227 Completion CompletionResultDetails `json:"completion"`
222228}
223229
230+ func (* CompleteResult ) mcpResult () {}
231+
224232type CreateMessageParams struct {
225233 // This property is reserved by the protocol to allow clients and servers to
226234 // attach additional metadata to their responses.
@@ -245,6 +253,7 @@ type CreateMessageParams struct {
245253 Temperature float64 `json:"temperature,omitempty"`
246254}
247255
256+ func (x * CreateMessageParams ) mcpParams () {}
248257func (x * CreateMessageParams ) GetProgressToken () any { return getProgressToken (x ) }
249258func (x * CreateMessageParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
250259
@@ -264,6 +273,7 @@ type CreateMessageResult struct {
264273 StopReason string `json:"stopReason,omitempty"`
265274}
266275
276+ func (* CreateMessageResult ) mcpResult () {}
267277func (r * CreateMessageResult ) UnmarshalJSON (data []byte ) error {
268278 type result CreateMessageResult // avoid recursion
269279 var wire struct {
@@ -291,6 +301,7 @@ type GetPromptParams struct {
291301 Name string `json:"name"`
292302}
293303
304+ func (x * GetPromptParams ) mcpParams () {}
294305func (x * GetPromptParams ) GetProgressToken () any { return getProgressToken (x ) }
295306func (x * GetPromptParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
296307
@@ -304,6 +315,8 @@ type GetPromptResult struct {
304315 Messages []* PromptMessage `json:"messages"`
305316}
306317
318+ func (* GetPromptResult ) mcpResult () {}
319+
307320type InitializeParams struct {
308321 // This property is reserved by the protocol to allow clients and servers to
309322 // attach additional metadata to their responses.
@@ -315,6 +328,7 @@ type InitializeParams struct {
315328 ProtocolVersion string `json:"protocolVersion"`
316329}
317330
331+ func (x * InitializeParams ) mcpParams () {}
318332func (x * InitializeParams ) GetProgressToken () any { return getProgressToken (x ) }
319333func (x * InitializeParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
320334
@@ -338,12 +352,15 @@ type InitializeResult struct {
338352 ServerInfo * Implementation `json:"serverInfo"`
339353}
340354
355+ func (* InitializeResult ) mcpResult () {}
356+
341357type InitializedParams struct {
342358 // This property is reserved by the protocol to allow clients and servers to
343359 // attach additional metadata to their responses.
344360 Meta `json:"_meta,omitempty"`
345361}
346362
363+ func (x * InitializedParams ) mcpParams () {}
347364func (x * InitializedParams ) GetProgressToken () any { return getProgressToken (x ) }
348365func (x * InitializedParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
349366
@@ -356,6 +373,7 @@ type ListPromptsParams struct {
356373 Cursor string `json:"cursor,omitempty"`
357374}
358375
376+ func (x * ListPromptsParams ) mcpParams () {}
359377func (x * ListPromptsParams ) GetProgressToken () any { return getProgressToken (x ) }
360378func (x * ListPromptsParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
361379func (x * ListPromptsParams ) cursorPtr () * string { return & x .Cursor }
@@ -371,6 +389,7 @@ type ListPromptsResult struct {
371389 Prompts []* Prompt `json:"prompts"`
372390}
373391
392+ func (x * ListPromptsResult ) mcpResult () {}
374393func (x * ListPromptsResult ) nextCursorPtr () * string { return & x .NextCursor }
375394
376395type ListResourceTemplatesParams struct {
@@ -382,6 +401,7 @@ type ListResourceTemplatesParams struct {
382401 Cursor string `json:"cursor,omitempty"`
383402}
384403
404+ func (x * ListResourceTemplatesParams ) mcpParams () {}
385405func (x * ListResourceTemplatesParams ) GetProgressToken () any { return getProgressToken (x ) }
386406func (x * ListResourceTemplatesParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
387407func (x * ListResourceTemplatesParams ) cursorPtr () * string { return & x .Cursor }
@@ -397,6 +417,7 @@ type ListResourceTemplatesResult struct {
397417 ResourceTemplates []* ResourceTemplate `json:"resourceTemplates"`
398418}
399419
420+ func (x * ListResourceTemplatesResult ) mcpResult () {}
400421func (x * ListResourceTemplatesResult ) nextCursorPtr () * string { return & x .NextCursor }
401422
402423type ListResourcesParams struct {
@@ -408,6 +429,7 @@ type ListResourcesParams struct {
408429 Cursor string `json:"cursor,omitempty"`
409430}
410431
432+ func (x * ListResourcesParams ) mcpParams () {}
411433func (x * ListResourcesParams ) GetProgressToken () any { return getProgressToken (x ) }
412434func (x * ListResourcesParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
413435func (x * ListResourcesParams ) cursorPtr () * string { return & x .Cursor }
@@ -423,6 +445,7 @@ type ListResourcesResult struct {
423445 Resources []* Resource `json:"resources"`
424446}
425447
448+ func (x * ListResourcesResult ) mcpResult () {}
426449func (x * ListResourcesResult ) nextCursorPtr () * string { return & x .NextCursor }
427450
428451type ListRootsParams struct {
@@ -431,6 +454,7 @@ type ListRootsParams struct {
431454 Meta `json:"_meta,omitempty"`
432455}
433456
457+ func (x * ListRootsParams ) mcpParams () {}
434458func (x * ListRootsParams ) GetProgressToken () any { return getProgressToken (x ) }
435459func (x * ListRootsParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
436460
@@ -444,6 +468,8 @@ type ListRootsResult struct {
444468 Roots []* Root `json:"roots"`
445469}
446470
471+ func (* ListRootsResult ) mcpResult () {}
472+
447473type ListToolsParams struct {
448474 // This property is reserved by the protocol to allow clients and servers to
449475 // attach additional metadata to their responses.
@@ -453,6 +479,7 @@ type ListToolsParams struct {
453479 Cursor string `json:"cursor,omitempty"`
454480}
455481
482+ func (x * ListToolsParams ) mcpParams () {}
456483func (x * ListToolsParams ) GetProgressToken () any { return getProgressToken (x ) }
457484func (x * ListToolsParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
458485func (x * ListToolsParams ) cursorPtr () * string { return & x .Cursor }
@@ -468,6 +495,7 @@ type ListToolsResult struct {
468495 Tools []* Tool `json:"tools"`
469496}
470497
498+ func (x * ListToolsResult ) mcpResult () {}
471499func (x * ListToolsResult ) nextCursorPtr () * string { return & x .NextCursor }
472500
473501// The severity of a log message.
@@ -489,6 +517,7 @@ type LoggingMessageParams struct {
489517 Logger string `json:"logger,omitempty"`
490518}
491519
520+ func (x * LoggingMessageParams ) mcpParams () {}
492521func (x * LoggingMessageParams ) GetProgressToken () any { return getProgressToken (x ) }
493522func (x * LoggingMessageParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
494523
@@ -550,6 +579,7 @@ type PingParams struct {
550579 Meta `json:"_meta,omitempty"`
551580}
552581
582+ func (x * PingParams ) mcpParams () {}
553583func (x * PingParams ) GetProgressToken () any { return getProgressToken (x ) }
554584func (x * PingParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
555585
@@ -569,6 +599,8 @@ type ProgressNotificationParams struct {
569599 Total float64 `json:"total,omitempty"`
570600}
571601
602+ func (* ProgressNotificationParams ) mcpParams () {}
603+
572604// A prompt or prompt template that the server offers.
573605type Prompt struct {
574606 // See [specification/2025-06-18/basic/index#general-fields] for notes on _meta
@@ -606,6 +638,7 @@ type PromptListChangedParams struct {
606638 Meta `json:"_meta,omitempty"`
607639}
608640
641+ func (x * PromptListChangedParams ) mcpParams () {}
609642func (x * PromptListChangedParams ) GetProgressToken () any { return getProgressToken (x ) }
610643func (x * PromptListChangedParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
611644
@@ -646,6 +679,7 @@ type ReadResourceParams struct {
646679 URI string `json:"uri"`
647680}
648681
682+ func (x * ReadResourceParams ) mcpParams () {}
649683func (x * ReadResourceParams ) GetProgressToken () any { return getProgressToken (x ) }
650684func (x * ReadResourceParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
651685
@@ -657,6 +691,8 @@ type ReadResourceResult struct {
657691 Contents []* ResourceContents `json:"contents"`
658692}
659693
694+ func (* ReadResourceResult ) mcpResult () {}
695+
660696// A known resource that the server is capable of reading.
661697type Resource struct {
662698 // See [specification/2025-06-18/basic/index#general-fields] for notes on _meta
@@ -697,6 +733,7 @@ type ResourceListChangedParams struct {
697733 Meta `json:"_meta,omitempty"`
698734}
699735
736+ func (x * ResourceListChangedParams ) mcpParams () {}
700737func (x * ResourceListChangedParams ) GetProgressToken () any { return getProgressToken (x ) }
701738func (x * ResourceListChangedParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
702739
@@ -754,6 +791,7 @@ type RootsListChangedParams struct {
754791 Meta `json:"_meta,omitempty"`
755792}
756793
794+ func (x * RootsListChangedParams ) mcpParams () {}
757795func (x * RootsListChangedParams ) GetProgressToken () any { return getProgressToken (x ) }
758796func (x * RootsListChangedParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
759797
@@ -798,6 +836,7 @@ type SetLevelParams struct {
798836 Level LoggingLevel `json:"level"`
799837}
800838
839+ func (x * SetLevelParams ) mcpParams () {}
801840func (x * SetLevelParams ) GetProgressToken () any { return getProgressToken (x ) }
802841func (x * SetLevelParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
803842
@@ -873,6 +912,7 @@ type ToolListChangedParams struct {
873912 Meta `json:"_meta,omitempty"`
874913}
875914
915+ func (x * ToolListChangedParams ) mcpParams () {}
876916func (x * ToolListChangedParams ) GetProgressToken () any { return getProgressToken (x ) }
877917func (x * ToolListChangedParams ) SetProgressToken (t any ) { setProgressToken (x , t ) }
878918
@@ -886,6 +926,8 @@ type SubscribeParams struct {
886926 URI string `json:"uri"`
887927}
888928
929+ func (* SubscribeParams ) mcpParams () {}
930+
889931// Sent from the client to request cancellation of resources/updated
890932// notifications from the server. This should follow a previous
891933// resources/subscribe request.
@@ -897,6 +939,8 @@ type UnsubscribeParams struct {
897939 URI string `json:"uri"`
898940}
899941
942+ func (* UnsubscribeParams ) mcpParams () {}
943+
900944// A notification from the server to the client, informing it that a resource
901945// has changed and may need to be read again. This should only be sent if the
902946// client previously sent a resources/subscribe request.
@@ -908,6 +952,8 @@ type ResourceUpdatedNotificationParams struct {
908952 URI string `json:"uri"`
909953}
910954
955+ func (* ResourceUpdatedNotificationParams ) mcpParams () {}
956+
911957// TODO(jba): add CompleteRequest and related types.
912958
913959// TODO(jba): add ElicitRequest and related types.
0 commit comments