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:
Jonathan Amsterdam 2025-05-14 07:01:59 -04:00
commit 6394485a3d

View file

@ -40,7 +40,7 @@ func ExampleSSEHandler() {
}
defer client.Close()
res, err := client.CallTool(ctx, "add", map[string]any{"x": 1, "y": 2})
res, err := client.CallTool(ctx, "add", map[string]any{"x": 1, "y": 2}, nil)
if err != nil {
log.Fatal(err)
}