Skip to content

fix(mcp): emit single-type enums in settings tool schema - #232

Merged
thdxr merged 1 commit into
devfrom
fix/single-type-enums
Nov 11, 2026
Merged

thdxr merged 1 commit into
devfrom
fix/single-type-enums

Conversation

@thdxr

@thdxr thdxr commented Nov 11, 2026

Copy link
Copy Markdown
Member

the settings tool advertised idleMinutes as one enum mixing numbers and "never". some MCP clients/providers (Kimi CLI) reject mixed-type enums and fail the whole tool list.

now each setting's schema is emitted as single-typed enums (an anyOf of the integer enum [10, 30, 60] and the string enum ["never"]); runtime decoding is unchanged.

adds a test that every advertised input/output schema keeps each enum/const to one JSON type.

Fixes #231

Thanks to @adusingi for the diagnosis and suggested schema shape in #231.

@thdxr
thdxr merged commit 3fa9866 into dev Nov 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

settings tool: mixed-type enum for idleMinutes breaks Kimi CLI

1 participant