Context
GET /v1/repos/:owner/:repo/live-gate-thresholds (src/api/routes.ts:3440) is the "AMS probe surface for live gate thresholds" — a field-limited snake_case view of the currently-authoritative gate override (live row wins, shadow fills in if live is absent; 404 when neither exists). Its own comment says "[a]uth matches gate-config/effective above," i.e. the same requireStaticProtectedApiToken + isMcpReadRepoAllowed pattern loopover_get_pr_reviewability already uses as an MCP tool. Like gate-config/effective, this route has no remote MCP tool and no local stdio MCP tool.
Requirements
⚠️ Required pattern — mirror loopover_get_pr_reviewability's auth handling and two-surface shape (src/mcp/server.ts:2350-2358, stdio registration packages/loopover-mcp/bin/loopover-mcp.ts:1427-1434). Input is owner/repo only (ownerRepoShape) — no pull number. No separate human CLI verb exists for reviewability either — do not add one here. This tool's REST route can 404 (live_gate_thresholds_not_found) — the MCP tool must propagate that as a normal "not found" result, not throw, matching how other 404-capable tools in this file already handle it (e.g. loopover_get_issue_quality's not-found handling — check its pattern before inventing a new one).
- Register
loopover_get_live_gate_thresholds as a remote MCP tool in src/mcp/server.ts, input ownerRepoShape, calling toLiveGateThresholdFields(authoritativeGateOverride(live, shadow)) exactly as the REST route does, including its not-found case.
- Add
loopover_get_live_gate_thresholds to MCP_TOOL_CATEGORIES as "maintainer".
- Register
loopover_get_live_gate_thresholds as a local stdio MCP tool in packages/loopover-mcp/bin/loopover-mcp.ts, calling GET ${repoBase}/live-gate-thresholds via apiGet.
- Do not add a new human-typable CLI verb.
- Do not change
toLiveGateThresholdFields, authoritativeGateOverride, the REST route, or its auth gate.
Deliverables
Test Coverage Requirements
src/mcp/server.ts and packages/loopover-mcp are both under the 99%+ Codecov patch gate — cover both the found and not-found branches. Mirror loopover_get_pr_reviewability's test for the found case, and an existing 404-capable tool's test (e.g. loopover_get_issue_quality) for the not-found case. Verify packages/loopover-mcp's coverage.include scoping before assuming the src/** gate applies identically.
Expected Outcome
loopover_get_live_gate_thresholds is reachable via remote MCP and local stdio MCP with the same auth boundary and not-found behavior its REST route already has.
Links & Resources
src/api/routes.ts:3440 (existing REST route)
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)
Context
GET /v1/repos/:owner/:repo/live-gate-thresholds(src/api/routes.ts:3440) is the "AMS probe surface for live gate thresholds" — a field-limited snake_case view of the currently-authoritative gate override (live row wins, shadow fills in if live is absent; 404 when neither exists). Its own comment says "[a]uth matches gate-config/effective above," i.e. the samerequireStaticProtectedApiToken+isMcpReadRepoAllowedpatternloopover_get_pr_reviewabilityalready uses as an MCP tool. Likegate-config/effective, this route has no remote MCP tool and no local stdio MCP tool.Requirements
loopover_get_live_gate_thresholdsas a remote MCP tool insrc/mcp/server.ts, inputownerRepoShape, callingtoLiveGateThresholdFields(authoritativeGateOverride(live, shadow))exactly as the REST route does, including its not-found case.loopover_get_live_gate_thresholdstoMCP_TOOL_CATEGORIESas"maintainer".loopover_get_live_gate_thresholdsas a local stdio MCP tool inpackages/loopover-mcp/bin/loopover-mcp.ts, callingGET ${repoBase}/live-gate-thresholdsviaapiGet.toLiveGateThresholdFields,authoritativeGateOverride, the REST route, or its auth gate.Deliverables
loopover_get_live_gate_thresholdsregistered as a remote MCP tool insrc/mcp/server.ts, category"maintainer", inputownerRepoShape.loopover_get_live_gate_thresholdsregistered as a local stdio MCP tool inpackages/loopover-mcp/bin/loopover-mcp.ts.Test Coverage Requirements
src/mcp/server.tsandpackages/loopover-mcpare both under the 99%+ Codecov patch gate — cover both the found and not-found branches. Mirrorloopover_get_pr_reviewability's test for the found case, and an existing 404-capable tool's test (e.g.loopover_get_issue_quality) for the not-found case. Verifypackages/loopover-mcp'scoverage.includescoping before assuming thesrc/**gate applies identically.Expected Outcome
loopover_get_live_gate_thresholdsis reachable via remote MCP and local stdio MCP with the same auth boundary and not-found behavior its REST route already has.Links & Resources
src/api/routes.ts:3440(existing REST route)src/mcp/server.ts:2350-2358,packages/loopover-mcp/bin/loopover-mcp.ts:1427-1434(theloopover_get_pr_reviewabilitypattern to mirror)src/mcp/server.ts:1798-1890(MCP_TOOL_CATEGORIESmap)