SEP-1456: add allowCustom option for enum fields to support custom values #1008
+166
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SEP description: modelcontextprotocol/modelcontextprotocol#1456
Motivation and Context
Existing implementations face two significant issues:
Guidance vs Flexibility – Developers want to provide commonly used options while still allowing custom entries that fall outside predefined values.
Inconsistent Workarounds – Current approaches, such as adding an “Other” option and triggering additional elicitation requests, lead to complex, fragmented user experiences. Refer: Elicitation with custom input [ SEP-1456 ] #932 (comment)
The lack of a declarative, schema-driven solution for this use case leads to repetitive development patterns and diverging UX across tools.
This proposal is based on real implementation challenges and has been validated through prototypes built in MCP Server workflows. It avoids speculative enhancements and follows MCP’s principles of simplicity, minimalism, and concrete problem-solving.
How Has This Been Tested?
Added tests for allowCustom enabled and without allowCustom to evaluate fallback flow.
Breaking Changes
Types of changes
Checklist
Additional context
Behavior
allowCustom
istrue
, users see predefined options but can also enter custom input.false
, users are limited to selecting fromenum
options.pattern
,maxLength
).UI Rendering expectation
allowCustom
is enabled.Why this approach?
Considered alternatives