mcp: Deprecate roots, sampling and logging (SEP-2577) (#1017)

Fixes #1013
This commit is contained in:
Guglielmo Colombo 2026-06-23 11:11:08 +02:00 • committed by GitHub
commit b6649db4f9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -189,6 +189,11 @@ func (c *EmbeddedResource) fromWire(wire *wireContent) {
// ToolUseContent represents a request from the assistant to invoke a tool.
// This content type is only valid in sampling messages.
//
// Deprecated: the sampling feature is deprecated as of protocol version
// 2026-07-28 (SEP-2577). It remains functional during the deprecation window
// (at least twelve months). See
// https://modelcontextprotocol.io/seps/2577-deprecate-roots-sampling-and-logging.
type ToolUseContent struct {
// ID is a unique identifier for this tool use, used to match with ToolResultContent.
ID string
@ -229,6 +234,11 @@ func (c *ToolUseContent) fromWire(wire *wireContent) {
// ToolResultContent represents the result of a tool invocation.
// This content type is only valid in sampling messages with role "user".
//
// Deprecated: the sampling feature is deprecated as of protocol version
// 2026-07-28 (SEP-2577). It remains functional during the deprecation window
// (at least twelve months). See
// https://modelcontextprotocol.io/seps/2577-deprecate-roots-sampling-and-logging.
type ToolResultContent struct {
// ToolUseID references the ID from the corresponding ToolUseContent.
ToolUseID string