---
title: Trigger.dev
description: Trigger tasks and manage runs and schedules
---

import { BlockInfoCard } from "@/components/ui/block-info-card"

<BlockInfoCard 
  type="trigger_dev"
  color="#000000"
/>

{/* MANUAL-CONTENT-START:intro */}
[Trigger.dev](https://trigger.dev/) is an open-source platform for running background jobs and AI workloads. You write tasks in plain TypeScript, deploy them to Trigger.dev, and get durable runs with automatic retries, queues, cron schedules, and full observability — no servers or infrastructure to manage.

With Trigger.dev, you can:

- **Trigger tasks on demand**: Start a background task with any JSON payload and get back a run ID to track it
- **Batch trigger at scale**: Kick off up to 1,000 runs of a task in a single request
- **Track and control runs**: Retrieve a run's status, payload, output, and attempts; list and filter runs; cancel, replay, or reschedule them
- **Run tasks on a schedule**: Create, update, activate, and deactivate cron schedules with timezone support
- **Manage environment variables**: List, create, read, update, and delete env vars across dev, staging, and prod
- **Control queues**: Inspect queue depth and concurrency, and pause or resume queues during incidents

In Sim, the Trigger.dev integration lets your agents drive this entire lifecycle. An agent can trigger a deployed task with a payload, poll the run until it completes and use its output downstream, monitor for failed runs and replay the transient ones, manage per-customer cron schedules, and pause a queue when something goes wrong. Connect it with a project-scoped secret API key (starts with `tr_`) — the key determines which environment the runs, schedules, and queues belong to. This makes Sim a natural control plane for the background jobs that power your product.

Note: the environment variable operations (List Env Vars, Get Env Var) return variable values in plaintext, and those values appear in workflow outputs and run history. Scope workflows that read environment variables carefully.
{/* MANUAL-CONTENT-END */}


## Usage Instructions

Integrate Trigger.dev into the workflow. Trigger and batch trigger background tasks, retrieve and control runs (cancel, replay, reschedule, tags, metadata, events, traces), manage cron schedules, environment variables, queues, deployments, and waitpoint tokens, and query run data with TRQL.



## Actions

### `trigger_dev_trigger_task`

Trigger a Trigger.dev task by its identifier with an optional JSON payload. Returns the ID of the created run.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `taskIdentifier` | string | Yes | Identifier of the task to trigger \(e.g., "send-welcome-email"\) |
| `payload` | json | No | JSON payload passed to the task run. Example: \{"userId": "user_123"\} |
| `idempotencyKey` | string | No | Idempotency key that ensures the task is only triggered once per key |
| `queue` | string | No | Name of the queue to run the task on |
| `concurrencyKey` | string | No | Key that scopes the queue concurrency limit \(e.g., a user ID\) |
| `delay` | string | No | Delay before the run executes, as a duration \("30m", "1h", "2d"\) or an ISO 8601 date |
| `ttl` | string | No | Time-to-live before an unstarted run expires, as a duration \("1h42m"\) or seconds |
| `machine` | string | No | Machine preset for the run: micro, small-1x, small-2x, medium-1x, medium-2x, large-1x, or large-2x |
| `tags` | string | No | Comma-separated tags to attach to the run \(max 10, each under 128 characters\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | ID of the run that was triggered \(starts with run_\) |

### `trigger_dev_batch_trigger_task`

Batch trigger a Trigger.dev task with up to 1,000 payloads. All items in the batch run the same task. Returns the batch ID and the created run IDs.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `taskIdentifier` | string | Yes | Identifier of the task to batch trigger \(e.g., "send-welcome-email"\) |
| `items` | json | Yes | JSON array of batch items \(max 1,000\). Each item is an object with a "payload" and optional "options" \(queue, concurrencyKey, idempotencyKey, ttl, delay, tags, machine\). Example: \[\{"payload": \{"userId": "user_1"\}\}, \{"payload": \{"userId": "user_2"\}, "options": \{"delay": "1h"\}\}\] |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `batchId` | string | ID of the batch that was triggered |
| `runIds` | array | IDs of the runs created by the batch |

### `trigger_dev_get_batch`

Retrieve a Trigger.dev batch by its ID, including its status, run IDs, and success and failure counts.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `batchId` | string | Yes | ID of the batch to retrieve \(starts with batch_\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | ID of the batch \(starts with batch_\) |
| `status` | string | Batch status \(PENDING, PROCESSING, COMPLETED, PARTIAL_FAILED, or ABORTED\) |
| `idempotencyKey` | string | Idempotency key provided when triggering the batch |
| `createdAt` | string | ISO timestamp when the batch was created |
| `updatedAt` | string | ISO timestamp when the batch was last updated |
| `runCount` | number | Total number of runs in the batch |
| `runIds` | array | IDs of the runs in the batch |
| `successfulRunCount` | number | Number of successful runs, populated after completion |
| `failedRunCount` | number | Number of failed runs, populated after completion |
| `errors` | array | Error details for failed items, present for PARTIAL_FAILED batches |
|   ↳ `index` | number | Index of the failed item |
|   ↳ `taskIdentifier` | string | Task identifier of the failed item |
|   ↳ `error` | json | Error details |
|   ↳ `errorCode` | string | Optional error code |

### `trigger_dev_get_batch_results`

Retrieve the execution results of every run in a Trigger.dev batch, including outputs and error details.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `batchId` | string | Yes | ID of the batch to retrieve results for \(starts with batch_\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | ID of the batch \(starts with batch_\) |
| `items` | array | Execution results for each run in the batch |

### `trigger_dev_get_run`

Retrieve a Trigger.dev run by its ID, including status, payload, output, attempts, and timing details.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `runId` | string | Yes | ID of the run to retrieve \(starts with run_\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Run, schedule, or queue ID |
| `batchId` | string | Batch ID \(Batch Trigger Task\) |
| `runIds` | json | Run IDs in the batch \(batch operations\) |
| `runCount` | number | Total number of runs in the batch \(Get Batch\) |
| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) |
| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) |
| `errors` | json | Error details for failed batch items \(Get Batch\) |
| `items` | json | Execution results for each run in the batch \(Get Batch Results\) |
| `status` | string | Run status \(Get Run\) |
| `taskIdentifier` | string | Task identifier of the run \(Get Run\) |
| `createdAt` | string | When the run was created \(Get Run\) |
| `startedAt` | string | When the run started \(Get Run\) |
| `finishedAt` | string | When the run finished \(Get Run\) |
| `durationMs` | number | Compute duration in milliseconds \(Get Run\) |
| `costInCents` | number | Compute cost in cents \(Get Run\) |
| `isTest` | boolean | Whether the run is a test run \(Get Run\) |
| `tags` | json | Tags attached to the run \(Get Run\) |
| `payload` | json | Payload the run was triggered with \(Get Run\) |
| `output` | json | Output returned by the run \(Get Run\) |
| `attempts` | json | Attempts made for the run \(Get Run\) |
| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) |
| `ok` | boolean | Whether the run succeeded \(Get Run Result\) |
| `outputType` | string | Content type of the run output \(Get Run Result\) |
| `error` | json | Error details for a failed run \(Get Run Result\) |
| `message` | string | Confirmation message \(Add Run Tags\) |
| `events` | json | Log and span events of the run \(Get Run Events\) |
| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) |
| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) |
| `runs` | json | Runs matching the filters \(List Runs\) |
| `schedules` | json | Schedules in the project \(List Schedules\) |
| `pagination` | json | Pagination details \(list operations\) |
| `task` | string | Task the schedule triggers \(schedule operations\) |
| `active` | boolean | Whether the schedule is active \(schedule operations\) |
| `cron` | string | Cron expression \(schedule operations\) |
| `cronDescription` | string | Human-readable cron description \(schedule operations\) |
| `timezone` | string | Timezone of the schedule \(schedule operations\) |
| `nextRun` | string | Next scheduled run time \(schedule operations\) |
| `environments` | json | Environments the schedule runs in \(schedule operations\) |
| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) |
| `variables` | json | Environment variables in the project environment \(List Env Vars\) |
| `name` | string | Environment variable or queue name \(env var and queue operations\) |
| `value` | string | Value of the environment variable \(Get Env Var\) |
| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) |
| `count` | number | Number of environment variables submitted \(Import Env Vars\) |
| `queues` | json | Queues in the environment \(List Queues\) |
| `running` | number | Runs currently executing \(queue operations\) |
| `queued` | number | Runs waiting in the queue \(queue operations\) |
| `paused` | boolean | Whether the queue is paused \(queue operations\) |
| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) |
| `concurrency` | json | Concurrency details of the queue \(queue operations\) |
| `deployments` | json | Deployments matching the filters \(List Deployments\) |
| `version` | string | Deployment version \(deployment operations\) |
| `shortCode` | string | Deployment short code \(deployment operations\) |
| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) |
| `format` | string | Format of the query results \(Execute Query\) |
| `results` | json | Query results \(Execute Query\) |
| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) |
| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) |
| `url` | string | Waitpoint callback URL \(waitpoint operations\) |
| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) |
| `timezones` | json | Supported IANA timezones \(List Timezones\) |

### `trigger_dev_get_run_result`

Retrieve the result of a Trigger.dev run: whether it succeeded, its output, and error details. Lighter than Get Run when only the outcome is needed.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `runId` | string | Yes | ID of the run to retrieve the result for \(starts with run_\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Run, schedule, or queue ID |
| `batchId` | string | Batch ID \(Batch Trigger Task\) |
| `runIds` | json | Run IDs in the batch \(batch operations\) |
| `runCount` | number | Total number of runs in the batch \(Get Batch\) |
| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) |
| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) |
| `errors` | json | Error details for failed batch items \(Get Batch\) |
| `items` | json | Execution results for each run in the batch \(Get Batch Results\) |
| `status` | string | Run status \(Get Run\) |
| `taskIdentifier` | string | Task identifier of the run \(Get Run\) |
| `createdAt` | string | When the run was created \(Get Run\) |
| `startedAt` | string | When the run started \(Get Run\) |
| `finishedAt` | string | When the run finished \(Get Run\) |
| `durationMs` | number | Compute duration in milliseconds \(Get Run\) |
| `costInCents` | number | Compute cost in cents \(Get Run\) |
| `isTest` | boolean | Whether the run is a test run \(Get Run\) |
| `tags` | json | Tags attached to the run \(Get Run\) |
| `payload` | json | Payload the run was triggered with \(Get Run\) |
| `output` | json | Output returned by the run \(Get Run\) |
| `attempts` | json | Attempts made for the run \(Get Run\) |
| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) |
| `ok` | boolean | Whether the run succeeded \(Get Run Result\) |
| `outputType` | string | Content type of the run output \(Get Run Result\) |
| `error` | json | Error details for a failed run \(Get Run Result\) |
| `message` | string | Confirmation message \(Add Run Tags\) |
| `events` | json | Log and span events of the run \(Get Run Events\) |
| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) |
| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) |
| `runs` | json | Runs matching the filters \(List Runs\) |
| `schedules` | json | Schedules in the project \(List Schedules\) |
| `pagination` | json | Pagination details \(list operations\) |
| `task` | string | Task the schedule triggers \(schedule operations\) |
| `active` | boolean | Whether the schedule is active \(schedule operations\) |
| `cron` | string | Cron expression \(schedule operations\) |
| `cronDescription` | string | Human-readable cron description \(schedule operations\) |
| `timezone` | string | Timezone of the schedule \(schedule operations\) |
| `nextRun` | string | Next scheduled run time \(schedule operations\) |
| `environments` | json | Environments the schedule runs in \(schedule operations\) |
| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) |
| `variables` | json | Environment variables in the project environment \(List Env Vars\) |
| `name` | string | Environment variable or queue name \(env var and queue operations\) |
| `value` | string | Value of the environment variable \(Get Env Var\) |
| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) |
| `count` | number | Number of environment variables submitted \(Import Env Vars\) |
| `queues` | json | Queues in the environment \(List Queues\) |
| `running` | number | Runs currently executing \(queue operations\) |
| `queued` | number | Runs waiting in the queue \(queue operations\) |
| `paused` | boolean | Whether the queue is paused \(queue operations\) |
| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) |
| `concurrency` | json | Concurrency details of the queue \(queue operations\) |
| `deployments` | json | Deployments matching the filters \(List Deployments\) |
| `version` | string | Deployment version \(deployment operations\) |
| `shortCode` | string | Deployment short code \(deployment operations\) |
| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) |
| `format` | string | Format of the query results \(Execute Query\) |
| `results` | json | Query results \(Execute Query\) |
| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) |
| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) |
| `url` | string | Waitpoint callback URL \(waitpoint operations\) |
| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) |
| `timezones` | json | Supported IANA timezones \(List Timezones\) |

### `trigger_dev_get_run_events`

Retrieve the log and span events of a Trigger.dev run, including messages, levels, durations, and error events.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `runId` | string | Yes | ID of the run to retrieve events for \(starts with run_\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `events` | array | Log and span events recorded during the run |
|   ↳ `spanId` | string | Span ID of the event |
|   ↳ `parentId` | string | Parent span ID |
|   ↳ `runId` | string | Run ID associated with the event |
|   ↳ `message` | string | Event message |
|   ↳ `startTime` | string | Start time as a bigint string \(nanoseconds since epoch\) |
|   ↳ `duration` | number | Duration of the event in nanoseconds |
|   ↳ `isError` | boolean | Whether the event represents an error |
|   ↳ `isPartial` | boolean | Whether the event is still in progress |
|   ↳ `isCancelled` | boolean | Whether the event was cancelled |
|   ↳ `level` | string | Log level \(TRACE, DEBUG, LOG, INFO, WARN, or ERROR\) |
|   ↳ `kind` | string | Kind of span event |
|   ↳ `attemptNumber` | number | Attempt number the event belongs to |
|   ↳ `taskSlug` | string | Task identifier |
|   ↳ `events` | array | Span events \(e.g., exceptions\) that occurred during this event |
|     ↳ `name` | string | Event name |
|     ↳ `time` | string | When the event occurred |

### `trigger_dev_get_run_trace`

Retrieve the OpenTelemetry trace of a Trigger.dev run as a tree of spans with timing, errors, and nested children.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `runId` | string | Yes | ID of the run to retrieve the trace for \(starts with run_\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `traceId` | string | OpenTelemetry trace ID of the run |
| `rootSpan` | json | Root span of the trace; each span has id, parentId, runId, data \(message, taskSlug, startTime, duration, isError, level, events\), and recursively nested children spans |

### `trigger_dev_list_runs`

List Trigger.dev runs in the environment of the API key, with optional filters for status, task, version, tags, schedule, and creation time.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `status` | string | No | Comma-separated run statuses to filter by: PENDING_VERSION, DELAYED, QUEUED, EXECUTING, REATTEMPTING, FROZEN, COMPLETED, CANCELED, FAILED, CRASHED, INTERRUPTED, SYSTEM_FAILURE |
| `taskIdentifier` | string | No | Comma-separated task identifiers to filter by |
| `version` | string | No | Comma-separated worker versions to filter by \(e.g., "20240101.1"\) |
| `tag` | string | No | Comma-separated tags to filter by |
| `schedule` | string | No | Schedule ID to filter by \(starts with sched_\) |
| `isTest` | string | No | Filter by test runs: "true" for only test runs, "false" to exclude them |
| `period` | string | No | Only return runs created in the given period \(e.g., "1h", "7d"\) |
| `from` | string | No | Only return runs created on or after this ISO 8601 timestamp |
| `to` | string | No | Only return runs created on or before this ISO 8601 timestamp |
| `pageSize` | number | No | Number of runs per page \(max 100, default 25\) |
| `pageAfter` | string | No | Run ID to start the page after, for forward pagination |
| `pageBefore` | string | No | Run ID to start the page before, for backward pagination |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `runs` | array | Runs matching the filters |
| `pagination` | object | Cursor pagination details |
|   ↳ `next` | string | Run ID to start the next page after |
|   ↳ `previous` | string | Run ID to start the previous page before |

### `trigger_dev_cancel_run`

Cancel an in-progress Trigger.dev run. Has no effect if the run is already completed.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `runId` | string | Yes | ID of the run to cancel \(starts with run_\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | ID of the run that was canceled |

### `trigger_dev_replay_run`

Replay a Trigger.dev run, creating a new run with the same payload and options as the original.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `runId` | string | Yes | ID of the run to replay \(starts with run_\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | ID of the new run created by the replay |

### `trigger_dev_reschedule_run`

Reschedule a delayed Trigger.dev run with a new delay. Only valid while the run is in the DELAYED state.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `runId` | string | Yes | ID of the delayed run to reschedule \(starts with run_\) |
| `delay` | string | Yes | New delay for the run, as a duration \("30m", "1h", "2d"\) or an ISO 8601 date to delay until |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Run, schedule, or queue ID |
| `batchId` | string | Batch ID \(Batch Trigger Task\) |
| `runIds` | json | Run IDs in the batch \(batch operations\) |
| `runCount` | number | Total number of runs in the batch \(Get Batch\) |
| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) |
| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) |
| `errors` | json | Error details for failed batch items \(Get Batch\) |
| `items` | json | Execution results for each run in the batch \(Get Batch Results\) |
| `status` | string | Run status \(Get Run\) |
| `taskIdentifier` | string | Task identifier of the run \(Get Run\) |
| `createdAt` | string | When the run was created \(Get Run\) |
| `startedAt` | string | When the run started \(Get Run\) |
| `finishedAt` | string | When the run finished \(Get Run\) |
| `durationMs` | number | Compute duration in milliseconds \(Get Run\) |
| `costInCents` | number | Compute cost in cents \(Get Run\) |
| `isTest` | boolean | Whether the run is a test run \(Get Run\) |
| `tags` | json | Tags attached to the run \(Get Run\) |
| `payload` | json | Payload the run was triggered with \(Get Run\) |
| `output` | json | Output returned by the run \(Get Run\) |
| `attempts` | json | Attempts made for the run \(Get Run\) |
| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) |
| `ok` | boolean | Whether the run succeeded \(Get Run Result\) |
| `outputType` | string | Content type of the run output \(Get Run Result\) |
| `error` | json | Error details for a failed run \(Get Run Result\) |
| `message` | string | Confirmation message \(Add Run Tags\) |
| `events` | json | Log and span events of the run \(Get Run Events\) |
| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) |
| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) |
| `runs` | json | Runs matching the filters \(List Runs\) |
| `schedules` | json | Schedules in the project \(List Schedules\) |
| `pagination` | json | Pagination details \(list operations\) |
| `task` | string | Task the schedule triggers \(schedule operations\) |
| `active` | boolean | Whether the schedule is active \(schedule operations\) |
| `cron` | string | Cron expression \(schedule operations\) |
| `cronDescription` | string | Human-readable cron description \(schedule operations\) |
| `timezone` | string | Timezone of the schedule \(schedule operations\) |
| `nextRun` | string | Next scheduled run time \(schedule operations\) |
| `environments` | json | Environments the schedule runs in \(schedule operations\) |
| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) |
| `variables` | json | Environment variables in the project environment \(List Env Vars\) |
| `name` | string | Environment variable or queue name \(env var and queue operations\) |
| `value` | string | Value of the environment variable \(Get Env Var\) |
| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) |
| `count` | number | Number of environment variables submitted \(Import Env Vars\) |
| `queues` | json | Queues in the environment \(List Queues\) |
| `running` | number | Runs currently executing \(queue operations\) |
| `queued` | number | Runs waiting in the queue \(queue operations\) |
| `paused` | boolean | Whether the queue is paused \(queue operations\) |
| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) |
| `concurrency` | json | Concurrency details of the queue \(queue operations\) |
| `deployments` | json | Deployments matching the filters \(List Deployments\) |
| `version` | string | Deployment version \(deployment operations\) |
| `shortCode` | string | Deployment short code \(deployment operations\) |
| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) |
| `format` | string | Format of the query results \(Execute Query\) |
| `results` | json | Query results \(Execute Query\) |
| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) |
| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) |
| `url` | string | Waitpoint callback URL \(waitpoint operations\) |
| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) |
| `timezones` | json | Supported IANA timezones \(List Timezones\) |

### `trigger_dev_add_run_tags`

Add tags to an existing Trigger.dev run. Runs can have up to 10 tags.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `runId` | string | Yes | ID of the run to tag \(starts with run_\) |
| `tags` | string | Yes | Comma-separated tags to add to the run \(max 10 total, each under 128 characters\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Confirmation message for the added tags |

### `trigger_dev_update_run_metadata`

Replace the metadata of a Trigger.dev run with a new JSON object.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `runId` | string | Yes | ID of the run to update \(starts with run_\) |
| `metadata` | json | Yes | JSON object to set as the run metadata. Example: \{"stage": "approved"\} |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `metadata` | json | The updated metadata of the run |

### `trigger_dev_create_schedule`

Create an imperative cron schedule that triggers a Trigger.dev task on a recurring basis.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `task` | string | Yes | Identifier of the task to schedule \(e.g., "daily-report"\) |
| `cron` | string | Yes | Cron expression defining when the task runs \(e.g., "0 0 * * *"\) |
| `timezone` | string | No | IANA timezone the cron expression is evaluated in \(e.g., "America/New_York"\). Defaults to UTC |
| `externalId` | string | No | External identifier to associate with the schedule \(e.g., a user ID\) |
| `deduplicationKey` | string | Yes | Key that prevents duplicate schedules; creating again with the same key updates the existing schedule |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Run, schedule, or queue ID |
| `batchId` | string | Batch ID \(Batch Trigger Task\) |
| `runIds` | json | Run IDs in the batch \(batch operations\) |
| `runCount` | number | Total number of runs in the batch \(Get Batch\) |
| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) |
| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) |
| `errors` | json | Error details for failed batch items \(Get Batch\) |
| `items` | json | Execution results for each run in the batch \(Get Batch Results\) |
| `status` | string | Run status \(Get Run\) |
| `taskIdentifier` | string | Task identifier of the run \(Get Run\) |
| `createdAt` | string | When the run was created \(Get Run\) |
| `startedAt` | string | When the run started \(Get Run\) |
| `finishedAt` | string | When the run finished \(Get Run\) |
| `durationMs` | number | Compute duration in milliseconds \(Get Run\) |
| `costInCents` | number | Compute cost in cents \(Get Run\) |
| `isTest` | boolean | Whether the run is a test run \(Get Run\) |
| `tags` | json | Tags attached to the run \(Get Run\) |
| `payload` | json | Payload the run was triggered with \(Get Run\) |
| `output` | json | Output returned by the run \(Get Run\) |
| `attempts` | json | Attempts made for the run \(Get Run\) |
| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) |
| `ok` | boolean | Whether the run succeeded \(Get Run Result\) |
| `outputType` | string | Content type of the run output \(Get Run Result\) |
| `error` | json | Error details for a failed run \(Get Run Result\) |
| `message` | string | Confirmation message \(Add Run Tags\) |
| `events` | json | Log and span events of the run \(Get Run Events\) |
| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) |
| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) |
| `runs` | json | Runs matching the filters \(List Runs\) |
| `schedules` | json | Schedules in the project \(List Schedules\) |
| `pagination` | json | Pagination details \(list operations\) |
| `task` | string | Task the schedule triggers \(schedule operations\) |
| `active` | boolean | Whether the schedule is active \(schedule operations\) |
| `cron` | string | Cron expression \(schedule operations\) |
| `cronDescription` | string | Human-readable cron description \(schedule operations\) |
| `timezone` | string | Timezone of the schedule \(schedule operations\) |
| `nextRun` | string | Next scheduled run time \(schedule operations\) |
| `environments` | json | Environments the schedule runs in \(schedule operations\) |
| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) |
| `variables` | json | Environment variables in the project environment \(List Env Vars\) |
| `name` | string | Environment variable or queue name \(env var and queue operations\) |
| `value` | string | Value of the environment variable \(Get Env Var\) |
| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) |
| `count` | number | Number of environment variables submitted \(Import Env Vars\) |
| `queues` | json | Queues in the environment \(List Queues\) |
| `running` | number | Runs currently executing \(queue operations\) |
| `queued` | number | Runs waiting in the queue \(queue operations\) |
| `paused` | boolean | Whether the queue is paused \(queue operations\) |
| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) |
| `concurrency` | json | Concurrency details of the queue \(queue operations\) |
| `deployments` | json | Deployments matching the filters \(List Deployments\) |
| `version` | string | Deployment version \(deployment operations\) |
| `shortCode` | string | Deployment short code \(deployment operations\) |
| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) |
| `format` | string | Format of the query results \(Execute Query\) |
| `results` | json | Query results \(Execute Query\) |
| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) |
| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) |
| `url` | string | Waitpoint callback URL \(waitpoint operations\) |
| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) |
| `timezones` | json | Supported IANA timezones \(List Timezones\) |

### `trigger_dev_get_schedule`

Retrieve a Trigger.dev schedule by its ID.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `scheduleId` | string | Yes | ID of the schedule to retrieve \(starts with sched_\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Run, schedule, or queue ID |
| `batchId` | string | Batch ID \(Batch Trigger Task\) |
| `runIds` | json | Run IDs in the batch \(batch operations\) |
| `runCount` | number | Total number of runs in the batch \(Get Batch\) |
| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) |
| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) |
| `errors` | json | Error details for failed batch items \(Get Batch\) |
| `items` | json | Execution results for each run in the batch \(Get Batch Results\) |
| `status` | string | Run status \(Get Run\) |
| `taskIdentifier` | string | Task identifier of the run \(Get Run\) |
| `createdAt` | string | When the run was created \(Get Run\) |
| `startedAt` | string | When the run started \(Get Run\) |
| `finishedAt` | string | When the run finished \(Get Run\) |
| `durationMs` | number | Compute duration in milliseconds \(Get Run\) |
| `costInCents` | number | Compute cost in cents \(Get Run\) |
| `isTest` | boolean | Whether the run is a test run \(Get Run\) |
| `tags` | json | Tags attached to the run \(Get Run\) |
| `payload` | json | Payload the run was triggered with \(Get Run\) |
| `output` | json | Output returned by the run \(Get Run\) |
| `attempts` | json | Attempts made for the run \(Get Run\) |
| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) |
| `ok` | boolean | Whether the run succeeded \(Get Run Result\) |
| `outputType` | string | Content type of the run output \(Get Run Result\) |
| `error` | json | Error details for a failed run \(Get Run Result\) |
| `message` | string | Confirmation message \(Add Run Tags\) |
| `events` | json | Log and span events of the run \(Get Run Events\) |
| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) |
| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) |
| `runs` | json | Runs matching the filters \(List Runs\) |
| `schedules` | json | Schedules in the project \(List Schedules\) |
| `pagination` | json | Pagination details \(list operations\) |
| `task` | string | Task the schedule triggers \(schedule operations\) |
| `active` | boolean | Whether the schedule is active \(schedule operations\) |
| `cron` | string | Cron expression \(schedule operations\) |
| `cronDescription` | string | Human-readable cron description \(schedule operations\) |
| `timezone` | string | Timezone of the schedule \(schedule operations\) |
| `nextRun` | string | Next scheduled run time \(schedule operations\) |
| `environments` | json | Environments the schedule runs in \(schedule operations\) |
| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) |
| `variables` | json | Environment variables in the project environment \(List Env Vars\) |
| `name` | string | Environment variable or queue name \(env var and queue operations\) |
| `value` | string | Value of the environment variable \(Get Env Var\) |
| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) |
| `count` | number | Number of environment variables submitted \(Import Env Vars\) |
| `queues` | json | Queues in the environment \(List Queues\) |
| `running` | number | Runs currently executing \(queue operations\) |
| `queued` | number | Runs waiting in the queue \(queue operations\) |
| `paused` | boolean | Whether the queue is paused \(queue operations\) |
| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) |
| `concurrency` | json | Concurrency details of the queue \(queue operations\) |
| `deployments` | json | Deployments matching the filters \(List Deployments\) |
| `version` | string | Deployment version \(deployment operations\) |
| `shortCode` | string | Deployment short code \(deployment operations\) |
| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) |
| `format` | string | Format of the query results \(Execute Query\) |
| `results` | json | Query results \(Execute Query\) |
| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) |
| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) |
| `url` | string | Waitpoint callback URL \(waitpoint operations\) |
| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) |
| `timezones` | json | Supported IANA timezones \(List Timezones\) |

### `trigger_dev_list_schedules`

List Trigger.dev schedules in the project, with page-based pagination.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `page` | number | No | Page number to return \(default 1\) |
| `perPage` | number | No | Number of schedules per page |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `schedules` | array | Schedules in the project |
|   ↳ `id` | string | Unique ID of the schedule \(starts with sched_\) |
|   ↳ `task` | string | Identifier of the task the schedule triggers |
|   ↳ `type` | string | Schedule type \(DECLARATIVE or IMPERATIVE\) |
|   ↳ `active` | boolean | Whether the schedule is active |
|   ↳ `deduplicationKey` | string | Deduplication key of the schedule |
|   ↳ `externalId` | string | External ID associated with the schedule |
|   ↳ `cron` | string | Cron expression of the schedule |
|   ↳ `cronDescription` | string | Human-readable description of the cron expression |
|   ↳ `timezone` | string | IANA timezone of the schedule |
|   ↳ `nextRun` | string | ISO timestamp of the next scheduled run |
|   ↳ `environments` | array | Environments the schedule runs in |
|     ↳ `id` | string | Environment ID |
|     ↳ `type` | string | Environment type |
|     ↳ `userName` | string | Username for dev environments |
| `pagination` | object | Page-based pagination details |
|   ↳ `currentPage` | number | Current page number |
|   ↳ `totalPages` | number | Total number of pages |
|   ↳ `count` | number | Total number of schedules |

### `trigger_dev_update_schedule`

Update an imperative Trigger.dev schedule by its ID, replacing its task, cron expression, timezone, and external ID.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `scheduleId` | string | Yes | ID of the schedule to update \(starts with sched_\) |
| `task` | string | Yes | Identifier of the task the schedule triggers \(e.g., "daily-report"\) |
| `cron` | string | Yes | Cron expression defining when the task runs \(e.g., "0 0 * * *"\) |
| `timezone` | string | No | IANA timezone the cron expression is evaluated in \(e.g., "America/New_York"\). Defaults to UTC |
| `externalId` | string | No | External identifier to associate with the schedule \(e.g., a user ID\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Run, schedule, or queue ID |
| `batchId` | string | Batch ID \(Batch Trigger Task\) |
| `runIds` | json | Run IDs in the batch \(batch operations\) |
| `runCount` | number | Total number of runs in the batch \(Get Batch\) |
| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) |
| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) |
| `errors` | json | Error details for failed batch items \(Get Batch\) |
| `items` | json | Execution results for each run in the batch \(Get Batch Results\) |
| `status` | string | Run status \(Get Run\) |
| `taskIdentifier` | string | Task identifier of the run \(Get Run\) |
| `createdAt` | string | When the run was created \(Get Run\) |
| `startedAt` | string | When the run started \(Get Run\) |
| `finishedAt` | string | When the run finished \(Get Run\) |
| `durationMs` | number | Compute duration in milliseconds \(Get Run\) |
| `costInCents` | number | Compute cost in cents \(Get Run\) |
| `isTest` | boolean | Whether the run is a test run \(Get Run\) |
| `tags` | json | Tags attached to the run \(Get Run\) |
| `payload` | json | Payload the run was triggered with \(Get Run\) |
| `output` | json | Output returned by the run \(Get Run\) |
| `attempts` | json | Attempts made for the run \(Get Run\) |
| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) |
| `ok` | boolean | Whether the run succeeded \(Get Run Result\) |
| `outputType` | string | Content type of the run output \(Get Run Result\) |
| `error` | json | Error details for a failed run \(Get Run Result\) |
| `message` | string | Confirmation message \(Add Run Tags\) |
| `events` | json | Log and span events of the run \(Get Run Events\) |
| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) |
| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) |
| `runs` | json | Runs matching the filters \(List Runs\) |
| `schedules` | json | Schedules in the project \(List Schedules\) |
| `pagination` | json | Pagination details \(list operations\) |
| `task` | string | Task the schedule triggers \(schedule operations\) |
| `active` | boolean | Whether the schedule is active \(schedule operations\) |
| `cron` | string | Cron expression \(schedule operations\) |
| `cronDescription` | string | Human-readable cron description \(schedule operations\) |
| `timezone` | string | Timezone of the schedule \(schedule operations\) |
| `nextRun` | string | Next scheduled run time \(schedule operations\) |
| `environments` | json | Environments the schedule runs in \(schedule operations\) |
| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) |
| `variables` | json | Environment variables in the project environment \(List Env Vars\) |
| `name` | string | Environment variable or queue name \(env var and queue operations\) |
| `value` | string | Value of the environment variable \(Get Env Var\) |
| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) |
| `count` | number | Number of environment variables submitted \(Import Env Vars\) |
| `queues` | json | Queues in the environment \(List Queues\) |
| `running` | number | Runs currently executing \(queue operations\) |
| `queued` | number | Runs waiting in the queue \(queue operations\) |
| `paused` | boolean | Whether the queue is paused \(queue operations\) |
| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) |
| `concurrency` | json | Concurrency details of the queue \(queue operations\) |
| `deployments` | json | Deployments matching the filters \(List Deployments\) |
| `version` | string | Deployment version \(deployment operations\) |
| `shortCode` | string | Deployment short code \(deployment operations\) |
| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) |
| `format` | string | Format of the query results \(Execute Query\) |
| `results` | json | Query results \(Execute Query\) |
| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) |
| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) |
| `url` | string | Waitpoint callback URL \(waitpoint operations\) |
| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) |
| `timezones` | json | Supported IANA timezones \(List Timezones\) |

### `trigger_dev_delete_schedule`

Delete an imperative Trigger.dev schedule by its ID.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `scheduleId` | string | Yes | ID of the schedule to delete \(starts with sched_\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `deleted` | boolean | Whether the schedule was deleted |
| `scheduleId` | string | ID of the schedule that was deleted |

### `trigger_dev_activate_schedule`

Activate an imperative Trigger.dev schedule so it resumes triggering its task.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `scheduleId` | string | Yes | ID of the schedule to activate \(starts with sched_\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Run, schedule, or queue ID |
| `batchId` | string | Batch ID \(Batch Trigger Task\) |
| `runIds` | json | Run IDs in the batch \(batch operations\) |
| `runCount` | number | Total number of runs in the batch \(Get Batch\) |
| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) |
| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) |
| `errors` | json | Error details for failed batch items \(Get Batch\) |
| `items` | json | Execution results for each run in the batch \(Get Batch Results\) |
| `status` | string | Run status \(Get Run\) |
| `taskIdentifier` | string | Task identifier of the run \(Get Run\) |
| `createdAt` | string | When the run was created \(Get Run\) |
| `startedAt` | string | When the run started \(Get Run\) |
| `finishedAt` | string | When the run finished \(Get Run\) |
| `durationMs` | number | Compute duration in milliseconds \(Get Run\) |
| `costInCents` | number | Compute cost in cents \(Get Run\) |
| `isTest` | boolean | Whether the run is a test run \(Get Run\) |
| `tags` | json | Tags attached to the run \(Get Run\) |
| `payload` | json | Payload the run was triggered with \(Get Run\) |
| `output` | json | Output returned by the run \(Get Run\) |
| `attempts` | json | Attempts made for the run \(Get Run\) |
| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) |
| `ok` | boolean | Whether the run succeeded \(Get Run Result\) |
| `outputType` | string | Content type of the run output \(Get Run Result\) |
| `error` | json | Error details for a failed run \(Get Run Result\) |
| `message` | string | Confirmation message \(Add Run Tags\) |
| `events` | json | Log and span events of the run \(Get Run Events\) |
| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) |
| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) |
| `runs` | json | Runs matching the filters \(List Runs\) |
| `schedules` | json | Schedules in the project \(List Schedules\) |
| `pagination` | json | Pagination details \(list operations\) |
| `task` | string | Task the schedule triggers \(schedule operations\) |
| `active` | boolean | Whether the schedule is active \(schedule operations\) |
| `cron` | string | Cron expression \(schedule operations\) |
| `cronDescription` | string | Human-readable cron description \(schedule operations\) |
| `timezone` | string | Timezone of the schedule \(schedule operations\) |
| `nextRun` | string | Next scheduled run time \(schedule operations\) |
| `environments` | json | Environments the schedule runs in \(schedule operations\) |
| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) |
| `variables` | json | Environment variables in the project environment \(List Env Vars\) |
| `name` | string | Environment variable or queue name \(env var and queue operations\) |
| `value` | string | Value of the environment variable \(Get Env Var\) |
| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) |
| `count` | number | Number of environment variables submitted \(Import Env Vars\) |
| `queues` | json | Queues in the environment \(List Queues\) |
| `running` | number | Runs currently executing \(queue operations\) |
| `queued` | number | Runs waiting in the queue \(queue operations\) |
| `paused` | boolean | Whether the queue is paused \(queue operations\) |
| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) |
| `concurrency` | json | Concurrency details of the queue \(queue operations\) |
| `deployments` | json | Deployments matching the filters \(List Deployments\) |
| `version` | string | Deployment version \(deployment operations\) |
| `shortCode` | string | Deployment short code \(deployment operations\) |
| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) |
| `format` | string | Format of the query results \(Execute Query\) |
| `results` | json | Query results \(Execute Query\) |
| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) |
| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) |
| `url` | string | Waitpoint callback URL \(waitpoint operations\) |
| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) |
| `timezones` | json | Supported IANA timezones \(List Timezones\) |

### `trigger_dev_deactivate_schedule`

Deactivate an imperative Trigger.dev schedule so it stops triggering its task.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `scheduleId` | string | Yes | ID of the schedule to deactivate \(starts with sched_\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Run, schedule, or queue ID |
| `batchId` | string | Batch ID \(Batch Trigger Task\) |
| `runIds` | json | Run IDs in the batch \(batch operations\) |
| `runCount` | number | Total number of runs in the batch \(Get Batch\) |
| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) |
| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) |
| `errors` | json | Error details for failed batch items \(Get Batch\) |
| `items` | json | Execution results for each run in the batch \(Get Batch Results\) |
| `status` | string | Run status \(Get Run\) |
| `taskIdentifier` | string | Task identifier of the run \(Get Run\) |
| `createdAt` | string | When the run was created \(Get Run\) |
| `startedAt` | string | When the run started \(Get Run\) |
| `finishedAt` | string | When the run finished \(Get Run\) |
| `durationMs` | number | Compute duration in milliseconds \(Get Run\) |
| `costInCents` | number | Compute cost in cents \(Get Run\) |
| `isTest` | boolean | Whether the run is a test run \(Get Run\) |
| `tags` | json | Tags attached to the run \(Get Run\) |
| `payload` | json | Payload the run was triggered with \(Get Run\) |
| `output` | json | Output returned by the run \(Get Run\) |
| `attempts` | json | Attempts made for the run \(Get Run\) |
| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) |
| `ok` | boolean | Whether the run succeeded \(Get Run Result\) |
| `outputType` | string | Content type of the run output \(Get Run Result\) |
| `error` | json | Error details for a failed run \(Get Run Result\) |
| `message` | string | Confirmation message \(Add Run Tags\) |
| `events` | json | Log and span events of the run \(Get Run Events\) |
| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) |
| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) |
| `runs` | json | Runs matching the filters \(List Runs\) |
| `schedules` | json | Schedules in the project \(List Schedules\) |
| `pagination` | json | Pagination details \(list operations\) |
| `task` | string | Task the schedule triggers \(schedule operations\) |
| `active` | boolean | Whether the schedule is active \(schedule operations\) |
| `cron` | string | Cron expression \(schedule operations\) |
| `cronDescription` | string | Human-readable cron description \(schedule operations\) |
| `timezone` | string | Timezone of the schedule \(schedule operations\) |
| `nextRun` | string | Next scheduled run time \(schedule operations\) |
| `environments` | json | Environments the schedule runs in \(schedule operations\) |
| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) |
| `variables` | json | Environment variables in the project environment \(List Env Vars\) |
| `name` | string | Environment variable or queue name \(env var and queue operations\) |
| `value` | string | Value of the environment variable \(Get Env Var\) |
| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) |
| `count` | number | Number of environment variables submitted \(Import Env Vars\) |
| `queues` | json | Queues in the environment \(List Queues\) |
| `running` | number | Runs currently executing \(queue operations\) |
| `queued` | number | Runs waiting in the queue \(queue operations\) |
| `paused` | boolean | Whether the queue is paused \(queue operations\) |
| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) |
| `concurrency` | json | Concurrency details of the queue \(queue operations\) |
| `deployments` | json | Deployments matching the filters \(List Deployments\) |
| `version` | string | Deployment version \(deployment operations\) |
| `shortCode` | string | Deployment short code \(deployment operations\) |
| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) |
| `format` | string | Format of the query results \(Execute Query\) |
| `results` | json | Query results \(Execute Query\) |
| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) |
| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) |
| `url` | string | Waitpoint callback URL \(waitpoint operations\) |
| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) |
| `timezones` | json | Supported IANA timezones \(List Timezones\) |

### `trigger_dev_list_env_vars`

List the environment variables of a Trigger.dev project environment. Values are returned in plaintext and will appear in workflow outputs and run history — scope this operation carefully.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `projectRef` | string | Yes | External ref of the project, from the project settings \(starts with proj_\) |
| `environment` | string | Yes | Environment to list variables for: dev, staging, or prod |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `variables` | array | Environment variables in the project environment |
|   ↳ `name` | string | Name of the environment variable |
|   ↳ `value` | string | Plaintext value of the environment variable; appears in workflow outputs and run history |

### `trigger_dev_create_env_var`

Create an environment variable in a Trigger.dev project environment.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `projectRef` | string | Yes | External ref of the project, from the project settings \(starts with proj_\) |
| `environment` | string | Yes | Environment to create the variable in: dev, staging, or prod |
| `name` | string | Yes | Name of the environment variable \(e.g., "SLACK_API_KEY"\) |
| `value` | string | Yes | Value of the environment variable |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Whether the environment variable was created |
| `name` | string | Name of the environment variable that was created |

### `trigger_dev_get_env_var`

Retrieve an environment variable from a Trigger.dev project environment. The value is returned in plaintext and will appear in workflow outputs and run history.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `projectRef` | string | Yes | External ref of the project, from the project settings \(starts with proj_\) |
| `environment` | string | Yes | Environment to read the variable from: dev, staging, or prod |
| `name` | string | Yes | Name of the environment variable \(e.g., "SLACK_API_KEY"\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `name` | string | Name of the environment variable |
| `value` | string | Plaintext value of the environment variable; appears in workflow outputs and run history |

### `trigger_dev_update_env_var`

Update the value of an environment variable in a Trigger.dev project environment.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `projectRef` | string | Yes | External ref of the project, from the project settings \(starts with proj_\) |
| `environment` | string | Yes | Environment the variable belongs to: dev, staging, or prod |
| `name` | string | Yes | Name of the environment variable to update \(e.g., "SLACK_API_KEY"\) |
| `value` | string | Yes | New value of the environment variable |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Whether the environment variable was updated |
| `name` | string | Name of the environment variable that was updated |

### `trigger_dev_delete_env_var`

Delete an environment variable from a Trigger.dev project environment.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `projectRef` | string | Yes | External ref of the project, from the project settings \(starts with proj_\) |
| `environment` | string | Yes | Environment the variable belongs to: dev, staging, or prod |
| `name` | string | Yes | Name of the environment variable to delete \(e.g., "SLACK_API_KEY"\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Whether the environment variable was deleted |
| `name` | string | Name of the environment variable that was deleted |

### `trigger_dev_import_env_vars`

Upload multiple environment variables to a Trigger.dev project environment in one request.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `projectRef` | string | Yes | External ref of the project, from the project settings \(starts with proj_\) |
| `environment` | string | Yes | Environment to upload the variables to: dev, staging, or prod |
| `variables` | json | Yes | JSON array of environment variables to upload. Example: \[\{"name": "SLACK_API_KEY", "value": "slack_123"\}\] |
| `override` | string | No | Whether to override existing variables: "true" or "false" \(default false\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Whether the environment variables were uploaded |
| `count` | number | Number of environment variables submitted |

### `trigger_dev_get_queue`

Retrieve a Trigger.dev queue by ID, task identifier, or custom queue name, including its running and queued counts.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `queueName` | string | Yes | Queue ID \(starts with queue_\), task identifier, or custom queue name, depending on the queue type |
| `queueType` | string | No | How to interpret the queue name: "id" \(default\) for a queue ID, "task" for a task identifier, or "custom" for a custom queue name |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Run, schedule, or queue ID |
| `batchId` | string | Batch ID \(Batch Trigger Task\) |
| `runIds` | json | Run IDs in the batch \(batch operations\) |
| `runCount` | number | Total number of runs in the batch \(Get Batch\) |
| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) |
| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) |
| `errors` | json | Error details for failed batch items \(Get Batch\) |
| `items` | json | Execution results for each run in the batch \(Get Batch Results\) |
| `status` | string | Run status \(Get Run\) |
| `taskIdentifier` | string | Task identifier of the run \(Get Run\) |
| `createdAt` | string | When the run was created \(Get Run\) |
| `startedAt` | string | When the run started \(Get Run\) |
| `finishedAt` | string | When the run finished \(Get Run\) |
| `durationMs` | number | Compute duration in milliseconds \(Get Run\) |
| `costInCents` | number | Compute cost in cents \(Get Run\) |
| `isTest` | boolean | Whether the run is a test run \(Get Run\) |
| `tags` | json | Tags attached to the run \(Get Run\) |
| `payload` | json | Payload the run was triggered with \(Get Run\) |
| `output` | json | Output returned by the run \(Get Run\) |
| `attempts` | json | Attempts made for the run \(Get Run\) |
| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) |
| `ok` | boolean | Whether the run succeeded \(Get Run Result\) |
| `outputType` | string | Content type of the run output \(Get Run Result\) |
| `error` | json | Error details for a failed run \(Get Run Result\) |
| `message` | string | Confirmation message \(Add Run Tags\) |
| `events` | json | Log and span events of the run \(Get Run Events\) |
| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) |
| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) |
| `runs` | json | Runs matching the filters \(List Runs\) |
| `schedules` | json | Schedules in the project \(List Schedules\) |
| `pagination` | json | Pagination details \(list operations\) |
| `task` | string | Task the schedule triggers \(schedule operations\) |
| `active` | boolean | Whether the schedule is active \(schedule operations\) |
| `cron` | string | Cron expression \(schedule operations\) |
| `cronDescription` | string | Human-readable cron description \(schedule operations\) |
| `timezone` | string | Timezone of the schedule \(schedule operations\) |
| `nextRun` | string | Next scheduled run time \(schedule operations\) |
| `environments` | json | Environments the schedule runs in \(schedule operations\) |
| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) |
| `variables` | json | Environment variables in the project environment \(List Env Vars\) |
| `name` | string | Environment variable or queue name \(env var and queue operations\) |
| `value` | string | Value of the environment variable \(Get Env Var\) |
| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) |
| `count` | number | Number of environment variables submitted \(Import Env Vars\) |
| `queues` | json | Queues in the environment \(List Queues\) |
| `running` | number | Runs currently executing \(queue operations\) |
| `queued` | number | Runs waiting in the queue \(queue operations\) |
| `paused` | boolean | Whether the queue is paused \(queue operations\) |
| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) |
| `concurrency` | json | Concurrency details of the queue \(queue operations\) |
| `deployments` | json | Deployments matching the filters \(List Deployments\) |
| `version` | string | Deployment version \(deployment operations\) |
| `shortCode` | string | Deployment short code \(deployment operations\) |
| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) |
| `format` | string | Format of the query results \(Execute Query\) |
| `results` | json | Query results \(Execute Query\) |
| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) |
| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) |
| `url` | string | Waitpoint callback URL \(waitpoint operations\) |
| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) |
| `timezones` | json | Supported IANA timezones \(List Timezones\) |

### `trigger_dev_list_queues`

List the queues in the environment of the API key, including running and queued counts, with page-based pagination.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `page` | number | No | Page number to return \(default 1\) |
| `perPage` | number | No | Number of queues per page |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `queues` | array | Queues in the environment |
|   ↳ `id` | string | Unique ID of the queue \(starts with queue_\) |
|   ↳ `name` | string | Name of the queue |
|   ↳ `type` | string | Queue type \(task for task-default queues, custom for named queues\) |
|   ↳ `running` | number | Number of runs currently executing |
|   ↳ `queued` | number | Number of runs waiting in the queue |
|   ↳ `paused` | boolean | Whether the queue is paused |
|   ↳ `concurrencyLimit` | number | Maximum number of runs that can execute concurrently |
|   ↳ `concurrency` | object | Concurrency details for the queue |
|     ↳ `current` | number | Current concurrency limit |
|     ↳ `base` | number | Base concurrency limit |
|     ↳ `override` | number | Overridden concurrency limit |
|     ↳ `overriddenAt` | string | ISO timestamp when the concurrency limit was overridden |
| `pagination` | object | Page-based pagination details |
|   ↳ `currentPage` | number | Current page number |
|   ↳ `totalPages` | number | Total number of pages |
|   ↳ `count` | number | Total number of queues |

### `trigger_dev_pause_queue`

Pause a Trigger.dev queue so no new runs start. Runs that are currently executing continue to completion.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `queueName` | string | Yes | Queue ID \(starts with queue_\), task identifier, or custom queue name, depending on the queue type |
| `queueType` | string | No | How to interpret the queue name: "id" \(default\) for a queue ID, "task" for a task identifier, or "custom" for a custom queue name |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Run, schedule, or queue ID |
| `batchId` | string | Batch ID \(Batch Trigger Task\) |
| `runIds` | json | Run IDs in the batch \(batch operations\) |
| `runCount` | number | Total number of runs in the batch \(Get Batch\) |
| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) |
| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) |
| `errors` | json | Error details for failed batch items \(Get Batch\) |
| `items` | json | Execution results for each run in the batch \(Get Batch Results\) |
| `status` | string | Run status \(Get Run\) |
| `taskIdentifier` | string | Task identifier of the run \(Get Run\) |
| `createdAt` | string | When the run was created \(Get Run\) |
| `startedAt` | string | When the run started \(Get Run\) |
| `finishedAt` | string | When the run finished \(Get Run\) |
| `durationMs` | number | Compute duration in milliseconds \(Get Run\) |
| `costInCents` | number | Compute cost in cents \(Get Run\) |
| `isTest` | boolean | Whether the run is a test run \(Get Run\) |
| `tags` | json | Tags attached to the run \(Get Run\) |
| `payload` | json | Payload the run was triggered with \(Get Run\) |
| `output` | json | Output returned by the run \(Get Run\) |
| `attempts` | json | Attempts made for the run \(Get Run\) |
| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) |
| `ok` | boolean | Whether the run succeeded \(Get Run Result\) |
| `outputType` | string | Content type of the run output \(Get Run Result\) |
| `error` | json | Error details for a failed run \(Get Run Result\) |
| `message` | string | Confirmation message \(Add Run Tags\) |
| `events` | json | Log and span events of the run \(Get Run Events\) |
| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) |
| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) |
| `runs` | json | Runs matching the filters \(List Runs\) |
| `schedules` | json | Schedules in the project \(List Schedules\) |
| `pagination` | json | Pagination details \(list operations\) |
| `task` | string | Task the schedule triggers \(schedule operations\) |
| `active` | boolean | Whether the schedule is active \(schedule operations\) |
| `cron` | string | Cron expression \(schedule operations\) |
| `cronDescription` | string | Human-readable cron description \(schedule operations\) |
| `timezone` | string | Timezone of the schedule \(schedule operations\) |
| `nextRun` | string | Next scheduled run time \(schedule operations\) |
| `environments` | json | Environments the schedule runs in \(schedule operations\) |
| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) |
| `variables` | json | Environment variables in the project environment \(List Env Vars\) |
| `name` | string | Environment variable or queue name \(env var and queue operations\) |
| `value` | string | Value of the environment variable \(Get Env Var\) |
| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) |
| `count` | number | Number of environment variables submitted \(Import Env Vars\) |
| `queues` | json | Queues in the environment \(List Queues\) |
| `running` | number | Runs currently executing \(queue operations\) |
| `queued` | number | Runs waiting in the queue \(queue operations\) |
| `paused` | boolean | Whether the queue is paused \(queue operations\) |
| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) |
| `concurrency` | json | Concurrency details of the queue \(queue operations\) |
| `deployments` | json | Deployments matching the filters \(List Deployments\) |
| `version` | string | Deployment version \(deployment operations\) |
| `shortCode` | string | Deployment short code \(deployment operations\) |
| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) |
| `format` | string | Format of the query results \(Execute Query\) |
| `results` | json | Query results \(Execute Query\) |
| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) |
| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) |
| `url` | string | Waitpoint callback URL \(waitpoint operations\) |
| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) |
| `timezones` | json | Supported IANA timezones \(List Timezones\) |

### `trigger_dev_resume_queue`

Resume a paused Trigger.dev queue so new runs can start again.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `queueName` | string | Yes | Queue ID \(starts with queue_\), task identifier, or custom queue name, depending on the queue type |
| `queueType` | string | No | How to interpret the queue name: "id" \(default\) for a queue ID, "task" for a task identifier, or "custom" for a custom queue name |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Run, schedule, or queue ID |
| `batchId` | string | Batch ID \(Batch Trigger Task\) |
| `runIds` | json | Run IDs in the batch \(batch operations\) |
| `runCount` | number | Total number of runs in the batch \(Get Batch\) |
| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) |
| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) |
| `errors` | json | Error details for failed batch items \(Get Batch\) |
| `items` | json | Execution results for each run in the batch \(Get Batch Results\) |
| `status` | string | Run status \(Get Run\) |
| `taskIdentifier` | string | Task identifier of the run \(Get Run\) |
| `createdAt` | string | When the run was created \(Get Run\) |
| `startedAt` | string | When the run started \(Get Run\) |
| `finishedAt` | string | When the run finished \(Get Run\) |
| `durationMs` | number | Compute duration in milliseconds \(Get Run\) |
| `costInCents` | number | Compute cost in cents \(Get Run\) |
| `isTest` | boolean | Whether the run is a test run \(Get Run\) |
| `tags` | json | Tags attached to the run \(Get Run\) |
| `payload` | json | Payload the run was triggered with \(Get Run\) |
| `output` | json | Output returned by the run \(Get Run\) |
| `attempts` | json | Attempts made for the run \(Get Run\) |
| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) |
| `ok` | boolean | Whether the run succeeded \(Get Run Result\) |
| `outputType` | string | Content type of the run output \(Get Run Result\) |
| `error` | json | Error details for a failed run \(Get Run Result\) |
| `message` | string | Confirmation message \(Add Run Tags\) |
| `events` | json | Log and span events of the run \(Get Run Events\) |
| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) |
| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) |
| `runs` | json | Runs matching the filters \(List Runs\) |
| `schedules` | json | Schedules in the project \(List Schedules\) |
| `pagination` | json | Pagination details \(list operations\) |
| `task` | string | Task the schedule triggers \(schedule operations\) |
| `active` | boolean | Whether the schedule is active \(schedule operations\) |
| `cron` | string | Cron expression \(schedule operations\) |
| `cronDescription` | string | Human-readable cron description \(schedule operations\) |
| `timezone` | string | Timezone of the schedule \(schedule operations\) |
| `nextRun` | string | Next scheduled run time \(schedule operations\) |
| `environments` | json | Environments the schedule runs in \(schedule operations\) |
| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) |
| `variables` | json | Environment variables in the project environment \(List Env Vars\) |
| `name` | string | Environment variable or queue name \(env var and queue operations\) |
| `value` | string | Value of the environment variable \(Get Env Var\) |
| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) |
| `count` | number | Number of environment variables submitted \(Import Env Vars\) |
| `queues` | json | Queues in the environment \(List Queues\) |
| `running` | number | Runs currently executing \(queue operations\) |
| `queued` | number | Runs waiting in the queue \(queue operations\) |
| `paused` | boolean | Whether the queue is paused \(queue operations\) |
| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) |
| `concurrency` | json | Concurrency details of the queue \(queue operations\) |
| `deployments` | json | Deployments matching the filters \(List Deployments\) |
| `version` | string | Deployment version \(deployment operations\) |
| `shortCode` | string | Deployment short code \(deployment operations\) |
| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) |
| `format` | string | Format of the query results \(Execute Query\) |
| `results` | json | Query results \(Execute Query\) |
| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) |
| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) |
| `url` | string | Waitpoint callback URL \(waitpoint operations\) |
| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) |
| `timezones` | json | Supported IANA timezones \(List Timezones\) |

### `trigger_dev_override_queue_concurrency`

Override the concurrency limit of a Trigger.dev queue with a new value.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `queueName` | string | Yes | Queue ID \(starts with queue_\), task identifier, or custom queue name, depending on the queue type |
| `queueType` | string | No | How to interpret the queue name: "id" \(default\) for a queue ID, "task" for a task identifier, or "custom" for a custom queue name |
| `concurrencyLimit` | number | Yes | New concurrency limit for the queue \(0 to 100000\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Run, schedule, or queue ID |
| `batchId` | string | Batch ID \(Batch Trigger Task\) |
| `runIds` | json | Run IDs in the batch \(batch operations\) |
| `runCount` | number | Total number of runs in the batch \(Get Batch\) |
| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) |
| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) |
| `errors` | json | Error details for failed batch items \(Get Batch\) |
| `items` | json | Execution results for each run in the batch \(Get Batch Results\) |
| `status` | string | Run status \(Get Run\) |
| `taskIdentifier` | string | Task identifier of the run \(Get Run\) |
| `createdAt` | string | When the run was created \(Get Run\) |
| `startedAt` | string | When the run started \(Get Run\) |
| `finishedAt` | string | When the run finished \(Get Run\) |
| `durationMs` | number | Compute duration in milliseconds \(Get Run\) |
| `costInCents` | number | Compute cost in cents \(Get Run\) |
| `isTest` | boolean | Whether the run is a test run \(Get Run\) |
| `tags` | json | Tags attached to the run \(Get Run\) |
| `payload` | json | Payload the run was triggered with \(Get Run\) |
| `output` | json | Output returned by the run \(Get Run\) |
| `attempts` | json | Attempts made for the run \(Get Run\) |
| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) |
| `ok` | boolean | Whether the run succeeded \(Get Run Result\) |
| `outputType` | string | Content type of the run output \(Get Run Result\) |
| `error` | json | Error details for a failed run \(Get Run Result\) |
| `message` | string | Confirmation message \(Add Run Tags\) |
| `events` | json | Log and span events of the run \(Get Run Events\) |
| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) |
| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) |
| `runs` | json | Runs matching the filters \(List Runs\) |
| `schedules` | json | Schedules in the project \(List Schedules\) |
| `pagination` | json | Pagination details \(list operations\) |
| `task` | string | Task the schedule triggers \(schedule operations\) |
| `active` | boolean | Whether the schedule is active \(schedule operations\) |
| `cron` | string | Cron expression \(schedule operations\) |
| `cronDescription` | string | Human-readable cron description \(schedule operations\) |
| `timezone` | string | Timezone of the schedule \(schedule operations\) |
| `nextRun` | string | Next scheduled run time \(schedule operations\) |
| `environments` | json | Environments the schedule runs in \(schedule operations\) |
| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) |
| `variables` | json | Environment variables in the project environment \(List Env Vars\) |
| `name` | string | Environment variable or queue name \(env var and queue operations\) |
| `value` | string | Value of the environment variable \(Get Env Var\) |
| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) |
| `count` | number | Number of environment variables submitted \(Import Env Vars\) |
| `queues` | json | Queues in the environment \(List Queues\) |
| `running` | number | Runs currently executing \(queue operations\) |
| `queued` | number | Runs waiting in the queue \(queue operations\) |
| `paused` | boolean | Whether the queue is paused \(queue operations\) |
| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) |
| `concurrency` | json | Concurrency details of the queue \(queue operations\) |
| `deployments` | json | Deployments matching the filters \(List Deployments\) |
| `version` | string | Deployment version \(deployment operations\) |
| `shortCode` | string | Deployment short code \(deployment operations\) |
| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) |
| `format` | string | Format of the query results \(Execute Query\) |
| `results` | json | Query results \(Execute Query\) |
| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) |
| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) |
| `url` | string | Waitpoint callback URL \(waitpoint operations\) |
| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) |
| `timezones` | json | Supported IANA timezones \(List Timezones\) |

### `trigger_dev_reset_queue_concurrency`

Reset the concurrency limit of a Trigger.dev queue back to its base value, removing any override.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `queueName` | string | Yes | Queue ID \(starts with queue_\), task identifier, or custom queue name, depending on the queue type |
| `queueType` | string | No | How to interpret the queue name: "id" \(default\) for a queue ID, "task" for a task identifier, or "custom" for a custom queue name |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Run, schedule, or queue ID |
| `batchId` | string | Batch ID \(Batch Trigger Task\) |
| `runIds` | json | Run IDs in the batch \(batch operations\) |
| `runCount` | number | Total number of runs in the batch \(Get Batch\) |
| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) |
| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) |
| `errors` | json | Error details for failed batch items \(Get Batch\) |
| `items` | json | Execution results for each run in the batch \(Get Batch Results\) |
| `status` | string | Run status \(Get Run\) |
| `taskIdentifier` | string | Task identifier of the run \(Get Run\) |
| `createdAt` | string | When the run was created \(Get Run\) |
| `startedAt` | string | When the run started \(Get Run\) |
| `finishedAt` | string | When the run finished \(Get Run\) |
| `durationMs` | number | Compute duration in milliseconds \(Get Run\) |
| `costInCents` | number | Compute cost in cents \(Get Run\) |
| `isTest` | boolean | Whether the run is a test run \(Get Run\) |
| `tags` | json | Tags attached to the run \(Get Run\) |
| `payload` | json | Payload the run was triggered with \(Get Run\) |
| `output` | json | Output returned by the run \(Get Run\) |
| `attempts` | json | Attempts made for the run \(Get Run\) |
| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) |
| `ok` | boolean | Whether the run succeeded \(Get Run Result\) |
| `outputType` | string | Content type of the run output \(Get Run Result\) |
| `error` | json | Error details for a failed run \(Get Run Result\) |
| `message` | string | Confirmation message \(Add Run Tags\) |
| `events` | json | Log and span events of the run \(Get Run Events\) |
| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) |
| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) |
| `runs` | json | Runs matching the filters \(List Runs\) |
| `schedules` | json | Schedules in the project \(List Schedules\) |
| `pagination` | json | Pagination details \(list operations\) |
| `task` | string | Task the schedule triggers \(schedule operations\) |
| `active` | boolean | Whether the schedule is active \(schedule operations\) |
| `cron` | string | Cron expression \(schedule operations\) |
| `cronDescription` | string | Human-readable cron description \(schedule operations\) |
| `timezone` | string | Timezone of the schedule \(schedule operations\) |
| `nextRun` | string | Next scheduled run time \(schedule operations\) |
| `environments` | json | Environments the schedule runs in \(schedule operations\) |
| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) |
| `variables` | json | Environment variables in the project environment \(List Env Vars\) |
| `name` | string | Environment variable or queue name \(env var and queue operations\) |
| `value` | string | Value of the environment variable \(Get Env Var\) |
| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) |
| `count` | number | Number of environment variables submitted \(Import Env Vars\) |
| `queues` | json | Queues in the environment \(List Queues\) |
| `running` | number | Runs currently executing \(queue operations\) |
| `queued` | number | Runs waiting in the queue \(queue operations\) |
| `paused` | boolean | Whether the queue is paused \(queue operations\) |
| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) |
| `concurrency` | json | Concurrency details of the queue \(queue operations\) |
| `deployments` | json | Deployments matching the filters \(List Deployments\) |
| `version` | string | Deployment version \(deployment operations\) |
| `shortCode` | string | Deployment short code \(deployment operations\) |
| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) |
| `format` | string | Format of the query results \(Execute Query\) |
| `results` | json | Query results \(Execute Query\) |
| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) |
| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) |
| `url` | string | Waitpoint callback URL \(waitpoint operations\) |
| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) |
| `timezones` | json | Supported IANA timezones \(List Timezones\) |

### `trigger_dev_list_deployments`

List Trigger.dev deployments in the environment of the API key, with optional status and creation-time filters.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `status` | string | No | Deployment status to filter by: PENDING, BUILDING, DEPLOYING, DEPLOYED, FAILED, CANCELED, or TIMED_OUT |
| `period` | string | No | Only return deployments created in the given period \(e.g., "1h", "7d"\) |
| `from` | string | No | Only return deployments created on or after this ISO 8601 timestamp |
| `to` | string | No | Only return deployments created on or before this ISO 8601 timestamp |
| `pageSize` | number | No | Number of deployments per page \(5 to 100, default 20\) |
| `pageAfter` | string | No | Cursor to start the page after, from the previous response pagination |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `deployments` | array | Deployments matching the filters |
| `pagination` | object | Cursor pagination details |
|   ↳ `next` | string | Cursor to pass as the page-after parameter for the next page |

### `trigger_dev_get_deployment`

Retrieve a Trigger.dev deployment by its ID, including its status, version, and registered tasks.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `deploymentId` | string | Yes | ID of the deployment to retrieve |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Run, schedule, or queue ID |
| `batchId` | string | Batch ID \(Batch Trigger Task\) |
| `runIds` | json | Run IDs in the batch \(batch operations\) |
| `runCount` | number | Total number of runs in the batch \(Get Batch\) |
| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) |
| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) |
| `errors` | json | Error details for failed batch items \(Get Batch\) |
| `items` | json | Execution results for each run in the batch \(Get Batch Results\) |
| `status` | string | Run status \(Get Run\) |
| `taskIdentifier` | string | Task identifier of the run \(Get Run\) |
| `createdAt` | string | When the run was created \(Get Run\) |
| `startedAt` | string | When the run started \(Get Run\) |
| `finishedAt` | string | When the run finished \(Get Run\) |
| `durationMs` | number | Compute duration in milliseconds \(Get Run\) |
| `costInCents` | number | Compute cost in cents \(Get Run\) |
| `isTest` | boolean | Whether the run is a test run \(Get Run\) |
| `tags` | json | Tags attached to the run \(Get Run\) |
| `payload` | json | Payload the run was triggered with \(Get Run\) |
| `output` | json | Output returned by the run \(Get Run\) |
| `attempts` | json | Attempts made for the run \(Get Run\) |
| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) |
| `ok` | boolean | Whether the run succeeded \(Get Run Result\) |
| `outputType` | string | Content type of the run output \(Get Run Result\) |
| `error` | json | Error details for a failed run \(Get Run Result\) |
| `message` | string | Confirmation message \(Add Run Tags\) |
| `events` | json | Log and span events of the run \(Get Run Events\) |
| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) |
| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) |
| `runs` | json | Runs matching the filters \(List Runs\) |
| `schedules` | json | Schedules in the project \(List Schedules\) |
| `pagination` | json | Pagination details \(list operations\) |
| `task` | string | Task the schedule triggers \(schedule operations\) |
| `active` | boolean | Whether the schedule is active \(schedule operations\) |
| `cron` | string | Cron expression \(schedule operations\) |
| `cronDescription` | string | Human-readable cron description \(schedule operations\) |
| `timezone` | string | Timezone of the schedule \(schedule operations\) |
| `nextRun` | string | Next scheduled run time \(schedule operations\) |
| `environments` | json | Environments the schedule runs in \(schedule operations\) |
| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) |
| `variables` | json | Environment variables in the project environment \(List Env Vars\) |
| `name` | string | Environment variable or queue name \(env var and queue operations\) |
| `value` | string | Value of the environment variable \(Get Env Var\) |
| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) |
| `count` | number | Number of environment variables submitted \(Import Env Vars\) |
| `queues` | json | Queues in the environment \(List Queues\) |
| `running` | number | Runs currently executing \(queue operations\) |
| `queued` | number | Runs waiting in the queue \(queue operations\) |
| `paused` | boolean | Whether the queue is paused \(queue operations\) |
| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) |
| `concurrency` | json | Concurrency details of the queue \(queue operations\) |
| `deployments` | json | Deployments matching the filters \(List Deployments\) |
| `version` | string | Deployment version \(deployment operations\) |
| `shortCode` | string | Deployment short code \(deployment operations\) |
| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) |
| `format` | string | Format of the query results \(Execute Query\) |
| `results` | json | Query results \(Execute Query\) |
| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) |
| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) |
| `url` | string | Waitpoint callback URL \(waitpoint operations\) |
| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) |
| `timezones` | json | Supported IANA timezones \(List Timezones\) |

### `trigger_dev_get_latest_deployment`

Retrieve the latest Trigger.dev deployment in the environment of the API key.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Run, schedule, or queue ID |
| `batchId` | string | Batch ID \(Batch Trigger Task\) |
| `runIds` | json | Run IDs in the batch \(batch operations\) |
| `runCount` | number | Total number of runs in the batch \(Get Batch\) |
| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) |
| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) |
| `errors` | json | Error details for failed batch items \(Get Batch\) |
| `items` | json | Execution results for each run in the batch \(Get Batch Results\) |
| `status` | string | Run status \(Get Run\) |
| `taskIdentifier` | string | Task identifier of the run \(Get Run\) |
| `createdAt` | string | When the run was created \(Get Run\) |
| `startedAt` | string | When the run started \(Get Run\) |
| `finishedAt` | string | When the run finished \(Get Run\) |
| `durationMs` | number | Compute duration in milliseconds \(Get Run\) |
| `costInCents` | number | Compute cost in cents \(Get Run\) |
| `isTest` | boolean | Whether the run is a test run \(Get Run\) |
| `tags` | json | Tags attached to the run \(Get Run\) |
| `payload` | json | Payload the run was triggered with \(Get Run\) |
| `output` | json | Output returned by the run \(Get Run\) |
| `attempts` | json | Attempts made for the run \(Get Run\) |
| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) |
| `ok` | boolean | Whether the run succeeded \(Get Run Result\) |
| `outputType` | string | Content type of the run output \(Get Run Result\) |
| `error` | json | Error details for a failed run \(Get Run Result\) |
| `message` | string | Confirmation message \(Add Run Tags\) |
| `events` | json | Log and span events of the run \(Get Run Events\) |
| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) |
| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) |
| `runs` | json | Runs matching the filters \(List Runs\) |
| `schedules` | json | Schedules in the project \(List Schedules\) |
| `pagination` | json | Pagination details \(list operations\) |
| `task` | string | Task the schedule triggers \(schedule operations\) |
| `active` | boolean | Whether the schedule is active \(schedule operations\) |
| `cron` | string | Cron expression \(schedule operations\) |
| `cronDescription` | string | Human-readable cron description \(schedule operations\) |
| `timezone` | string | Timezone of the schedule \(schedule operations\) |
| `nextRun` | string | Next scheduled run time \(schedule operations\) |
| `environments` | json | Environments the schedule runs in \(schedule operations\) |
| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) |
| `variables` | json | Environment variables in the project environment \(List Env Vars\) |
| `name` | string | Environment variable or queue name \(env var and queue operations\) |
| `value` | string | Value of the environment variable \(Get Env Var\) |
| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) |
| `count` | number | Number of environment variables submitted \(Import Env Vars\) |
| `queues` | json | Queues in the environment \(List Queues\) |
| `running` | number | Runs currently executing \(queue operations\) |
| `queued` | number | Runs waiting in the queue \(queue operations\) |
| `paused` | boolean | Whether the queue is paused \(queue operations\) |
| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) |
| `concurrency` | json | Concurrency details of the queue \(queue operations\) |
| `deployments` | json | Deployments matching the filters \(List Deployments\) |
| `version` | string | Deployment version \(deployment operations\) |
| `shortCode` | string | Deployment short code \(deployment operations\) |
| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) |
| `format` | string | Format of the query results \(Execute Query\) |
| `results` | json | Query results \(Execute Query\) |
| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) |
| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) |
| `url` | string | Waitpoint callback URL \(waitpoint operations\) |
| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) |
| `timezones` | json | Supported IANA timezones \(List Timezones\) |

### `trigger_dev_promote_deployment`

Promote a Trigger.dev deployment version so new runs execute on it (e.g., to roll back to a previous version).

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `version` | string | Yes | Deployment version to promote \(e.g., "20250228.1"\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | ID of the promoted deployment |
| `version` | string | Version of the promoted deployment |
| `shortCode` | string | Short code of the promoted deployment |

### `trigger_dev_execute_query`

Execute a TRQL (SQL-like) query against Trigger.dev run data for reporting and analytics.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `query` | string | Yes | TRQL query to execute \(e.g., "SELECT run_id, status, triggered_at FROM runs WHERE status = \'Failed\' LIMIT 10"\) |
| `scope` | string | No | Scope of data to query: environment \(default\), project, or organization |
| `period` | string | No | Time period shorthand \(e.g., "1h", "7d", "30d"\). Cannot be combined with from/to |
| `from` | string | No | Start of the time range as an ISO 8601 timestamp. Must be used with "to" |
| `to` | string | No | End of the time range as an ISO 8601 timestamp. Must be used with "from" |
| `format` | string | No | Response format: "json" \(default\) for structured rows or "csv" for a CSV string |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `format` | string | Format of the results \(json or csv\) |
| `results` | json | Query results: an array of row objects for json format, a CSV string for csv |

### `trigger_dev_get_query_schema`

Retrieve the TRQL query schema: the tables and columns available for Execute Query, with types and allowed values.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `tables` | array | Tables that can be queried with TRQL |
|   ↳ `name` | string | Table name used in TRQL queries |
|   ↳ `description` | string | Description of the table |
|   ↳ `timeColumn` | string | Primary time column for the table |
|   ↳ `columns` | array | Columns of the table |
|     ↳ `name` | string | Column name |
|     ↳ `type` | string | ClickHouse data type |
|     ↳ `description` | string | Column description |
|     ↳ `example` | string | Example value |
|     ↳ `allowedValues` | array | Allowed values for enum-like columns |
|     ↳ `coreColumn` | boolean | Whether the column is included in default queries |

### `trigger_dev_create_waitpoint_token`

Create a Trigger.dev waitpoint token that a task can wait on until it is completed from outside (e.g., a human approval).

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `timeout` | string | No | How long before the token times out, as a duration \("30s", "1m", "2h", "3d"\) or an ISO 8601 date |
| `idempotencyKey` | string | No | Idempotency key; passing the same key before it expires returns the original token |
| `idempotencyKeyTTL` | string | No | How long the idempotency key is valid, as a duration \("30s", "1m", "2h", "3d"\) |
| `tags` | string | No | Comma-separated tags to attach to the waitpoint \(max 10, each under 128 characters\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Unique ID of the waitpoint token \(starts with waitpoint_\) |
| `isCached` | boolean | Whether an existing token was returned because the same idempotency key was reused |
| `url` | string | HTTP callback URL; a POST request to this URL completes the waitpoint without an API key |

### `trigger_dev_complete_waitpoint_token`

Complete a Trigger.dev waitpoint token, resuming any task waiting on it and passing it optional JSON data.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `waitpointId` | string | Yes | ID of the waitpoint token to complete \(starts with waitpoint_\) |
| `data` | json | No | JSON data passed back to the waiting run as the token result. Example: \{"status": "approved"\} |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Whether the waitpoint token was completed |

### `trigger_dev_get_waitpoint_token`

Retrieve a Trigger.dev waitpoint token by its ID, including its status, timeout, and completion data.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `waitpointId` | string | Yes | ID of the waitpoint token to retrieve \(starts with waitpoint_\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `id` | string | Run, schedule, or queue ID |
| `batchId` | string | Batch ID \(Batch Trigger Task\) |
| `runIds` | json | Run IDs in the batch \(batch operations\) |
| `runCount` | number | Total number of runs in the batch \(Get Batch\) |
| `successfulRunCount` | number | Number of successful runs in the batch \(Get Batch\) |
| `failedRunCount` | number | Number of failed runs in the batch \(Get Batch\) |
| `errors` | json | Error details for failed batch items \(Get Batch\) |
| `items` | json | Execution results for each run in the batch \(Get Batch Results\) |
| `status` | string | Run status \(Get Run\) |
| `taskIdentifier` | string | Task identifier of the run \(Get Run\) |
| `createdAt` | string | When the run was created \(Get Run\) |
| `startedAt` | string | When the run started \(Get Run\) |
| `finishedAt` | string | When the run finished \(Get Run\) |
| `durationMs` | number | Compute duration in milliseconds \(Get Run\) |
| `costInCents` | number | Compute cost in cents \(Get Run\) |
| `isTest` | boolean | Whether the run is a test run \(Get Run\) |
| `tags` | json | Tags attached to the run \(Get Run\) |
| `payload` | json | Payload the run was triggered with \(Get Run\) |
| `output` | json | Output returned by the run \(Get Run\) |
| `attempts` | json | Attempts made for the run \(Get Run\) |
| `metadata` | json | Run metadata \(Get Run, Update Run Metadata\) |
| `ok` | boolean | Whether the run succeeded \(Get Run Result\) |
| `outputType` | string | Content type of the run output \(Get Run Result\) |
| `error` | json | Error details for a failed run \(Get Run Result\) |
| `message` | string | Confirmation message \(Add Run Tags\) |
| `events` | json | Log and span events of the run \(Get Run Events\) |
| `traceId` | string | OpenTelemetry trace ID \(Get Run Trace\) |
| `rootSpan` | json | Root span of the run trace \(Get Run Trace\) |
| `runs` | json | Runs matching the filters \(List Runs\) |
| `schedules` | json | Schedules in the project \(List Schedules\) |
| `pagination` | json | Pagination details \(list operations\) |
| `task` | string | Task the schedule triggers \(schedule operations\) |
| `active` | boolean | Whether the schedule is active \(schedule operations\) |
| `cron` | string | Cron expression \(schedule operations\) |
| `cronDescription` | string | Human-readable cron description \(schedule operations\) |
| `timezone` | string | Timezone of the schedule \(schedule operations\) |
| `nextRun` | string | Next scheduled run time \(schedule operations\) |
| `environments` | json | Environments the schedule runs in \(schedule operations\) |
| `deleted` | boolean | Whether the schedule was deleted \(Delete Schedule\) |
| `variables` | json | Environment variables in the project environment \(List Env Vars\) |
| `name` | string | Environment variable or queue name \(env var and queue operations\) |
| `value` | string | Value of the environment variable \(Get Env Var\) |
| `success` | boolean | Whether the operation succeeded \(env var operations, Complete Waitpoint Token\) |
| `count` | number | Number of environment variables submitted \(Import Env Vars\) |
| `queues` | json | Queues in the environment \(List Queues\) |
| `running` | number | Runs currently executing \(queue operations\) |
| `queued` | number | Runs waiting in the queue \(queue operations\) |
| `paused` | boolean | Whether the queue is paused \(queue operations\) |
| `concurrencyLimit` | number | Concurrency limit of the queue \(queue operations\) |
| `concurrency` | json | Concurrency details of the queue \(queue operations\) |
| `deployments` | json | Deployments matching the filters \(List Deployments\) |
| `version` | string | Deployment version \(deployment operations\) |
| `shortCode` | string | Deployment short code \(deployment operations\) |
| `tasks` | json | Tasks registered by the deployed worker \(deployment operations\) |
| `format` | string | Format of the query results \(Execute Query\) |
| `results` | json | Query results \(Execute Query\) |
| `tables` | json | Queryable TRQL tables and columns \(Get Query Schema\) |
| `tokens` | json | Waitpoint tokens \(List Waitpoint Tokens\) |
| `url` | string | Waitpoint callback URL \(waitpoint operations\) |
| `isCached` | boolean | Whether an existing token was returned \(Create Waitpoint Token\) |
| `timezones` | json | Supported IANA timezones \(List Timezones\) |

### `trigger_dev_list_waitpoint_tokens`

List Trigger.dev waitpoint tokens in the environment of the API key, with optional status, tag, and creation-time filters.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `status` | string | No | Waitpoint status to filter by: WAITING, COMPLETED, or TIMED_OUT |
| `idempotencyKey` | string | No | Idempotency key to filter by |
| `tags` | string | No | Comma-separated tags to filter by |
| `period` | string | No | Only return tokens created in the given period \(e.g., "1h", "7d"\) |
| `from` | string | No | Only return tokens created on or after this ISO 8601 timestamp |
| `to` | string | No | Only return tokens created on or before this ISO 8601 timestamp |
| `pageSize` | number | No | Number of tokens per page \(max 100\) |
| `pageAfter` | string | No | Waitpoint ID to start the page after, for forward pagination |
| `pageBefore` | string | No | Waitpoint ID to start the page before, for backward pagination |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `tokens` | array | Waitpoint tokens matching the filters |
| `pagination` | object | Cursor pagination details |
|   ↳ `next` | string | Waitpoint ID to start the next page after |
|   ↳ `previous` | string | Waitpoint ID to start the previous page before |

### `trigger_dev_list_timezones`

List the IANA timezones supported by Trigger.dev schedules, for use as the timezone of a cron schedule.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `apiKey` | string | Yes | Trigger.dev secret API key \(starts with tr_\) |
| `excludeUtc` | string | No | Set to "true" to exclude UTC from the returned timezones |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `timezones` | array | IANA timezones supported by schedules |


