MCP tools/list flattens anyOf array-or-null filter schema to scalar string
Open 💬 2 comments Opened Apr 15, 2026 by alexfazio
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
Minimal repro
Tool: flywheel_list_nodes
Input used by affected clients:
owners: "me"
Expected canonical shape:
owners: ["me"]
Observed behavior:
- Client flattens array-or-null schema (
anyOf: [{"type":"array"}, {"type":"null"}]) into scalar-string guidance. - Server rejects scalar with list validation (
owners must be an array of strings).
Why this matters
This causes first-call tool failures and requires users/agents to manually discover array wrapping despite correct server schema.
Request
Please preserve array-or-null input schema shape in surfaced MCP tool manifests/instructions for list filters.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
A small regression test for this would be valuable because array/null/list-filter shapes are easy to flatten accidentally when generating human-facing tool instructions.
The contract I would test is:
anyOf: [{ type: array, items: { type: string } }, { type: null }]for a filter field;owners: ["me"], notowners: "me";oneOf/nullablevariants if those are normalized internally.In Project Telos MCP freshness checks, this is the kind of bug I would classify as tool-surface drift rather than server failure: the server contract is correct, but the host-visible action surface changed shape. A behavior probe with a fixture server that exposes array-or-null filters would make the failure reproducible without depending on the original
flywheel_list_nodesserver.