---
title: "MCP Tools"
sidebarTitle: "Tools"
description: "Learn about the tools available in the Trigger.dev MCP Server"
tag: "new"
---
The Trigger.dev MCP Server provides a comprehensive set of tools that enable AI assistants to interact with your Trigger.dev projects. These tools cover everything from project management to task execution and monitoring.
## Documentation and Search Tools
### search_docs
Search across the Trigger.dev documentation to find relevant information, code examples, API references, and guides.
The search query to find information in the Trigger.dev documentation
**Usage Examples:**
- "How do I create a scheduled task?"
- "webhook examples"
- "deployment configuration"
- "error handling patterns"
```json Example Usage
{
"tool": "search_docs",
"arguments": {
"query": "webhook examples"
}
}
```
## Project Management Tools
### list_projects
List all projects in your Trigger.dev account.
**No parameters required**
Array of project objects containing project details, IDs, and metadata
```json Example Response
{
"projects": [
{
"id": "proj_abc123",
"name": "My App",
"slug": "my-app",
"organizationId": "org_xyz789"
}
]
}
```
### list_orgs
List all organizations you have access to.
**No parameters required**
Array of organization objects containing organization details and metadata
### create_project_in_org
Create a new project in an organization.
The organization to create the project in, can either be the organization slug or the ID. Use the
`list_orgs` tool to get a list of organizations and ask the user to select one.
The name of the project to create
```json Example Usage
{
"tool": "create_project_in_org",
"arguments": {
"orgParam": "my-org",
"name": "New Project"
}
}
```
### initialize_project
Initialize Trigger.dev in your project with automatic setup and configuration.
The organization to create the project in, can either be the organization slug or the ID. Use the
`list_orgs` tool to get a list of organizations and ask the user to select one.
The trigger.dev project ref, starts with `proj_`. We will attempt to automatically detect the
project ref if running inside a directory that includes a trigger.config.ts file.
The name of the project to create. If projectRef is not provided, we will use this name to create
a new project in the organization you select.
The current working directory of the project
## Task Management Tools
### get_tasks
Get all tasks in a project.
The trigger.dev project ref, starts with `proj_`. We will attempt to automatically detect the
project ref if running inside a directory that includes a trigger.config.ts file.
The path to the trigger.config.ts file. Only used when the trigger.config.ts file is not at the
root dir (like in a monorepo setup). If not provided, we will try to find the config file in the
current working directory.
The environment to get tasks for. Options: `dev`, `staging`, `prod`, `preview`
The branch to get tasks for, only used for preview environments
```json Example Usage
{
"tool": "get_tasks",
"arguments": {
"projectRef": "proj_abc123",
"environment": "dev"
}
}
```
### trigger_task
Trigger a task to run.
The trigger.dev project ref, starts with `proj_`. We will attempt to automatically detect the
project ref if running inside a directory that includes a trigger.config.ts file.
The path to the trigger.config.ts file. Only used when the trigger.config.ts file is not at the
root dir (like in a monorepo setup).
The environment to trigger the task in. Options: `dev`, `staging`, `prod`, `preview`
The branch to trigger the task in, only used for preview environments
The ID/slug of the task to trigger. Use the `get_tasks` tool to get a list of tasks and ask the
user to select one if it's not clear which one to use.
The payload to trigger the task with, must be a valid JSON string
Additional options for the task run
The name of the queue to trigger the task in, by default will use the queue configured in the
task
The delay before the task run is executed
The idempotency key to use for the task run
The machine preset to use for the task run. Options: `micro`, `small-1x`, `small-2x`,
`medium-1x`, `medium-2x`, `large-1x`, `large-2x`
The maximum number of attempts to retry the task run
The maximum duration in seconds of the task run
Tags to add to the task run. Must be less than 128 characters and cannot have more than 5
The time to live of the task run. If the run doesn't start executing within this time, it will
be automatically cancelled.
```json Example Usage
{
"tool": "trigger_task",
"arguments": {
"projectRef": "proj_abc123",
"taskId": "email-notification",
"payload": "{\"email\": \"user@example.com\", \"subject\": \"Hello World\"}",
"options": {
"tags": ["urgent"],
"maxAttempts": 3
}
}
}
```
## Run Monitoring Tools
### get_run_details
Get the details of a specific task run.
The trigger.dev project ref, starts with `proj_`. We will attempt to automatically detect the
project ref if running inside a directory that includes a trigger.config.ts file.
The path to the trigger.config.ts file. Only used when the trigger.config.ts file is not at the
root dir (like in a monorepo setup).
The environment to get the run details from. Options: `dev`, `staging`, `prod`, `preview`
The branch to get the run details from, only used for preview environments
The ID of the run to get the details of, starts with `run_`
Enable debug mode to get more detailed information about the run, including the entire trace (all logs and spans for the run and any child run). Set this to true if prompted to debug a run.
### cancel_run
Cancel a running task.
The ID of the run to cancel, starts with `run_`
The trigger.dev project ref, starts with `proj_`. We will attempt to automatically detect the
project ref if running inside a directory that includes a trigger.config.ts file.
The path to the trigger.config.ts file. Only used when the trigger.config.ts file is not at the
root dir (like in a monorepo setup).
The environment to cancel the run in. Options: `dev`, `staging`, `prod`, `preview`
The branch to cancel the run in, only used for preview environments
```json Example Usage
{
"tool": "cancel_run",
"arguments": {
"runId": "run_abc123",
"projectRef": "proj_abc123"
}
}
```
### list_runs
List all runs for a project with comprehensive filtering options.
The trigger.dev project ref, starts with `proj_`. We will attempt to automatically detect the
project ref if running inside a directory that includes a trigger.config.ts file.
The path to the trigger.config.ts file. Only used when the trigger.config.ts file is not at the
root dir (like in a monorepo setup).
The environment to list runs from. Options: `dev`, `staging`, `prod`, `preview`
The branch to list runs from, only used for preview environments
The cursor to use for pagination, starts with `run_`
The number of runs to list in a single page. Up to 100
Filter for runs with this run status. Options: `PENDING_VERSION`, `QUEUED`, `DEQUEUED`,
`EXECUTING`, `WAITING`, `COMPLETED`, `CANCELED`, `FAILED`, `CRASHED`, `SYSTEM_FAILURE`, `DELAYED`,
`EXPIRED`, `TIMED_OUT`
Filter for runs that match this task identifier
Filter for runs that match this version, e.g. `20250808.3`
Filter for runs that include this tag
Filter for runs created after this ISO 8601 timestamp
Filter for runs created before this ISO 8601 timestamp
Filter for runs created in the last N time period. Examples: `7d`, `30d`, `365d`
Filter for runs that match this machine preset. Options: `micro`, `small-1x`, `small-2x`,
`medium-1x`, `medium-2x`, `large-1x`, `large-2x`
```json Example Usage
{
"tool": "list_runs",
"arguments": {
"projectRef": "proj_abc123",
"status": "COMPLETED",
"limit": 10,
"period": "7d"
}
}
```
## Deployment Tools
### deploy
Deploy a project to staging or production environments.
The trigger.dev project ref, starts with `proj_`. We will attempt to automatically detect the
project ref if running inside a directory that includes a trigger.config.ts file.
The path to the trigger.config.ts file. Only used when the trigger.config.ts file is not at the
root dir (like in a monorepo setup).
The environment to deploy to. Options: `staging`, `prod`, `preview`
The branch to deploy, only used for preview environments
Skip promoting the deployment to the current deployment for the environment
Skip syncing environment variables when using the syncEnvVars extension
Skip checking for @trigger.dev package updates
```json Example Usage
{
"tool": "deploy",
"arguments": {
"projectRef": "proj_abc123",
"environment": "prod",
"skipUpdateCheck": true
}
}
```
### list_deployments
List deployments for a project with comprehensive filtering options.
The trigger.dev project ref, starts with `proj_`. We will attempt to automatically detect the
project ref if running inside a directory that includes a trigger.config.ts file.
The path to the trigger.config.ts file. Only used when the trigger.config.ts file is not at the
root dir (like in a monorepo setup).
The environment to list deployments for. Options: `staging`, `prod`, `preview`
The branch to list deployments from, only used for preview environments
The deployment ID to start the search from, to get the next page
The number of deployments to return, defaults to 20 (max 100)
Filter deployments that are in this status. Options: `PENDING`, `BUILDING`, `DEPLOYING`, `DEPLOYED`, `FAILED`, `CANCELED`, `TIMED_OUT`
The date to start the search from, in ISO 8601 format
The date to end the search, in ISO 8601 format
The period to search within. Examples: `1d`, `7d`, `3h`
```json Example Usage
{
"tool": "list_deployments",
"arguments": {
"projectRef": "proj_abc123",
"environment": "prod",
"status": "DEPLOYED",
"limit": 10
}
}
```
### list_preview_branches
List all preview branches in the project.
The trigger.dev project ref, starts with `proj_`. We will attempt to automatically detect the
project ref if running inside a directory that includes a trigger.config.ts file.
The path to the trigger.config.ts file. Only used when the trigger.config.ts file is not at the
root dir (like in a monorepo setup). If not provided, we will try to find the config file in the
current working directory.
```json Example Usage
{
"tool": "list_preview_branches",
"arguments": {
"projectRef": "proj_abc123"
}
}
```
The deploy tool and list_preview_branches tool are not available when the MCP server is running with the `--dev-only` flag.