Hide write-oriented prompts and instructions when write tools are filtered
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 50/100
调研方向
先阅读 pkg/inventory/instructions.go 和 pkg/inventory/prompts.go,然后跟踪过滤过程进入 pkg/github/toolset_instructions.go。复现一个只读或 exclude-tool inventory,并比较 AvailableTools、AvailablePrompts 和生成的 instructions。当过滤后的 inventory 不再暴露暗示不可用写入操作的 prompts 或 instruction 文本时,即表示完成;有关已文档化的行为,请参阅 docs/toolsets-and-icons.md。
由索引模型根据 Issue 内容生成。
描述
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/mainon 2026-03-17) - Runtime: Go
1.25.7, macOSdarwin/arm64
Minimal repro
- Build an inventory in read-only mode or with write tools excluded.
- Inspect
AvailableTools,AvailablePrompts, and generated server instructions. - 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.gopkg/inventory/prompts.gopkg/github/toolset_instructions.godocs/toolsets-and-icons.md
Validation target
Read-only and explicitly filtered inventories should not expose prompts or instruction text that imply unavailable write actions.
- 主要语言
- Go
- 星标
- 33.1k
- 派生
- 5k
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 25
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/github-mcp-server 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
github/github-mcp-server#3235 ·
-
enhancement
难度 1/5 1 小时以内 新手友好度 88/100
github/github-mcp-server#3042 · 2 条评论 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
github/github-mcp-server#3032 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 74/100
github/github-mcp-server#2803 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
github/github-mcp-server#2740 ·
查看 github/github-mcp-server 的全部 Issue
相似的 Issue
-
textual definition
难度 1/5 1 小时以内 新手友好度 90/100
geneontology/go-ontology#32653 ·
-
难度 1/5 1 小时以内 新手友好度 75/100
-
needs design
难度 2/5 1-3 小时 新手友好度 75/100
-
Priority/High ready-for-agent Severity/Major Type/Bug
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100