Fix specification of experimental capabilities#65
Fix specification of experimental capabilities#65Liam-DeVoe wants to merge 1 commit intomodelcontextprotocol:mainfrom Liam-DeVoe:experimental-typing
Conversation
|
Thanks for the suggestion! The schema is correct in this case—we want to require all capabilities to be objects, because this gives flexibility in declaring different degrees of conformance. For example, with one of the standardized capabilities right now: {
"resources": {}
}… means only "resources are supported, but no additional optional features on resources." OTOH this: {
"resources": {
"subscribe": true
}
}… means "resources are supported, and you can subscribe to changes on individual resources." We want to encourage the same structure inside of Hope this clarifies things! It sounds like there is an issue in the Python example that we should fix, but the spec seems correct here. 🙂 |
|
I see, thanks for the clarification! That comment in the source code was the only documentation I could find about experimental capabilities, so it wasn't clear to me whether this was a bug or a feature. |
adding async to aenter in AsyncClient
The example python library usage assumes
experimentalis eg{"experimental": {"key": True}}. Right now I believe the typescript spec and therefore the jsonschema spec forces an additional level of nesting{"experimental": {"key": {"why": True}}}:https://github.com/modelcontextprotocol/specification/blob/9d3c21d9a9384c080ae7de308a6f8116bbf2c801/schema/schema.ts#L188-L192
as
: objectimplies a key:value pair rather than the trueunknownvalue (which in python really isobject).