github / github/github-mcp-server

Inventory: return stable hidden-tool reason codes across filter gates

未關閉
#2,197 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Go
星號
33k
分支
5k
平均合併
2 天 1 小時
30 天內合併 PR
52

描述

## Problem
Tool filtering can hide capabilities due to toolset, PAT scope, read-only mode, or lockdown, but callers do not always receive one stable reason classification.

## Why now
Permission-scoped capability exposure is a core contract of the GitHub MCP server. Missing provenance for hidden tools weakens operator debugging and policy auditability.

## Current insufficiency
Filtering behavior is implemented in multiple layers, but there is not a single stable reason-code contract guaranteed across all hide paths.

## Expected behavior
Hidden tools should be classified with deterministic reason codes such as:
- `toolset_filtered`
- `scope_filtered`
- `readonly_filtered`
- `lockdown_filtered`

## Validation requirements
- Add tests that exercise each hide path.
- Assert one stable reason code per hidden tool decision.
- Keep classification convergent across inventory and request filtering.

## Scope map
- `internal/ghmcp/server.go`
- `pkg/inventory/builder.go`
- `pkg/scopes/fetcher.go`
- `pkg/lockdown/lockdown.go`

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。