Skip to content

[Code Quality] Reconcile get_teams MCP tool permission gating with documented read-only design scope #51032

Description

@github-actions

Description

The MCP structural analysis (2026-08-06) found that the get_teams tool was blocked by a permission gate during a run, causing the context toolset to return zero usable data (worst-rated tool at 1/5 usefulness in the report, versus 3.3/5 average). The report explicitly flags this as worth checking: does the read-only design-scope documentation match the actual runtime permission gating for get_teams?

Suggested Changes

  • Locate the get_teams MCP tool definition/handler and its documented permission scope (should be read-only per design docs).
  • Compare against the actual runtime permission check that caused the block in the referenced run.
  • Either relax the runtime gate to match the documented read-only scope, or update the documentation if the stricter gate is intentional (e.g. requires read:org that isn't always granted).
  • Add a regression test or doc note clarifying the required token scope for get_teams.

Files Affected

  • MCP tool/handler implementation for get_teams (search pkg/ for get_teams tool registration)
  • Associated design-scope documentation referencing read-only MCP tools

Success Criteria

  • Runtime permission behavior for get_teams matches documented scope (either gate relaxed or docs updated)
  • Clear error message if the gate remains, indicating the specific missing permission

Source

Extracted from MCP Structural Analysis - 2026-08-06 #50864

Priority

Low-Medium - improves tool reliability/observability, small isolated fix

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · auto · 47.5 AIC · ⌖ 3.92 AIC · ⊞ 10.2K ·

  • expires on Aug 7, 2026, 11:12 PM UTC-08:00

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions