Tool name `get_file_contents` conflicts with Claude Desktop built-in tool

Abierto Apto para principiantes
#1,935 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
62/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Tranquilo
Stack tecnológico
go
Área
api

Línea de trabajo

Inspecciona pkg/github/repositories.go alrededor de la línea 625, donde está definido el tool get_file_contents. Compara el nombre del tool con la respuesta directa de stdio tools/list y verifica que el tool renombrado esté expuesto en Claude Desktop sin afectar a los demás tools listados. Se considera terminado cuando el nombre de reemplazo resuelve la colisión y la operación de contenido del repositorio sigue estando disponible.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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_contents in tools/list response (verified via direct stdio test)
  • Other tools work fine (get_me, get_commit, list_branches, pull_request_read, etc.)
  • get_file_contents specifically 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.
Lenguaje dominante
Go
Estrellas
33.1k
Forks
5k
Merge medio
2 d 15 h
PR fusionados (30 d)
27

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de github/github-mcp-server

Todos los issues de github/github-mcp-server

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.