Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[bug] mcp-server-fetch tool json schema can‘t use in Google Gemini 2.5 pro

クローズ 初心者向け
#1,624 コメント 3 件 リアクション 4 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Dharit13 がすでに取り組んでいます。

2026年4月4日 から。

  • #3812 @Dharit13 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
64/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
typescript
領域
tooling

調査の方向性

mcp-server-fetch ツールのスキーマを特定し、exclusiveMaximum と exclusiveMinimum を出力する max_length の制約を検索します。サポートされている制約フィールドを使用するようにスキーマを更新し、生成された fetch-tool JSON にサポートされていないフィールドが含まれなくなり、Gemini function calling に対して有効なままであることを確認します。

索引モデルが issue の本文から書いたものです。

説明

bug server-fetch

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.

主要言語
JavaScript
スター
91.2k
フォーク
11.8k
平均マージ
6時間 20分
マージ済み PR(30日)
117

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

modelcontextprotocol/servers のほかの issue

modelcontextprotocol/servers の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。