Version
DESTRUCTIVE

delete_plan

Soft-delete a plan so it leaves the portal, the bot and every list. Existing subscriptions run to their end. Refused while pass holders have windows ahead.

Retire a plan for good. The row is soft-deleted: it disappears from the portal, the bot and every list, nobody can buy it again, and the subscriptions already sold keep their history and keep running to their end. Emits plan.deleted with a snapshot taken before the row goes.

Confirm the target with a human

Deletion cannot be undone from the API. The tool is annotated destructive so a client can prompt for confirmation; read the plan back with get_plan and confirm the plan_id before calling.

A pass plan with windows still to run is refused

Deleting a pass plan would cascade away access windows customers have paid for. While any holder has a window that has not run yet, the service refuses with VALIDATION_FAILED. Call publish_plan with active: false instead: new sales stop while the purchased windows still open on schedule. Delete once the last of them has closed.

Idempotent: a second call on the same id finds nothing and answers RESOURCE_NOT_FOUND, exactly as an unknown or out-of-scope id does.

The token behind the MCP session must hold it, or the call is refused with TOKEN_MISSING_ABILITY.

The REST endpoint and this tool share one action, so validation, permissions and events are identical.

Fires one event

Delivered to every endpoint subscribed to it once the change is made.

Annotations

DestructiveIdempotent

A client that honours annotations asks a person before running it. Sending the same arguments twice changes nothing the second time.

Arguments

plan_id*string

UUID of the plan to delete.

What it returns

{  "data": {    "id": "c4e82f16-93a7-4d5b-b81c-6e0f27a94d3b",    "deleted": true  }}

id echoes the argument as sent.

How it fails

VALIDATION_FAILED

a pass plan whose customers still hold access windows that have not run

RESOURCE_NOT_FOUND

unknown plan_id, a plan on another team's project, one outside the

AUTHENTICATION_REQUIRED

no authenticated user on the request.

TOKEN_MISSING_ABILITY

token lacks project-subscription-plan:delete.

How is this guide?

Last updated on