internal/mcp: change CallTool signature
CallTool takes a tool name, arguments, and an options struct. Also, pass the params to ToolHandler. Update the design doc accordingly. Change-Id: I21b7995b607bea976ad708ebb6ac0716018f39cb Reviewed-on: https://go-review.googlesource.com/c/tools/+/672596 Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
4721f501df
commit
6394485a3d
1 changed files with 37 additions and 30 deletions
|
|
@ -204,7 +204,7 @@ func (s *Server) callTool(ctx context.Context, cc *ServerConnection, params *Cal
|
|||
if !ok {
|
||||
return nil, fmt.Errorf("%s: unknown tool %q", jsonrpc2.ErrInvalidParams, params.Name)
|
||||
}
|
||||
return tool.Handler(ctx, cc, params.Arguments)
|
||||
return tool.Handler(ctx, cc, params)
|
||||
}
|
||||
|
||||
func (s *Server) listResources(_ context.Context, _ *ServerConnection, params *ListResourcesParams) (*ListResourcesResult, error) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue