[bug] mcp-server-fetch tool json schema can‘t use in Google Gemini 2.5 pro
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 64/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
- Lĩnh vực
- tooling
Hướng nghiên cứu
Xác định schema của công cụ mcp-server-fetch và tìm các ràng buộc max_length tạo ra exclusiveMaximum và exclusiveMinimum. Cập nhật schema để sử dụng các trường ràng buộc được hỗ trợ, sau đó xác minh rằng JSON fetch-tool được tạo không còn chứa các trường không được hỗ trợ và vẫn hợp lệ cho Gemini function calling.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 91.2k
- Fork
- 11.8k
- Merge trung bình
- 6 giờ 20 phút
- Pull request đã merge (30 ngày)
- 117
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelcontextprotocol/servers
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
modelcontextprotocol/servers#5156 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
memory: create_entities, create_relations and add_observations could declare idempotentHint: trueĐang mởenhancement v2
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/servers#5153 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/servers#5134 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/servers#5071 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
git: git_create_branch is marked non-destructive but silently resets an existing packed branchĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
modelcontextprotocol/servers#5059 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của modelcontextprotocol/servers
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: EUROTV NEWSĐang mởchannels:add check:passed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
curriculum documentation quality
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
githubnext/gh-aw-workshop#4638 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
openclaw/openclaw-enterprise#2571 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày