-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add enum support #196
base: main
Are you sure you want to change the base?
Add enum support #196
Conversation
This adds support for [enum](https://json-schema.org/understanding-json-schema/reference/enum) on `string` property.
Can you point out where do you see this in the specification. |
I linked https://json-schema.org/understanding-json-schema/reference/enum in the description, this is what you were looking for right? |
I understand that the JSON schema supports enums, and I use it in OpenAPI. However, my question was about this specification. While the idea of using enums is great, I believe it should be an official part of the specification to ensure compatibility across different clients and servers. If a client is strict about adhering to the specification, it could reject any request/response from a server that doesn’t conform as malformed or invalid. I don’t intend to push back, but I think this is something worth discussing in the GitHub discussion to get community input. From there, we (the community) can consider implementing it experimentally in both client and server capabilities. |
Oh I see. The current specification is indeed vague about it (the TS version simply rely on I'll start a discussion in https://github.com/modelcontextprotocol/specification |
For the record: modelcontextprotocol/specification#210 |
Just for info, when a client wants to get the data for that field, it emit a completion request for tools and resources. So your goal is doable if your server return the correct enum. One thing that bother me is that it keep emitting it while you are typing. |
Motivation and Context
This adds support for enum on
string
property.How Has This Been Tested?
Breaking Changes
None
Types of changes
Checklist
Additional context