developer-toolsapi_key

Trigger.dev

Trigger.dev is a platform for building, deploying, and managing reliable background tasks and workflows.

Verdict

Trigger.dev runs background jobs and scheduled tasks outside your main application. In Switchy, @mentioning Trigger.dev lets your team check job status, inspect run outputs, query execution history, and debug errors without leaving the conversation. Developers get instant visibility into what's running, what failed, and why. Product managers can ask for batch summaries or cost breakdowns. The MCP surfaces read-only analytics and diagnostics — it won't trigger new jobs or modify task definitions, so you stay in control of what executes.

Common use cases

  • Check overnight batch job completion before standup
  • Debug failed webhook tasks from support tickets
  • Pull cost and duration stats for sprint retrospectives
  • Surface error trends across deployed task versions
  • Verify scheduled job outputs without SSH or logs

Integration

Vendor
Trigger.dev
Category
developer-tools
Auth
API_KEY
Tools
10
Composio slug
trigger_dev

Tools

  • Batch Trigger Task

    Start multiple runs of one deployed Trigger.dev task in one provider-side batch and return the batch and run IDs.

  • Execute TRQL Query

    Run one read-only Trigger.dev Query Language SELECT statement for custom run analytics and return JSON rows or CSV text.

  • Get Batch

    Retrieve a task batch's status, run IDs, completion counts, and item errors.

  • Get Batch Results

    Retrieve the success or failure outcome and encoded output for every run in a completed task batch.

  • Get Error

    Retrieve one Trigger.dev error group's message, occurrence history, affected versions, and resolution or ignore state.

  • Get Run

    Retrieve one run's status, timing, payload, output, attempts, metadata, relationships, schedule, and cost details. Presigned payload or output URLs are returned without fetching their content.

  • Get Run Result

    Retrieve one run's compact success or failure result, including its encoded output or error and usage duration.

  • List Errors

    Return one forward page of Trigger.dev error groups, optionally filtered by task, version, status, text, or time window.

  • List Runs

    Return one forward page of runs in the connected environment, optionally filtered by time, status, task, version, tags, schedule, bulk action, test mode, or error.

  • Trigger Task

    Start one run of a deployed Trigger.dev task and return the new run ID.

Setup

Setup guide

  1. 11. Open your Switchy workspace settings and navigate to the Integrations page. 2. Click 'Add Integration' and select Trigger.dev from the developer tools category. 3. You'll be prompted to paste a Trigger.dev API key — generate one in your Trigger.dev dashboard under Settings > API Keys with read scope. 4. Copy the key and paste it into Switchy, then click 'Connect'. 5. Switchy will verify the key and confirm the connection. 6. Open any Project and type '@Trigger.dev get run <run-id>' to test — replace <run-id> with a real run identifier from your Trigger.dev dashboard. 7. If the MCP returns run details, the integration is live and your team can start querying job history, batch results, and error logs directly in chat.

