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

MCP `account_suspend`: suspend or unsuspend a person's account, with the same rules as the API #4794

shipped production is serving it opened this has it
opened this

Intent: an admin stops a misbehaving account from their harness at once.

Done:

  • [ ] src/http/mcp.ts has an account_suspend tool, placed right after account_role, taking username and suspended (boolean). It calls what POST /api/v1/admin/accounts/:username/suspend and /unsuspend call
  • [ ] an admin cannot suspend themselves or the last admin when the API refuses that, with the same error
  • [ ] docs/MCP.md has its row beside account_role
  • [ ] test/mcp-account-suspend.test.ts: an admin suspends a person, whose session and token then stop working, and unsuspends them; a non-admin is refused

Risks: test/mcp-size.test.ts holds tools/list under a 37,000-byte headroom, so keep the description to one short sentence and, if that fails after a rebase, shorten this tool's own. Other MCP tools are being added in parallel, so put this one exactly where named so the hunks do not meet. Do not change the API route or what it allows: the tool calls the same functions.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs