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(