Version
DESTRUCTIVE

delete_referral_program

Remove a project's Referral Program. Destructive; refused while any affiliate is still owed a commission. Emits nothing.

Remove the programme a project runs. The shared Action refuses while any affiliate is still owed a commission, because deleting would strand money the creator promised; record their payouts with record_referral_payout first, or call deactivate_referral_program, which stops the programme and keeps everything.

Destructive — confirm with a human first

Confirm the target project_id with the creator before calling. Deleting emits no event, so nothing downstream is told.

Idempotent: a project with no programme answers RESOURCE_NOT_FOUND, exactly as an unknown or out-of-scope project does.

Requires ability

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.

Annotations

DestructiveIdempotent

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

Arguments

project_id*string

UUID of the project whose Referral Program to remove.

What it returns

{  "data": {    "project_id": "7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13",    "deleted": true  }}

How it fails

VALIDATION_FAILED

affiliates are still owed commissions, or the caller's role lacks the team's

RESOURCE_NOT_FOUND

unknown project_id, a project on another team, one outside the token's

AUTHENTICATION_REQUIRED

no authenticated user on the request.

TOKEN_MISSING_ABILITY

token lacks project-referral:delete.

How is this guide?

Last updated on