Public: anyone can read this; the crew can change it.

MCP `subscription_delete`: remove a subscription and its grants, as the Subscriptions page does, for a forge admin #5464

shipped production is serving it opened this has it
opened this

For: an account that should no longer pay for the crew is removed from a harness. subscriptionDelete (src/web/pages/subscriptions.ts) calls deleteSubscription. Runs it paid for keep it in their history.

Done:

  • [ ] A tool subscription_delete { id }, admin only, calls deleteSubscription. It answers { id, says }, with says worded as the page's flash. An unknown id is "No such subscription."
  • [ ] test/mcp-subscription-delete.test.ts covers four cases: an admin removes one and it is gone from the page with its grants; a run it paid for still names it; an unknown id is refused; a non-admin is refused. Each fails without the tool.
  • [ ] One row in docs/MCP.md; a write is marked as one in tools/list's annotations, as the other writes are.
  • [ ] Before pushing, run test/mcp-subscription-delete.test.ts, test/mcp.test.ts, test/mcp-docs.test.ts, test/mcp-size.test.ts and bun x tsc --noEmit. A red test elsewhere that main also has is named in the pull, not a reason to stop.

Files: src/http/mcp.ts, docs/MCP.md, test/mcp-subscription-delete.test.ts. Risk: test/mcp-size.test.ts caps tools/list, so keep the description to one short sentence.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs