delete_trigger
Delete a draft trigger with dry-run validation and user confirmation. Ensures linked conversions are removed before deletion.
Instructions
Deletes a draft trigger: DELETE /api/v1/projects/:projectId/triggers/:triggerId. Pass draft_trigger_id or a published_trigger_id (post-publish remap). Requires dry_run then confirmed. Never call without explicit user approval. Before delete: ensure no incentives still link this trigger (delete_incentive first). Replace-trigger flow (token/chain change; after telling the user update_trigger cannot change token_address/chain_id): (1) get_project or list_incentives — list every incentive/conversion whose triggers[] includes this draft_trigger_id; (2) delete_conversion for each draft_conversion_id (removes conversion + trigger links); (3) delete_trigger; (4) create_trigger with the new context; (5) create_incentive if the program must be recreated. Do not call delete_trigger until step 2 is done for all linked conversions. If delete still returns HTTP 422, report remaining links and stop — do not retry delete_trigger blindly. Before executing (including dry_run), this tool refreshes project metadata (same as get_project) and resolves trigger_id / conversion_id / trigger_ids[] to the current draft UUIDs. If you pass a published_trigger_id from before a dashboard publish, it is remapped to the current draft_trigger_id for the same ref. Responses include _draft_id_resolution when an ID was remapped. Unknown stale UUIDs fail with an explicit error. On successful execution (not dry_run), the response includes _publish_metadata_reminder: publish project metadata from the dashboard (Project → Incentives or Triggers → Publish now). The MCP cannot publish for you.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | If true, validate and return a preview only; no server mutation. | |
| confirmed | No | Must be true to perform the mutation after reviewing dry_run output. | |
| project_id | Yes | ||
| trigger_id | Yes | Draft trigger UUID (draft_trigger_id from get_project or get_incentive triggers[]). |