Context
src/api/routes.ts:2892-2929 implements GET /v1/repos/:owner/:repo/pulls/:number/reviewability and explicitly branches on identity.actor === "mcp" with isMcpReadRepoAllowed(...) (src/api/routes.ts:2897) — the same MCP-specific repo-allowlist gate already used by /intelligence (→ loopover_get_repo_context) and /issue-quality (→ loopover_get_issue_quality), both of which do have MCP tools. Grepping both src/mcp/server.ts and packages/loopover-mcp/bin/loopover-mcp.js for "reviewability" turns up nothing except unrelated PII-redaction regexes. This route was clearly built with MCP consumption in mind (the auth plumbing is already there) but no tool was ever added on either server.
Requirements
- Add
loopover_get_pr_reviewability (or a name matching this repo's existing tool-naming convention) to src/mcp/server.ts, calling the existing route, following the same isMcpReadRepoAllowed gating pattern loopover_get_repo_context/loopover_get_issue_quality already use.
- Also register the equivalent tool in
packages/loopover-mcp/bin/loopover-mcp.js for the local server, per this repo's now-established convention that a new remote tool gets a local mirror too (see the companion parity issues filed alongside this one).
- Match the existing input schema/response shape the REST route already defines — don't invent a new response shape.
Test Coverage Requirements
99%+ Codecov patch coverage on any src/** changes; match packages/loopover-mcp's own test conventions for the local-server addition.
Deliverables
Expected Outcome
An MCP-authenticated caller can query PR reviewability the same way it can already query repo intelligence and issue quality.
Links & Resources
src/api/routes.ts:2892-2929
src/mcp/server.ts (where loopover_get_repo_context/loopover_get_issue_quality show the existing pattern to match)
Context
src/api/routes.ts:2892-2929implementsGET /v1/repos/:owner/:repo/pulls/:number/reviewabilityand explicitly branches onidentity.actor === "mcp"withisMcpReadRepoAllowed(...)(src/api/routes.ts:2897) — the same MCP-specific repo-allowlist gate already used by/intelligence(→loopover_get_repo_context) and/issue-quality(→loopover_get_issue_quality), both of which do have MCP tools. Grepping bothsrc/mcp/server.tsandpackages/loopover-mcp/bin/loopover-mcp.jsfor "reviewability" turns up nothing except unrelated PII-redaction regexes. This route was clearly built with MCP consumption in mind (the auth plumbing is already there) but no tool was ever added on either server.Requirements
loopover_get_pr_reviewability(or a name matching this repo's existing tool-naming convention) tosrc/mcp/server.ts, calling the existing route, following the sameisMcpReadRepoAllowedgating patternloopover_get_repo_context/loopover_get_issue_qualityalready use.packages/loopover-mcp/bin/loopover-mcp.jsfor the local server, per this repo's now-established convention that a new remote tool gets a local mirror too (see the companion parity issues filed alongside this one).Test Coverage Requirements
99%+ Codecov patch coverage on any
src/**changes; matchpackages/loopover-mcp's own test conventions for the local-server addition.Deliverables
loopover_get_pr_reviewability(or equivalent name) added tosrc/mcp/server.ts.packages/loopover-mcp/bin/loopover-mcp.js.Expected Outcome
An MCP-authenticated caller can query PR reviewability the same way it can already query repo intelligence and issue quality.
Links & Resources
src/api/routes.ts:2892-2929src/mcp/server.ts(whereloopover_get_repo_context/loopover_get_issue_qualityshow the existing pattern to match)