Skip to content

loopover_get_pr_maintainer_packet has a REST route but no remote MCP tool or local stdio MCP tool #7802

Description

@JSONbored

Context

GET /v1/repos/:owner/:repo/pulls/:number/maintainer-packet (src/api/routes.ts:3329) builds a PR's full maintainer packet (buildPullRequestMaintainerPacket, wrapped in attachDataQuality) from the same data bundle (repo, pullRequest, issues, pullRequests, files, reviews, checks, recentMergedPullRequests) the adjacent reviewability route assembles. It's gated by requireStaticProtectedApiToken — the literal first line of the handler is identical to GET .../pulls/:number/reviewability's first line. loopover_get_pr_reviewability has a full remote MCP tool + local stdio tool; maintainer-packet — despite sharing the same auth gate, the same param shape (owner/repo/number), and most of the same data dependencies — has neither.

Requirements

⚠️ Required pattern — mirror loopover_get_pr_reviewability's two-surface shape and input schema exactly (src/mcp/server.ts:2350-2358, ownerRepoPullShape input, stdio registration packages/loopover-mcp/bin/loopover-mcp.ts:1427-1434). No separate human CLI verb exists for reviewability either — do not add one here.

  • Register loopover_get_pr_maintainer_packet as a remote MCP tool in src/mcp/server.ts, input ownerRepoPullShape, calling the same data-assembly path the REST route already uses (getRepository, getPullRequest, listIssues, listPullRequests, listPullRequestFiles, listPullRequestReviews, listCheckSummaries, listRecentMergedPullRequestsbuildPullRequestMaintainerPacketattachDataQuality).
  • Add loopover_get_pr_maintainer_packet to MCP_TOOL_CATEGORIES as "review" (the category loopover_get_pr_reviewability uses).
  • Register loopover_get_pr_maintainer_packet as a local stdio MCP tool in packages/loopover-mcp/bin/loopover-mcp.ts, calling GET ${prefix}/pulls/${number}/maintainer-packet via apiGet.
  • Do not add a new human-typable CLI verb.
  • Do not change buildPullRequestMaintainerPacket, attachDataQuality, the REST route, or its auth gate.

Deliverables

  • loopover_get_pr_maintainer_packet registered as a remote MCP tool in src/mcp/server.ts, category "review", input ownerRepoPullShape.
  • loopover_get_pr_maintainer_packet registered as a local stdio MCP tool in packages/loopover-mcp/bin/loopover-mcp.ts.
  • No new REST route and no new human CLI verb.

Test Coverage Requirements

src/mcp/server.ts and packages/loopover-mcp are both under the 99%+ Codecov patch gate. Add a unit test for the new remote-tool registration mirroring loopover_get_pr_reviewability's test, and a stdio-tool test matching the existing sibling-tool convention. Verify packages/loopover-mcp's own coverage.include scoping before assuming the src/** gate applies identically.

Expected Outcome

loopover_get_pr_maintainer_packet is reachable via remote MCP and local stdio MCP with the same auth boundary its REST route already enforces, giving parity with its reviewability sibling.

Links & Resources

  • src/api/routes.ts:3329 (existing REST route, requireStaticProtectedApiToken-gated, identical first line to the reviewability route at src/api/routes.ts:3353)
  • src/mcp/server.ts:2350-2358, packages/loopover-mcp/bin/loopover-mcp.ts:1427-1434 (the loopover_get_pr_reviewability pattern to mirror)
  • src/mcp/server.ts:1798-1890 (MCP_TOOL_CATEGORIES map)

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions