go-sdk/internal
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Rob Findley 04ca8ac03b internal/mcp: generic handling of CallToolParams
Make Tool APIs future-proof by pushing generics into CallToolParams, and
using CallToolParams throughout. This has several advantages:

- We no longer need the awkward CallToolOptions type, which is almost
  but not quite like CallToolParams.
- NewTool no longer needs to define its own handler type: it accepts a
  ToolHandler[TArgs]. This also means its signature is future-proof.

Additionally, provide a `CallTool` helper (the analog of NewTool) to
serve as a more strongly typed variant of `ClientSession.CallTool`.

+ design, protocol generation

Change-Id: I80172a25bc50734dae84a541aa4776ed9161694e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/676495
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Auto-Submit: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-06-02 07:45:36 -07:00
..
jsonrpc2 internal/mcp: handle synthetic responses in conformance test 2025-05-30 08:16:23 -07:00
readme internal/mcp: generic handling of CallToolParams 2025-06-02 07:45:36 -07:00
util all: fix some function names and typos in comment 2025-05-23 10:44:52 -07:00
xcontext x/tools: modernize interface{} -> any 2025-02-19 15:14:27 -08:00