You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MCP tools with $defs/$ref in inputSchema fail — parameters can't be constructed
Describe the bug
MCP tool calls fail with Input validation error: 'X' is a required property when the MCP server's tool inputSchema uses $defs + $ref to define parameter types. The $ref references are never resolved, so the client cannot construct or validate the required parameters.
Tools that don't use $ref (e.g., simple tools with no required params) work fine on the same MCP connection.
Affected version
0.0.423
Root cause analysis
The PagerDuty MCP server (https://mcp.pagerduty.com/mcp) returns tool schemas like this (abbreviated):
The agent attempts to call list_schedules or list_oncalls
Every call fails with: MCP server 'pagerduty': Input validation error: 'query_model' is a required property
What works vs. what doesn't
Tool
Has $ref?
Result
get_user_data
No (no params)
✅ Works
get_incident
No (incident_id is a plain string)
✅ Works
list_schedules
Yes (query_model: $ref ScheduleQuery)
❌ Fails
list_oncalls
Yes (query_model: $ref OncallQuery)
❌ Fails
list_incidents
Yes (query_model: $ref IncidentQuery)
❌ Fails
Expected behavior
The MCP client should resolve $ref references within inputSchema (at minimum local $defs references) before presenting tool parameters to the model, so it can construct valid inputs.
Additional context
The PagerDuty server's schemas are valid JSON Schema and work correctly when called via curl
This likely affects any MCP server that uses $defs/$ref in inputSchema (a common pattern in Python MCP servers using Pydantic models)
MCP tools with
$defs/$refin inputSchema fail — parameters can't be constructedDescribe the bug
MCP tool calls fail with
Input validation error: 'X' is a required propertywhen the MCP server's toolinputSchemauses$defs+$refto define parameter types. The$refreferences are never resolved, so the client cannot construct or validate the required parameters.Tools that don't use
$ref(e.g., simple tools with no required params) work fine on the same MCP connection.Affected version
0.0.423
Root cause analysis
The PagerDuty MCP server (
https://mcp.pagerduty.com/mcp) returns tool schemas like this (abbreviated):{ "name": "list_schedules", "inputSchema": { "$defs": { "ScheduleQuery": { "properties": { "query": { "type": "string", "default": null }, "team_ids": { "type": "array", "default": null }, "limit": { "type": "integer", "default": 20 } }, "type": "object" } }, "properties": { "query_model": { "$ref": "#/$defs/ScheduleQuery" } }, "required": ["query_model"], "type": "object" } }This is valid JSON Schema. The
$defsblock is present in the same schema object and$refpoints to it. However, the Copilot CLI MCP client:"query_model": {"$ref": "#/$defs/ScheduleQuery"}— the reference is never inlinedquery_modelquery_modelis required but the model can't construct itSteps to reproduce
{ "pagerduty": { "url": "https://mcp.pagerduty.com/mcp", "type": "http", "headers": { "Authorization": "Token token=${PAGERDUTY_API_TOKEN}" } } }copilotlist_schedulesorlist_oncallsMCP server 'pagerduty': Input validation error: 'query_model' is a required propertyWhat works vs. what doesn't
$ref?get_user_dataget_incidentincident_idis a plain string)list_schedulesquery_model: $ref ScheduleQuery)list_oncallsquery_model: $ref OncallQuery)list_incidentsquery_model: $ref IncidentQuery)Expected behavior
The MCP client should resolve
$refreferences withininputSchema(at minimum local$defsreferences) before presenting tool parameters to the model, so it can construct valid inputs.Additional context
curl$defs/$refininputSchema(a common pattern in Python MCP servers using Pydantic models)inputSchemahandling issue)