git: the string "null" for base_branch, contains or not_contains arrives as None (python-sdk#3055)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- github, typescript
調査の方向性
Start in src/git and inspect its SDK lockfile and protocol tests for git_create_branch and git_branch. Check the Python SDK release that fixes python-sdk#3055, then add protocol coverage for base_branch, contains, and not_contains. Done means the fixed SDK release is locked and each test confirms the literal "null" reaches the tool as a string.
索引モデルが issue の本文から書いたものです。
説明
Since #5174 (#5175), the git server is built on MCPServer. Before validating arguments, the SDK's FuncMetadata.pre_parse_json JSON-decodes every string argument whose annotation is not exactly str. For the git server's three str | None parameters, that turns the literal string "null" into None:
| Tool | Parameter | Effect of "null" |
|---|---|---|
git_create_branch |
base_branch |
Branches from the current branch, not from a branch named null |
git_branch |
contains |
The filter is silently dropped |
git_branch |
not_contains |
The filter is silently dropped |
All three advertise anyOf: [string, null], so "null" is a valid string value. Before #5175, the server received it unchanged.
Upstream: modelcontextprotocol/python-sdk#3055 (open), with the fix in python-sdk#3056. A comment there already reproduces this "null" → None case.
Done when
The SDK release that fixes python-sdk#3055 is locked in src/git, with a protocol test for each parameter showing that "null" reaches the tool as the string "null". Before then, a workaround in the server (declaring the parameters as str with a custom validator and a hand-written schema) is not wanted: these servers are meant to show the plain high-level API. Found in the Copilot review of #5175.
- 主要言語
- TypeScript
- スター
- 91.4k
- フォーク
- 11.8k
- 平均マージ
- 6時間 39分
- マージ済み PR(30日)
- 146
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/servers のほかの issue
-
chore v2
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
modelcontextprotocol/servers#5261 ·
メンテナーはふだん 1 日以内に返信
-
docs(git): clarify unconfined default scope and repository confinement options in README and CLIオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
modelcontextprotocol/servers#5231 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
docs(git): clarify unconfined default scope and repository confinement options in README and CLIオープン
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
modelcontextprotocol/servers#5230 ·
メンテナーはふだん 1 日以内に返信
-
git: README should state plainly that without --repository every reachable repository is in scopeオープンdocumentation server-git v2
難易度 1/5 1〜3時間 初心者へのやさしさ 84/100
modelcontextprotocol/servers#5225 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
chore v2
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
modelcontextprotocol/servers#5223 ·
メンテナーはふだん 1 日以内に返信
modelcontextprotocol/servers の issue をすべて見る
似ている issue
-
freshness freshness:observed-only
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
thoroc/context-radar#282 ·
-
bug P2 rust
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
area: web
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
gabe-santana/arkdraw#25 ·
-
bug require-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
expressjs/expressjs.com#2549 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug good first issue hacktoberfest
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
codercops/discord-bot#101 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信