Tool name `get_file_contents` conflicts with Claude Desktop built-in tool
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 62/100
Direzione di ricerca
Ispeziona pkg/github/repositories.go intorno alla riga 625, dove è definito il tool get_file_contents. Confronta il nome del tool con la risposta diretta stdio tools/list e verifica che il tool rinominato sia esposto in Claude Desktop senza influire sugli altri tool elencati. Il lavoro è completato quando il nome sostitutivo risolve la collisione e l’operazione sul contenuto del repository rimane disponibile.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
The tool get_file_contents is not exposed to Claude in Claude Desktop, despite the MCP server correctly returning it in the tools/list response. This appears to be a name collision with Claude Desktop's internal file-reading capability.
Environment
- Claude Desktop: Latest version (Feb 2026)
- github-mcp-server: Built from main branch
- Config:
GITHUB_READ_ONLY=true
Symptoms
- Server returns
get_file_contentsintools/listresponse (verified via direct stdio test) - Other tools work fine (
get_me,get_commit,list_branches,pull_request_read, etc.) get_file_contentsspecifically is not available to Claude in conversations- No errors in MCP logs - the tool is simply not exposed
Root Cause
Claude Desktop appears to have a built-in tool with the same or similar name (get_file_contents or read_file), which shadows/filters the MCP server's version.
Solution
Renaming the tool from get_file_contents to fetch_repo_file immediately resolves the issue. After rebuilding with the renamed tool, Claude Desktop correctly exposes it.
Suggested Fix
Rename the tool in pkg/github/repositories.go:625 from:
Name: "get_file_contents",
to something like:
Name: "fetch_repo_file",
or:
Name: "get_repository_content",
This would be a breaking change for users relying on the current tool name, but it's necessary for Claude Desktop compatibility.
Additional Context
- Issue was debugged extensively, ruling out: completions capability bug, schema issues, read-only filtering, scope filtering
- The rename was the only change that fixed the issue
- Other MCP servers may have similar conflicts with generic tool names like
read_file,get_file, etc.
- Lingua principale
- Go
- Stelle
- 33.1k
- Fork
- 5k
- Merge medio
- 2g 1h
- PR unite (30g)
- 25
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/github-mcp-server
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
github/github-mcp-server#3235 ·
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
github/github-mcp-server#3042 · 2 commenti ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
github/github-mcp-server#3032 · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
github/github-mcp-server#2803 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
github/github-mcp-server#2740 ·
Tutte le issue di github/github-mcp-server
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
NVIDIA/gpu-operator#2955 ·
-
agentic-workflows
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Broadcast Documentation Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
kovidgoyal/kitty#10516 ·
-
CVE-2024-24786 CPE mismatch Apertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
cisagov/vulnrichment#337 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100