Skip to content

Commit 87ad538

Browse files
committed
feat(cli): expose region option on the MCP trigger_task tool
Adds a `region` field to the `trigger_task` MCP tool's options so a run can be triggered in a specific region, overriding the project default. The value is passed straight through to the trigger API, which already accepts it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwLsz4J3EwF9EMSpLY6LAC
1 parent efcb89a commit 87ad538

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
You can now choose the region a run executes in when triggering a task through the MCP server.

docs/mcp-tools.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Get the current worker for a project, including the worker version, SDK version,
6161

6262
### trigger_task
6363

64-
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.
64+
Trigger a task to run with a specific payload. You can add a delay, set tags, configure retries, choose a machine size, pick a region, set a TTL, or use an idempotency key.
6565

6666
**Example usage:**
6767
- `"Run the email-notification task"`

packages/cli-v3/src/mcp/schemas.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ export const TriggerTaskInput = CommonProjectsInput.extend({
100100
.number()
101101
.describe("The maximum duration in seconds of the task run")
102102
.optional(),
103+
region: z
104+
.string()
105+
.describe(
106+
"The region to run the task in, overriding the default region set for the project. Available regions are listed on the Regions page in the dashboard, and this has no effect in the dev environment"
107+
)
108+
.optional(),
103109
tags: z
104110
.array(z.string())
105111
.describe(

0 commit comments

Comments
 (0)