1 KiB
1 KiB
| @modelcontextprotocol/server | @modelcontextprotocol/client |
|---|---|
| patch | patch |
Non-SEP draft spec conformance fixes
McpServernow eagerly installs list/read/call handlers for every primitive capability (tools,resources,prompts) declared inServerOptions.capabilities. Per the draft spec, a server that declares a capability MUST respond to its list method (potentially with an empty result) instead of returning "Method not found". Previously, handlers were only installed lazily on first registration, so a server constructed with e.g.capabilities: { tools: {} }and zero registered tools answeredtools/listwith-32601. Low-levelServerusers remain responsible for registering handlers for declared capabilities (documented onServerOptions.capabilities).- Fixed pagination doc examples on
Client.listTools/listPrompts/listResourcesto loopwhile (cursor !== undefined)instead ofwhile (cursor)— per the draft spec, clients MUST NOT treat an empty-string cursor as the end of results.