feat(mcp): register loopover_close_pr write-tool in both MCP surfaces (#6615) - #6715
Conversation
…JSONbored#6615) buildClosePrSpec is the only one of the 9 local-write-tool builders with no MCP tool — fully implemented, tested, and already consumed internally, but no MCP client (remote or local stdio) could call it. This registers loopover_close_pr to reach parity with its 8 registered siblings, which all share this exact builder module. - src/mcp/server.ts: import buildClosePrSpec, add closePrShape (repoFullName + number + optional comment, same bounds as the sibling shapes), register the tool in the JSONbored#780 write-tools block, and add its MCP_TOOL_CATEGORIES entry. - packages/loopover-mcp/bin/loopover-mcp.js: mirror the tool — import, closePrShape, STDIO_TOOL_DESCRIPTORS entry, and registerStdioTool block. - No new write path, no new auth: like its siblings it just returns a LOCAL-execution spec (gh pr close [&& gh pr comment]) the caller runs with its own gh creds; loopover never performs the write. Tests: server-side and CLI cases assert the exact command for both the with-comment and without-comment branches; the tool-count guard is bumped 62 -> 63. Full mcp suite green (90 files / 726 tests). Closes JSONbored#6615
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6715 +/- ##
=======================================
Coverage 93.65% 93.65%
=======================================
Files 681 682 +1
Lines 68098 68117 +19
Branches 18695 18702 +7
=======================================
+ Hits 63775 63793 +18
Misses 3347 3347
- Partials 976 977 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-16 20:35:03 UTC
Review summary Nits — 3 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
Closes #6615.
buildClosePrSpec(packages/loopover-engine/src/miner/local-write-tools.ts) is the only one of the 9buildXSpeclocal-write-tool builders with no MCP tool — it is fully implemented, tested, and already consumed internally (by the claim-conflict resolver), but no MCP client could call it. This addsloopover_close_prto reach parity with its 8 registered siblings, which all share this exact builder module.Changes
src/mcp/server.ts— importbuildClosePrSpec; addclosePrShape(repoFullName+number+ optionalcomment, same bounds as the sibling shapes); register the tool in the same#780write-tools block via the existingregister(...)wrapper (inputSchema: closePrShape,outputSchema: localWriteActionOutputSchema, handlerthis.toolResult(this.localWriteSpec(buildClosePrSpec(input)))); add itsMCP_TOOL_CATEGORIESentry ("agent").packages/loopover-mcp/bin/loopover-mcp.js— mirror the tool: import,closePrShape,STDIO_TOOL_DESCRIPTORSentry, andregisterStdioToolblock, alongside the other 8.Scope / safety
No new write path and no new auth — like its siblings it just returns a LOCAL-execution spec (
gh pr close <n> --repo '<repo>', optionally&& gh pr comment <n> --repo '<repo>' --body '<comment>') the caller runs with its ownghcredentials; loopover never performs the write. The generated command exactly matches whatbuildClosePrSpecalready produces (no reimplementation).Tests
test/unit/mcp-write-tools.test.ts(server) — asserts the exact command for both branches (with / withoutcomment).test/unit/mcp-cli-write-tools.test.ts(CLI stdio) — a dedicatedloopover_close_prcase (both branches) + the tool added to theWRITE_TOOLSregistration check (8 → 9).test/unit/mcp-tool-rename-aliases.test.ts— the tool-count guard bumped 62 → 63 (with a history-comment line), and the name-set assertion picks it up automatically.Full mcp suite green locally: 90 files / 726 tests pass, plus
tscclean.