mcp: advertise a capability if and only if added (#93)

If tools are added to a Server when Run is called, it will send
toolCapabilities to the client. Otherwise it won't. Ditto for prompts
and resources.

For #56.
This commit is contained in:
Jonathan Amsterdam 2025-07-10 15:52:11 -04:00 • committed by GitHub
commit b4febf129b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -159,8 +159,6 @@ func TestStreamableServerTransport(t *testing.T) {
Capabilities: &serverCapabilities{
Completions: &completionCapabilities{},
Logging: &loggingCapabilities{},
Prompts: &promptCapabilities{ListChanged: true},
Resources: &resourceCapabilities{ListChanged: true},
Tools: &toolCapabilities{ListChanged: true},
},
ProtocolVersion: latestProtocolVersion,