-
Notifications
You must be signed in to change notification settings - Fork 274
Description
We decided early on to use XXXParams on the client and server, because the enclosing request is just the method name + the params, and asking client users to provide the method name "foo" and then call Foo seemed cruelly redundant. And we naturally did the same on the server, so server handlers like a ToolHandler take CallToolParams.
But what we missed is that our server infrastructure might want to add request-scoped information besides the params. Auth information is one example (#237). We could also expose all the HTTP headers.
So while the client methods should continue to accept XXXParams, we should add the corresponding XXXRequest types that can include more, and have server handlers take XXXRequests. An XXXRequest struct will include the method name (just to match the spec) and the params, but may include more.