Context
GET /v1/repos/:owner/:repo/gate-config/effective (src/api/routes.ts:3412) returns a repo's current effective self-tuned gate thresholds (confidenceFloor, scopeCap, shadowPending) — read-only, resolved from loadOverride/loadShadowOverride. Its own comment says it's "[g]ated behind the same most-conservative repo-scoped read precedent the reviewability route (#6154) uses," and the code confirms it: requireStaticProtectedApiToken + the identical identity.actor === "mcp" && !isMcpReadRepoAllowed(...) allowlist check that GET .../pulls/:number/reviewability uses. loopover_get_pr_reviewability has a full remote MCP tool + local stdio tool; gate-config/effective has neither.
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). This tool takes only owner/repo (no pull number) — use ownerRepoShape, not ownerRepoPullShape. No separate human CLI verb exists for reviewability either — do not add one here.
- Register
loopover_get_gate_config_effective as a remote MCP tool in src/mcp/server.ts, input ownerRepoShape, calling the same loadOverride/loadShadowOverride pair the REST route already calls, returning the identical { repoFullName, effective: { confidenceFloor, scopeCap: { files, lines } }, shadowPending } shape.
- Add
loopover_get_gate_config_effective to MCP_TOOL_CATEGORIES as "maintainer" (this is repo-scoped self-tune configuration, the same family as loopover_get_gate_precision).
- Register
loopover_get_gate_config_effective as a local stdio MCP tool in packages/loopover-mcp/bin/loopover-mcp.ts, calling GET ${repoBase}/gate-config/effective via apiGet.
- Do not add a new human-typable CLI verb.
- Do not change
loadOverride, loadShadowOverride, 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. 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 coverage.include scoping first).
Expected Outcome
loopover_get_gate_config_effective is reachable via remote MCP and local stdio MCP with the same auth boundary its REST route already enforces — an MCP client (including a self-host operator's mcp-token session, if allowlisted) can read a repo's effective gate thresholds without needing raw HTTP.
Links & Resources
src/api/routes.ts:3412 (existing REST route, requireStaticProtectedApiToken + isMcpReadRepoAllowed-gated)
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/gate-config/effective(src/api/routes.ts:3412) returns a repo's current effective self-tuned gate thresholds (confidenceFloor,scopeCap,shadowPending) — read-only, resolved fromloadOverride/loadShadowOverride. Its own comment says it's "[g]ated behind the same most-conservative repo-scoped read precedent the reviewability route (#6154) uses," and the code confirms it:requireStaticProtectedApiToken+ the identicalidentity.actor === "mcp" && !isMcpReadRepoAllowed(...)allowlist check thatGET .../pulls/:number/reviewabilityuses.loopover_get_pr_reviewabilityhas a full remote MCP tool + local stdio tool;gate-config/effectivehas neither.Requirements
loopover_get_gate_config_effectiveas a remote MCP tool insrc/mcp/server.ts, inputownerRepoShape, calling the sameloadOverride/loadShadowOverridepair the REST route already calls, returning the identical{ repoFullName, effective: { confidenceFloor, scopeCap: { files, lines } }, shadowPending }shape.loopover_get_gate_config_effectivetoMCP_TOOL_CATEGORIESas"maintainer"(this is repo-scoped self-tune configuration, the same family asloopover_get_gate_precision).loopover_get_gate_config_effectiveas a local stdio MCP tool inpackages/loopover-mcp/bin/loopover-mcp.ts, callingGET ${repoBase}/gate-config/effectiveviaapiGet.loadOverride,loadShadowOverride, the REST route, or its auth gate.Deliverables
loopover_get_gate_config_effectiveregistered as a remote MCP tool insrc/mcp/server.ts, category"maintainer", inputownerRepoShape.loopover_get_gate_config_effectiveregistered 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. Add a unit test for the new remote-tool registration mirroringloopover_get_pr_reviewability's test, and a stdio-tool test matching the existing sibling-tool convention (verifypackages/loopover-mcp'scoverage.includescoping first).Expected Outcome
loopover_get_gate_config_effectiveis reachable via remote MCP and local stdio MCP with the same auth boundary its REST route already enforces — an MCP client (including a self-host operator'smcp-token session, if allowlisted) can read a repo's effective gate thresholds without needing raw HTTP.Links & Resources
src/api/routes.ts:3412(existing REST route,requireStaticProtectedApiToken+isMcpReadRepoAllowed-gated)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)