Use anyOf for the mixed item type in link_work_items
What does this MR do and why?
The link_work_items tool's inputSchema declared work_items_ids.items with an array-form type, ["integer", "string"]. That is valid JSON Schema, but several MCP clients read type as a single string and either reject the tool or drop the constraint; MCP Inspector flags it.
This MR expresses the same constraint as anyOf: [{type: integer}, {type: string}], which every known client accepts. It sits inside items, so the root schema's additionalProperties handling (and the list_tools request spec that checks it) is unaffected.
I audited the other tools as the issue asked: no other hand-written tool under app/services/mcp/tools uses the array form, and Base::ApiTool#parse_type always produces a single type string for API-derived schemas.
References
- Resolves #628820 (closed)
Differences
Before: tools/list returns "items": {"type": ["integer", "string"]} for work_items_ids.
After: It returns "items": {"anyOf": [{"type": "integer"}, {"type": "string"}]}.
How to set up and validate locally
- Call
tools/liston the MCP endpoint and findlink_work_items. inputSchema.properties.work_items_ids.itemscarriesanyOf; loading the tool in MCP Inspector no longer warns.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.