update_trigger
Update a trigger's mutable fields like name, description, and event type. For immutable fields like token or chain, delete and recreate the trigger.
Instructions
Updates a trigger: PATCH /api/v1/projects/:projectId/triggers/:triggerId. Partial body matching UpdateTriggerDto (name, description, event_type, expressions, payable, ref, contract_ids as single-element array, etc.). Does NOT update context fields such as token_address or chain_id — those are immutable after create. If the user asks to change token_address, chain_id, or the tracked token/contract: do NOT call PATCH. First inform the user clearly: "This cannot be updated in place; you must delete the trigger and create a new one with the new token/chain." Then, only with explicit user approval, run the replace flow: 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. Never skip step 1 — always list linked conversions before delete_trigger. At least one patch field required for allowed fields only. dry_run then confirmed. Prefer get_project for current draft_trigger_id by ref. 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 | ||
| name | No | ||
| description | No | ||
| event_type | No | ||
| condition_expression | No | ||
| amount_expression | No | ||
| volume_expression | No | ||
| revenue_expression | No | ||
| currency_expression | No | ||
| volume_currency_expression | No | ||
| revenue_currency_expression | No | ||
| end_user_identifier_property | No | ||
| end_user_identifier_expression | No | ||
| payable | No | ||
| ref | No | ||
| contract_ids | No | Exactly one contract UUID when updating on-chain contract event triggers. |