docs/mcp-tools.mdx
Search the Trigger.dev documentation for guides, examples, and API references.
Example usage:
"How do I create a scheduled task?""Show me webhook examples""What are the deployment options?"List all organizations you have access to.
Example usage:
"What organizations do I have?""Show me my orgs"List all projects in your Trigger.dev account.
Example usage:
"What projects do I have?""List my Trigger.dev projects"Create a new project in an organization.
Example usage:
"Create a new project called 'my-app'""Set up a new Trigger.dev project"Initialize Trigger.dev in your project with automatic setup and configuration.
Example usage:
"Set up Trigger.dev in this project""Add Trigger.dev to my app"Get the current worker for a project, including the worker version, SDK version, and registered tasks with their payload schemas.
Example usage:
"What tasks are available?""Show me the tasks in dev"Trigger a task to run with a specific payload. You can add a delay, set tags, configure retries, choose a machine size, set a TTL, or use an idempotency key.
Example usage:
"Run the email-notification task""Trigger my-task with userId 123""Execute the sync task in production"Get detailed information about a specific task run, including logs and status. Enable debug mode to get the full trace with all logs and spans.
Example usage:
"Show me details for run run_abc123""Why did this run fail?"List runs for a project. Filter by status, task, tags, version, machine size, or time period.
Example usage:
"Show me recent runs""List failed runs from the last 7 days""What runs are currently executing?"Wait for a specific run to finish and return the result.
Example usage:
"Wait for run run_abc123 to complete"Cancel a running or queued run.
Example usage:
"Cancel run run_abc123""Stop that task"Deploy your project to staging or production.
Example usage:
"Deploy to production""Deploy to staging"List deployments for a project. Filter by status or time period.
Example usage:
"Show me recent deployments""What's deployed to production?"List all preview branches in the project.
Example usage:
"What preview branches exist?""Show me preview deployments"Show the current authenticated user, active CLI profile, email, and API URL.
Example usage:
"Who am I logged in as?""What profile am I using?"List all configured CLI profiles and which one is currently active.
Example usage:
"What profiles do I have?""Show me my Trigger.dev profiles"Switch the active CLI profile for this MCP session. This changes which Trigger.dev account and API URL are used for all subsequent tool calls.
Example usage:
"Switch to my production profile""Use the staging profile"Get the schema for TRQL queries, including all available tables, their columns, data types, descriptions, and allowed values. Call this before using the query tool to understand what data is available.
Example usage:
"What tables and columns can I query?""Show me the query schema"Execute a TRQL query against your Trigger.dev data. TRQL is a SQL-style query language for analyzing runs, metrics, and LLM usage.
Example usage:
"How many runs failed in the last 7 days?""Show me the top 10 most expensive tasks""Query the average execution duration by task"List available built-in dashboards with their widgets. Each dashboard contains pre-built queries for common metrics.
Example usage:
"What dashboards are available?""Show me the dashboard widgets"Execute a single widget query from a built-in dashboard. Use list_dashboards first to see available dashboards and widget IDs.
Example usage:
"Run the total runs widget from the overview dashboard""Show me the LLM cost over time from the AI dashboard"Start the Trigger.dev dev server (trigger dev) in the background. Waits up to 30 seconds for the worker to be ready.
Example usage:
"Start the dev server""Run trigger dev"Stop the running Trigger.dev dev server.
Example usage:
"Stop the dev server"Check the status of the dev server and view recent output. Shows whether it is stopped, starting, ready, or has errors.
Example usage:
"Is the dev server running?""Show me the dev server logs""Are there any build errors?"These tools let you have conversations with chat agents directly from your AI coding tool. See the Agent MCP guide for a walkthrough.
List all chat agents registered in the current worker. Agents are tasks created with chat.agent() or chat.customAgent().
Example usage:
"What agents are available?""List my chat agents"Start a conversation with a chat agent. Returns a chat ID for use with send_agent_message. Optionally preloads the agent so it initializes before the first message.
Parameters:
agentId (required) — The agent task slug (e.g., "support-agent")chatId (optional) — A custom conversation ID. Auto-generated if omittedclientData (optional) — Client data to include with every message (e.g., { userId: "user_123" }). Must match the agent's clientDataSchema if one is definedpreload (optional, default: true) — Whether to preload the agent before the first messageExample usage:
"Start a chat with the support agent""Talk to the pr-review agent with userId abc"Send a message to an active agent chat and get the full response back. The agent remembers full context from previous messages in the same chat.
Parameters:
chatId (required) — The chat ID from start_agent_chatmessage (required) — The message text to sendExample usage:
"Tell the agent to review the latest PR""Ask it what tools it has available"Close an agent chat conversation. The agent exits its loop gracefully. Without this, the agent will close on its own when its idle timeout expires.
Parameters:
chatId (required) — The chat ID to closeExample usage:
"Close the chat""End the conversation"