internal/mcp: hide CancelledParams

Since cancellation is handled transparently, this type need not be
exported.

Change-Id: Id4e195b0c3bd49eca52587032a027ffa449eb9d1
Reviewed-on: https://go-review.googlesource.com/c/tools/+/672796
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
This commit is contained in:
Rob Findley 2025-05-14 17:58:58 +00:00 • committed by Robert Findley
commit 0b09f3ad5a

View file

@ -54,17 +54,6 @@ type CallToolResult struct {
IsError bool `json:"isError,omitempty"`
}
type CancelledParams struct {
// An optional string describing the reason for the cancellation. This MAY be
// logged or presented to the user.
Reason string `json:"reason,omitempty"`
// The ID of the request to cancel.
//
// This MUST correspond to the ID of a request previously issued in the same
// direction.
RequestID any `json:"requestId"`
}
// Capabilities a client may support. Known capabilities are defined here, in
// this schema, but this is not a closed set: any client can define its own,
// additional capabilities.
@ -315,6 +304,17 @@ type ToolAnnotations struct {
Title string `json:"title,omitempty"`
}
type cancelledParams struct {
// An optional string describing the reason for the cancellation. This MAY be
// logged or presented to the user.
Reason string `json:"reason,omitempty"`
// The ID of the request to cancel.
//
// This MUST correspond to the ID of a request previously issued in the same
// direction.
RequestID any `json:"requestId"`
}
// Describes the name and version of an MCP implementation.
type implementation struct {
Name string `json:"name"`