What teammates see: by default, memories from Trigger.dev are scoped to the Project (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.

Works well with

Top models

Compatibility data appears once enough Projects have used this MCP together with a given model.

How Switchy teams use it

Not enough Projects yet to publish anonymised usage stats (we require ≥ 50 Projects per week).

Starter prompts

Batch Job Summary

@Trigger.dev get batch <batch-id> and summarize how many runs succeeded, how many failed, and list any error messages.

Run Output Inspection

@Trigger.dev get run result for <run-id> and show me the output payload in a readable format.

Cost Analysis Query

@Trigger.dev execute TRQL query: SELECT SUM(cost) FROM runs WHERE created_at >= '2025-01-01' GROUP BY task_id.

Scheduled Task Verification

@Trigger.dev get run <run-id> for last night's scheduled task and tell me if it succeeded and how long it took.

Example outputs

Illustrative - representative of the model's voice and quality, not literal recordings.

Prompt

@trigger.dev list all unresolved errors from the last 7 days in our payment-processor task and group them by error message

Output

Found 3 unresolved error groups in payment-processor: 1. "Stripe webhook signature validation failed" – 47 occurrences across v1.2.3 and v1.2.4, first seen 6 days ago, last occurred 2 hours ago. 2. "Database connection timeout after 5000ms" – 12 occurrences in v1.2.4 only, clustered between 3-4 days ago. 3. "Invalid currency code 'GPB' in line item" – 8 occurrences in v1.2.3, sporadic over the past week. All three remain in 'open' state. The Stripe signature issue shows the highest frequency and may warrant immediate investigation.

Notes

This example demonstrates the List Errors tool filtered by task, status, and time window. The MCP returns error groups with occurrence counts and version distribution, but you'll need separate Get Error calls to see full stack traces or mark errors as resolved. Useful for daily triage; be aware that high-traffic tasks can generate hundreds of error groups.

Prompt

@trigger.dev batch-trigger our send-welcome-email task for these 250 new user IDs and confirm the batch started successfully

Output

Batch b_abc123xyz created successfully. Trigger.dev queued 250 runs of send-welcome-email (task ID: task_welcome_v2). Batch status: PENDING Runs enqueued: 250 Runs completed: 0 Runs failed: 0 Each run will receive its user ID as payload. The batch is now processing; you can poll batch status with the returned ID or wait for a webhook callback if configured. Estimated completion depends on your concurrency limits and task duration.

Notes

This example uses Batch Trigger Task to start many runs at once, which is more efficient than triggering individually. The MCP returns a batch ID immediately, but actual run results require a follow-up Get Batch Results call once the batch completes. Side-effect: 250 emails will be sent if the task succeeds. Ensure your Trigger.dev plan supports the concurrency you need.

Prompt

@trigger.dev run a TRQL query to show me the average duration and success rate of our data-sync task over the past 30 days, broken down by week

Output

Executed TRQL query against 1,847 runs of data-sync: | Week Starting | Avg Duration (s) | Success Rate | Total Runs | |---------------|------------------|--------------|------------| | 2025-01-06 | 12.4 | 98.2% | 412 | | 2025-01-13 | 13.1 | 97.8% | 438 | | 2025-01-20 | 14.7 | 96.5% | 451 | | 2025-01-27 | 15.2 | 95.9% | 546 | Trend: Duration is creeping up ~20% month-over-month, and success rate has dropped 2.3 percentage points. This suggests either growing dataset size or an emerging reliability issue worth investigating.

Notes

This example showcases Execute TRQL Query for custom analytics beyond Trigger.dev's dashboard. TRQL is read-only SQL against your run history, so you can aggregate, filter, and join run metadata. The AI can interpret trends and flag anomalies. Note that complex queries may time out on large datasets, and the schema is specific to Trigger.dev's data model—consult their TRQL docs for available tables and columns.

Use-case deep-dives

Async job debugging in production

When Trigger.dev wins for troubleshooting failed background tasks

A 6-person SaaS team runs nightly data exports and webhook deliveries through Trigger.dev. When a customer reports missing data, the on-call engineer opens Switchy, asks the MCP to list errors from the past 48 hours filtered by the export task, then pulls the run details for the failed batch. The MCP surfaces the exact payload, retry attempts, and error group in one thread—no dashboard hopping. This works because Trigger.dev exposes granular run metadata and error grouping through its API. The trade-off: if your team isn't already using Trigger.dev as your job runtime, this MCP does nothing for you. If you are, the Get Run and List Errors tools collapse 4-click workflows into a single prompt, and the TRQL query tool lets you answer custom questions like 'how many runs failed in EU region last week' without writing SQL by hand.

Batch job monitoring at standup

When this MCP replaces manual batch-status checks

A 3-person data team triggers daily ML inference batches—each batch fans out to 200+ runs. Every morning standup, someone manually checks the Trigger.dev dashboard to confirm completion counts and scan for stragglers. With this MCP in Switchy, the team asks 'show me yesterday's inference batch status and any errors' and gets the batch summary, run counts, and error details in 10 seconds. The Get Batch and Get Batch Results tools are purpose-built for this: they return aggregated completion state and per-run outcomes without fetching every run individually. The boundary: if your batches are under 20 runs, the overhead of batch APIs isn't worth it—just list runs directly. Above 50 runs, the batch tools are faster and the MCP pays for itself in saved dashboard time every week.

Customer support run lookup

When support needs task execution history without eng access

A 10-person support team fields tickets about delayed webhook deliveries. Historically, they ping engineering to check Trigger.dev logs. Now support reps open a shared Switchy thread, paste the customer's order ID, and ask the MCP to find recent runs for the webhook task filtered by that metadata. The Get Run tool returns timing, payload, and output URLs; if the run failed, List Errors surfaces the error group and occurrence count. This works because Trigger.dev indexes run metadata and the MCP exposes search by task and time window. The catch: if your support team needs to inspect payloads larger than a few KB, the presigned URLs require a second step—the MCP won't auto-fetch them. For 80 percent of 'did it run, did it fail' questions, though, this MCP turns a 15-minute eng interrupt into a 30-second self-service lookup.

Frequently asked

What does the Trigger.dev MCP do in Switchy?

It lets your team query background job runs, check batch task status, and debug errors from Trigger.dev projects without leaving Switchy. You can run TRQL analytics queries, inspect run payloads and outputs, and see which error groups are affecting production. Useful when you need to troubleshoot a failed workflow or pull run metrics for a standup.

Do I need admin access to connect Trigger.dev?

You need a Trigger.dev API key with read permissions for runs, batches, and errors. Most teams generate a dedicated key scoped to the specific project you want to monitor. If your Trigger.dev account enforces role-based keys, make sure yours includes at least read access to the runs and analytics endpoints.

Can the MCP trigger new tasks or modify existing runs?

Yes, it can start new task runs via Batch Trigger Task, but it cannot cancel, retry, or edit runs that are already in progress. It also cannot deploy new task versions or change project configuration. For those operations, use the Trigger.dev dashboard or CLI directly.

How is this different from checking the Trigger.dev dashboard?

The MCP surfaces run data and error groups inside Switchy's chat interface, so you can ask questions like "show me failed runs in the last hour" without switching tabs. The dashboard still offers richer visualisation and deployment controls. Use the MCP for quick lookups and the dashboard for deep debugging or config changes.

Who on the team should connect this integration?

Whoever owns the Trigger.dev project or has access to generate API keys. Once connected, any Switchy workspace member can query runs and errors, so it works well for shared on-call rotations or engineering teams that need visibility into background job health without granting everyone full Trigger.dev admin rights.

More developer tools MCPs

See all developer tools MCPs →

Data last verified 61 hours ago.Sources aggregated hourly to weekly. See docs/architecture/model-directory.md.