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

A forge's admin reads their own forge's plan through MCP, in the same words as the settings row #11411

shipped production is serving it opened this has it
opened this

Why: #11356 put the plan and the manage-billing link in the forge's settings. Through MCP, only the parent's admin can read a plan, with forges and forge. The same thing should be reachable the same way by a person and by an agent.

Done:

  • [x] The here tool, on the settings page or with no page, carries plan for an admin of this forge. plan holds the text planLine returns in src/web/plan_row.ts and, when one is set, the manage-billing address (getPortalUrl in src/settings/billing.ts). Use whoami_can instead if here turns out to be the wrong tool, and say why in the pull. No new tool.
  • [x] Someone who is not an admin, or a forge with no plan notice, gets no plan key.
  • [x] docs/MCP.md says it in one line. A test covers the admin, the non-admin and the forge with no plan. bun test test/mcp-size.test.ts passes and no ceiling is raised.

Files: src/http/mcp/tools/here.ts (or whoami_can.ts), docs/MCP.md, a test.

commented

Reviewed pull #11424 at its head: ticked The here tool, on the settings page or with no page, carries plan for an admin of this forge. plan holds the text planLine returns in src/web/plan_row.ts and, when one is set, the manage-billing address (getPortalUrl in src/settings/billing.ts). Use whoami_can instead if here turns out to be the wrong tool, and say why in the pull. No new tool.; Someone who is not an admin, or a forge with no plan notice, gets no plan key.; docs/MCP.md says it in one line. A test covers the admin, the non-admin and the forge with no plan. bun test test/mcp-size.test.ts passes and no ceiling is raised..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs