Trigger.dev MCP by usefulapi

v1.41.1
io.usefulapi/trigger-dev Checked 2 days ago Published 1 day ago

Debug background jobs — runs, traces, spans, schedules, queues and deployments.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

trigger_list_runs List runs

List task runs, filtered by status, task, tag, queue, schedule or a time window. This is the main read for 'what ran, and what failed?'. Trigger.dev: GET /api/v1/runs.

ParameterTypeDescription
afterstringCursor from the previous page's pagination. Omit for the first page.
batchstringOnly runs in this batch.
fromstringEpoch milliseconds lower bound on creation time.
isTestbooleanOnly test runs, or only real ones.
machinearrayOnly runs on these machine presets.
pageSizeintegerPage size, 1-100.
periodstringRelative window, e.g. "1h", "24h", "7d".
queuearrayOnly runs on these queues.
schedulestringOnly runs created by this schedule.
statusarrayOnly runs in these states, e.g. ["FAILED","CRASHED"]. Others include PENDING, EXECUTING, COMPLETED, CANCELED, TIMED_OUT.
tagarrayOnly runs carrying these tags.
taskIdentifierarrayOnly runs of these task ids.
tostringEpoch milliseconds upper bound on creation time.
versionstringOnly runs of this deployment version.

trigger_get_run Get one run

Fetch a single run's outcome — its status, output, error and attempts. Trigger.dev: GET /api/v1/runs/{runId}/result.

ParameterTypeDescription
run_id *stringThe run's id (run_...).

trigger_get_run_trace Get a run's trace

Fetch the full execution trace of a run — every span, with timings and nesting. The tool for 'where did this run spend its time, and where did it break?'. Trigger.dev: GET /api/v1/runs/{runId}/trace.

ParameterTypeDescription
run_id *stringThe run's id.

trigger_get_run_span Get one span of a run

Fetch a single span from a run's trace, with its own logs and attributes. Trigger.dev: GET /api/v1/runs/{runId}/spans/{spanId}.

ParameterTypeDescription
run_id *stringThe run's id.
span_id *stringThe span's id, from the trace.

trigger_list_run_events List a run's events

List the lifecycle events of one run — queued, dequeued, started, retried, completed. Trigger.dev: GET /api/v1/runs/{runId}/events.

ParameterTypeDescription
run_id *stringThe run's id.

trigger_get_run_metadata Get a run's metadata

Fetch the mutable metadata a run has written about itself — progress, checkpoints and custom state. Trigger.dev: GET /api/v1/runs/{runId}/metadata.

ParameterTypeDescription
run_id *stringThe run's id.

trigger_get_batch_results Get a batch's results

Fetch the outcome of every run in a batch. Trigger.dev: GET /api/v1/batches/{batchId}/results.

ParameterTypeDescription
batch_id *stringThe batch's id (batch_...).

trigger_list_schedules List schedules

List the cron schedules configured for tasks, with their next run times. Trigger.dev: GET /api/v1/schedules.

ParameterTypeDescription
pageinteger1-based page number.
pageSizeintegerPage size, 1-100.

trigger_get_schedule Get one schedule

Fetch a single schedule with its cron expression, timezone and active state. Trigger.dev: GET /api/v1/schedules/{scheduleId}.

ParameterTypeDescription
schedule_id *stringThe schedule's id (sched_...).

trigger_list_queues List queues

List task queues with their concurrency limits and current depth — where you look when work is backing up. Trigger.dev: GET /api/v1/queues.

ParameterTypeDescription
pageSizeintegerPage size, 1-100.

trigger_get_queue Get one queue

Fetch a single queue's concurrency limit, running count and queued count. Trigger.dev: GET /api/v1/queues/{queue}.

ParameterTypeDescription
queue *stringThe queue's name or id.

trigger_get_current_deployment Get the current deployment

Fetch the deployment currently serving the key's environment — its version, git ref and status. Trigger.dev: GET /api/v1/deployments/current.

trigger_list_env_vars List environment variables

List the environment variables configured for a project environment. Values may be redacted depending on the key's permissions. READ ONLY — this server exposes no env-var writes. Trigger.dev: GET /api/v1/projects/{projectRef}/envvars/{env}.

ParameterTypeDescription
environment *stringWhich environment's variables to list.
project_ref *stringThe project reference (proj_...).

trigger_list_waitpoint_tokens List waitpoint tokens

List outstanding waitpoint tokens — runs paused waiting for an external signal. Trigger.dev: GET /api/v1/waitpoints/tokens.

ParameterTypeDescription
afterstringCursor from the previous page's pagination. Omit for the first page.
pageSizeintegerPage size, 1-100.

trigger_list_bulk_actions List bulk actions

List bulk replay and cancel operations and their progress. Trigger.dev: GET /api/v1/bulk-actions.

ParameterTypeDescription
pageSizeintegerPage size, 1-100.

trigger_cancel_run Cancel a run

Cancel an in-flight run. Note this is the one endpoint on API v2, not v1. Trigger.dev: POST /api/v2/runs/{runId}/cancel.

ParameterTypeDescription
run_id *stringThe run to cancel.

trigger_replay_run Replay a run

Re-run one specific past run with the same payload. This EXECUTES your production task again — the same side effects it had the first time. Trigger.dev: POST /api/v1/runs/{runId}/replay.

ParameterTypeDescription
run_id *stringThe run to replay.

trigger_reschedule_run Reschedule a delayed run

Change when a delayed run will execute. Only applies to runs that have not started. Trigger.dev: POST /api/v1/runs/{runId}/reschedule.

ParameterTypeDescription
delay *stringNew delay or timestamp, e.g. "1h" or an ISO-8601 datetime.
run_id *stringThe delayed run to move.

trigger_add_run_tags Add tags to a run

Attach tags to a run so you can filter for it later. Additive and safe. Trigger.dev: POST /api/v1/runs/{runId}/tags.

ParameterTypeDescription
run_id *stringThe run to tag.
tags *arrayTags to add.

trigger_activate_schedule Activate a schedule

Resume a paused schedule so it fires again. Trigger.dev: POST /api/v1/schedules/{scheduleId}/activate.

ParameterTypeDescription
schedule_id *stringThe schedule to activate.

trigger_deactivate_schedule Deactivate a schedule

Pause a schedule so it stops firing. The usual first move when a scheduled task is misbehaving. Trigger.dev: POST /api/v1/schedules/{scheduleId}/deactivate.

ParameterTypeDescription
schedule_id *stringThe schedule to pause.

trigger_pause_queue Pause or resume a queue

Pause a queue so its runs stop being dequeued, or resume it. The containment move when a task is failing in a loop. Trigger.dev: POST /api/v1/queues/{queue}/pause.

ParameterTypeDescription
paused *booleantrue to pause, false to resume.
queue *stringThe queue's name or id.