github / github/github-mcp-server

Hide write-oriented prompts and instructions when write tools are filtered

オープン
#2,228 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Go
スター
33k
フォーク
5k
平均マージ
2日 1時間
マージ済み PR(30日)
52

説明

## Problem
Tool filtering can remove write capabilities while prompts and server instructions continue to advertise those same actions. In read-only or explicitly filtered configurations, the server can still expose prompts that instruct the client to create issues, assign Copilot, or open pull requests.

## Why now
This server builds instructions and prompts dynamically as part of its safety surface. If filtered capabilities remain documented as available, clients receive contradictory guidance and can plan actions the server has already hidden.

## Version under test
- Commit: `b1575edfefde09e3cf7c805aea79a92131271659` (`origin/main` on 2026-03-17)
- Runtime: Go `1.25.7`, macOS `darwin/arm64`

## Minimal repro
1. Build an inventory in read-only mode or with write tools excluded.
2. Inspect `AvailableTools`, `AvailablePrompts`, and generated server instructions.
3. Compare the filtered tool set with the exposed prompts/instruction text.

## Expected behavior
If a write tool is hidden by policy, related prompts and write-oriented instructions should disappear or clearly mark the capability as unavailable.

## Actual behavior
Prompt availability is filtered only by toolset/feature flags, and instruction generation does not verify that the referenced write tools survived read-only or exclude-tool filtering.

## Code paths
- `pkg/inventory/instructions.go`
- `pkg/inventory/prompts.go`
- `pkg/github/toolset_instructions.go`
- `docs/toolsets-and-icons.md`

## Validation target
Read-only and explicitly filtered inventories should not expose prompts or instruction text that imply unavailable write actions.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。