mcp: fix ListChanged doc comments on server capabilities (#1219)

The doc comments on `ToolCapabilities.ListChanged` and
`ResourceCapabilities.ListChanged` say the flag reports whether **the
client** supports list-change notifications. Both types only ever appear
inside `ServerCapabilities`, though, and the spec defines the field the
other way around: whether **this server** supports notifications for
changes to the list. `PromptCapabilities` in the same file already words
it correctly.

The "client" wording looks like it was copied from `RootCapabilities`,
the one listChanged capability that genuinely belongs to the client.
Docs only, no behavior change.
This commit is contained in:
Qinghong Zhu 2026-09-01 16:09:19 +08:00 • committed by GitHub
commit ce3a92a0a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2246,7 +2246,7 @@ type PromptCapabilities struct {
// ResourceCapabilities describes the server's support for resources.
type ResourceCapabilities struct {
// ListChanged reports whether the client supports notifications for
// ListChanged reports whether this server supports notifications for
// changes to the resource list.
ListChanged bool `json:"listChanged,omitempty"`
// Subscribe reports whether this server supports subscribing to resource
@ -2256,7 +2256,7 @@ type ResourceCapabilities struct {
// ToolCapabilities describes the server's support for tools.
type ToolCapabilities struct {
// ListChanged reports whether the client supports notifications for
// ListChanged reports whether this server supports notifications for
// changes to the tool list.
ListChanged bool `json:"listChanged,omitempty"`
}