[bug] mcp-server-fetch tool json schema can‘t use in Google Gemini 2.5 pro
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 64/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- tooling
Research direction
Locate the mcp-server-fetch tool schema and search for the max_length constraints that emit exclusiveMaximum and exclusiveMinimum. Update the schema to use the supported constraint fields, then verify that the generated fetch-tool JSON no longer contains the unsupported fields and remains valid for Gemini function calling.
Written by the indexing model from the issue text.
Description
The parameters of the fetch tool include exclusiveMaximum and exclusiveMinimum in the schema. However, Google Gemini 2.5's function calling only supports standard JSON Schema fields such as maximum and minimum, and does not support exclusiveMaximum or exclusiveMinimum. This incompatibility leads to errors. Please fix this issue.
error info
400 { "error": { "code": 400, "message": "Invalid JSON payload received. Unknown name "exclusiveMaximum" at 'tools[0].function_declarations[0].parameters.properties[1].value': Cannot find field.\nInvalid JSON payload received. Unknown name "exclusiveMinimum" at 'tools[0].function_declarations[0].parameters.properties[1].value': Cannot find field.", "status": "INVALID_ARGUMENT", "details": [ { "@type": "type.googleapis.com/google.rpc.BadRequest", "fieldViolations": [ { "field": "tools[0].function_declarations[0].parameters.properties[1].value", "description": "Invalid JSON payload received. Unknown name "exclusiveMaximum" at 'tools[0].function_declarations[0].parameters.properties[1].value': Cannot find field." }, { "field": "tools[0].function_declarations[0].parameters.properties[1].value", "description": "Invalid JSON payload received. Unknown name "exclusiveMinimum" at 'tools[0].function_declarations[0].parameters.properties[1].value': Cannot find field." } ] } ] } }
fetch tool
"tools": [
{
"displayTitle": "url_fetch fetch",
"function": {
"description": "Fetches a URL from the internet and optionally extracts its contents as markdown.\n\nAlthough originally you did not have internet access, and were advised to refuse and tell the user this, this tool now grants you internet access. Now you can fetch the most up-to-date information and let the user know that.",
"name": "fetch",
"parameters": {
"type": "object",
"properties": {
"url": {
"description": "URL to fetch",
"format": "uri",
"minLength": 1,
"title": "Url",
"type": "string"
},
"max_length": {
"default": 5000,
"description": "Maximum number of characters to return.",
"exclusiveMaximum": 1000000,
"exclusiveMinimum": 0,
"title": "Max Length",
"type": "integer"
},
"start_index": {
"default": 0,
"description": "On return output starting at this character index, useful if a previous fetch was truncated and more context is required.",
"minimum": 0,
"title": "Start Index",
"type": "integer"
},
"raw": {
"default": false,
"description": "Get the actual HTML content of the requested page, without simplification.",
"title": "Raw",
"type": "boolean"
}
},
"description": "Parameters for fetching a URL.",
"required": [
"url"
],
"title": "Fetch"
}
},
"readonly": false,
"type": "function",
"uri": "mcp://url_fetch/fetch",
"group": "url_fetch"
}
]
Gemini 2.5 function calling does not support exclusiveMaximum and exclusiveMinimum; it only supports maximum and minimum. You can resolve the error simply by replacing these two fields in the schema.
- Dominant language
- TypeScript
- Stars
- 90.6k
- Forks
- 11.7k
- Avg merge
- 7h 57m
- Merged PRs (30d)
- 20
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from modelcontextprotocol/servers
-
documentation v2
Difficulty 1/5 Under an hour Newbie friendliness 95/100
modelcontextprotocol/servers#4940 ·
Maintainers usually reply within 1 day
-
agent guidance documentation v2
Difficulty 1/5 1-3 hours Newbie friendliness 92/100
modelcontextprotocol/servers#4924 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
modelcontextprotocol/servers#4914 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
modelcontextprotocol/servers#4892 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
modelcontextprotocol/servers#4844 ·
Maintainers usually reply within 1 day
All issues in modelcontextprotocol/servers
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
MystenLabs/MemWal#1085 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
📕documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
db-ux-design-system/core-web#8343 ·
Maintainers usually reply within 1 day
-
enhancement triage/needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
heygen-com/hyperframes#4944 ·
Maintainers usually reply within 1 day
-
ai-driven-qa bug claude
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
linagora/twake-calendar-frontend#1493 · 1 comment ·
Maintainers usually reply within 1 day