From 8ba049072b4a33a11f89b6f28c947bc3fb16785e Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 31 Jul 2026 10:02:34 +0000 Subject: [PATCH] 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 --- .changeset/mcp-trigger-task-region.md | 5 +++++ docs/mcp-tools.mdx | 2 +- packages/cli-v3/src/mcp/schemas.ts | 6 ++++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .changeset/mcp-trigger-task-region.md diff --git a/.changeset/mcp-trigger-task-region.md b/.changeset/mcp-trigger-task-region.md new file mode 100644 index 00000000000..56e362eb1fb --- /dev/null +++ b/.changeset/mcp-trigger-task-region.md @@ -0,0 +1,5 @@ +--- +"trigger.dev": patch +--- + +You can now choose the region a run executes in when triggering a task through the MCP server. diff --git a/docs/mcp-tools.mdx b/docs/mcp-tools.mdx index 9a920274fba..d35a733b091 100644 --- a/docs/mcp-tools.mdx +++ b/docs/mcp-tools.mdx @@ -61,7 +61,7 @@ Get the current worker for a project, including the worker version, SDK version, ### trigger_task -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. +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. **Example usage:** - `"Run the email-notification task"` diff --git a/packages/cli-v3/src/mcp/schemas.ts b/packages/cli-v3/src/mcp/schemas.ts index 64a03438028..c711735537a 100644 --- a/packages/cli-v3/src/mcp/schemas.ts +++ b/packages/cli-v3/src/mcp/schemas.ts @@ -100,6 +100,12 @@ export const TriggerTaskInput = CommonProjectsInput.extend({ .number() .describe("The maximum duration in seconds of the task run") .optional(), + region: z + .string() + .describe( + "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" + ) + .optional(), tags: z .array(z.string()) .describe(