pull_request_read get_files always returns full patches
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
Inizia dal punto di ingresso pull_request_read per il metodo get_files ed esamina convertToMinimalPRFiles, che attualmente valorizza MinimalPRFile.Patch incondizionatamente. Confronta i meccanismi esistenti di selezione dei campi listPullRequestsItemFieldEnum e listCommitsItemFieldEnum, quindi verifica che i chiamanti possano richiedere i metadati dei file senza le patch e che il comportamento predefinito rimanga chiaro.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
pull_request_read with method: get_files always includes the full patch for every file, and offers no way to ask for filenames only. A 21-file pull request returned roughly 370 KB when only the paths were needed.
In the source, convertToMinimalPRFiles populates MinimalPRFile.Patch unconditionally, and get_files has no field-selection parameter. Several other tools do have one, for example listPullRequestsItemFieldEnum and listCommitsItemFieldEnum, so the mechanism already exists elsewhere in the codebase.
Affected version
Unknown. Observed through a hosted GitHub MCP integration on 2026-09-06, where the server version is not exposed to me. The code references above are from the repository's default branch on that date and may not match the build that was serving the request.
Steps to reproduce the behavior
- Call
pull_request_readwithmethod: get_filesfor a pull request touching a reasonable number of files. - Observe that every entry carries its full
patch, with no option to omit it.
Expected vs actual behavior
Expected: a way to request file metadata without patches, for example a fields parameter matching the pattern used by the list tools.
Actual: patches are always included, so a caller that only needs the list of changed paths pays the full diff in context.
Possibly related to #2122, which is closed but describes the same class of oversized pull_request_read payloads.
Logs
None captured beyond the returned payload size.
- Lingua principale
- Go
- Stelle
- 33.1k
- Fork
- 5k
- Merge medio
- 2g 15h
- PR unite (30g)
- 27
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
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
TheManticoreProject/Manticore#1383 ·
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
modelcontextprotocol/registry#1654 ·