mcp: statically type the server-side tool params (#378)

Introduce CallToolParamsRaw on the server side, so that tool handlers
see in the type system that a tool's arguments are a json.RawMessage.

Fixes #377.
This commit is contained in:
Jonathan Amsterdam 2025-08-30 08:16:06 -04:00 • committed by GitHub
commit 7bfde44981
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,7 +7,7 @@
package mcp
type (
CallToolRequest = ServerRequest[*CallToolParams]
CallToolRequest = ServerRequest[*CallToolParamsRaw]
CompleteRequest = ServerRequest[*CompleteParams]
GetPromptRequest = ServerRequest[*GetPromptParams]
InitializedRequest = ServerRequest[*InitializedParams]