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 摘要。