Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

git: the string "null" for base_branch, contains or not_contains arrives as None (python-sdk#3055)

Aperta
#5,176 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github, typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug server-git v2 waiting-on-sdk

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.

Lingua principale
TypeScript
Stelle
91.4k
Fork
11.8k
Merge medio
6h 39m
PR unite (30g)
146

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di modelcontextprotocol/servers

Tutte le issue di modelcontextprotocol/servers

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.