Non-destructive write tools omit `destructiveHint: false`, causing conservative approval prompts
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 72/100
Direção de pesquisa
Comece localizando os registros de create_branch e create_pull_request e, em seguida, compare seus ToolAnnotations com create_pull_request_review e delete_file. Audite as outras ferramentas de escrita mencionadas na issue, marcando explicitamente as operações claramente aditivas como não destrutivas, enquanto mantém uma abordagem conservadora em relação ao comportamento de sobrescrita ou exclusão. A tarefa estará concluída quando as anotações relevantes estiverem classificadas e os testes existentes das ferramentas passarem.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Describe the bug
Some clearly non-destructive/additive GitHub MCP tools set ReadOnlyHint: false but omit DestructiveHint: false.
Under the MCP ToolAnnotations contract, destructiveHint defaults to true when omitted for a non-read-only tool. Clients that honor the conservative default can therefore treat routine additive operations as potentially destructive and require additional confirmation.
This is observable with ChatGPT using the official github-mcp-server over Streamable HTTP / Secure MCP Tunnel: read tools execute automatically when the app is configured with elevated / "Allow all actions" permissions, while routine write tools such as creating a branch or opening a pull request still trigger confirmation.
On desktop, the user can approve for the conversation. On mobile, the same workflow can require repeated per-call approvals.
Examples in the current server
create_branch currently advertises:
Annotations: &mcp.ToolAnnotations{
Title: t("TOOL_CREATE_BRANCH_USER_TITLE", "Create branch"),
ReadOnlyHint: false,
},
create_pull_request currently advertises:
Annotations: &mcp.ToolAnnotations{
Title: t("TOOL_CREATE_PULL_REQUEST_USER_TITLE", "Open new pull request"),
ReadOnlyHint: false,
},
Both operations are additive and appear to be good candidates for an explicit:
DestructiveHint: jsonschema.Ptr(false),
There is already precedent in the codebase: create_pull_request_review explicitly sets DestructiveHint: false, while genuinely destructive tools such as delete_file explicitly set DestructiveHint: true.
Expected behavior
Clearly additive write tools should explicitly advertise DestructiveHint: false instead of inheriting the MCP default of true.
It may also be worth auditing other write tools and explicitly classifying them rather than relying on the default. Tools whose behavior depends on the requested method or which can overwrite/delete existing state should remain conservative.
Why this matters
This does not change security enforcement; MCP annotations are hints. But clients use those hints to drive confirmation UX.
Missing destructiveHint: false makes safe additive operations indistinguishable from potentially destructive writes to conservative clients, which creates significant approval friction in agentic workflows.
Environment
github-mcp-serverv1.12.1- Streamable HTTP transport
- ChatGPT custom MCP app over OpenAI Secure MCP Tunnel
- App permission set to elevated / Allow all actions
- Read operations do not prompt; routine write operations do
Related issues
- #798 — fine-grained confirmation settings for write actions
- #2723 —
label_writedelete missingDestructiveHint: true
- Linguagem predominante
- Go
- Estrelas
- 33.3k
- Forks
- 5.1k
- Merge médio
- 1d 1h
- PRs com merge (30d)
- 19
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de github/github-mcp-server
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
github/github-mcp-server#3235 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
github/github-mcp-server#3042 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
github/github-mcp-server#3032 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
github/github-mcp-server#2803 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
github/github-mcp-server#2740 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de github/github-mcp-server
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
google/differential-privacy#516 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 90/100
lightninglabs/lndmon#140 ·
-
documentation good first issue ready-for-triage ready-to-code
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
release-engineering/fbc-update-planner#102 · 3 comentários ·
Mantenedores costumam responder em até 5 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
yetone/magpie#562 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 4 dias