Skip to content

Commit cb60133

Browse files
kathiekiwiTrigger.dev RepoOps
authored andcommitted
fix(mcp): correct tool descriptions that named a missing tool
Mono-RevId: 4135454460c6ca5de2d455dc0005c843a55eea49
1 parent 5cb97ca commit cb60133

11 files changed

Lines changed: 273 additions & 255 deletions

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+
MCP server: tool descriptions no longer point to a tool that does not exist.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: fix
4+
---
5+
6+
MCP server: tool descriptions no longer point to a tool that does not exist.

‎apps/webapp/app/mcp/tools/schemas/common.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import { z } from "zod";
22

33
const ProjectRefSchema = z
44
.string()
5-
.describe("Project ref (proj_…). Required. Get it from list_projects.")
5+
.describe(
6+
"Project ref (proj_…). Get it from list_projects. Without it the call is refused with the projects you can use."
7+
)
68
.optional();
79

810
export const CommonProjectsInput = z.object({

‎apps/webapp/app/mcp/tools/schemas/deploymentDetails.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ export const GetDeploymentDetailsInput = CommonProjectsInput.omit({ environment:
1414
deploymentId: z
1515
.string()
1616
.max(75)
17-
.regex(DEPLOYMENT_ID, "Must be a deployment_ id or an 8-character deploy short code")
17+
.regex(
18+
DEPLOYMENT_ID,
19+
"Must be a deployment_ id or an 8-character deploy short code. Take it from list_deploys."
20+
)
1821
.describe("The deployment: its deployment_ id or its short code, as list_deploys shows them"),
1922
});
2023

‎apps/webapp/app/mcp/tools/schemas/write.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const TriggerTaskInput = CommonProjectsInput.extend({
2929
taskId: z
3030
.string()
3131
.describe(
32-
"The ID/slug of the task to trigger. Use the get_tasks tool to get a list of tasks and ask the user to select one if it's not clear which one to use."
32+
"The ID/slug of the task to trigger. List the project's tasks first and ask the user to select one if it's not clear which one to use."
3333
),
3434
payload: z
3535
.any()

‎apps/webapp/app/mcp/tools/tasksWrite.server.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export function createTasksWriteTools(options: TasksWriteOptions = {}): McpToolD
113113
name: "trigger_task",
114114
title: "Trigger Task",
115115
description:
116-
"Trigger a task in the project. Use the get_tasks tool to get a list of tasks and ask the user to select one if it's not clear which one to use. The run executes in the background, so only wait for it to complete (with the wait_for_run_to_complete tool) if the user asked you to.",
116+
"Trigger a task in the project. List the project's tasks first and ask the user to select one if it's not clear which one to use. The run executes in the background, so only wait for it to complete (with the wait_for_run_to_complete tool) if the user asked you to.",
117117
shape: TriggerTaskInput.shape,
118118
approval: "configurable",
119119
auth: {

‎apps/webapp/test/fixtures/mcp-golden/2025-11-25/tools-list.json‎

Lines changed: 124 additions & 124 deletions
Large diffs are not rendered by default.

‎apps/webapp/test/fixtures/mcp-golden/2026-07-28/tools-list.json‎

Lines changed: 124 additions & 124 deletions
Large diffs are not rendered by default.

‎apps/webapp/test/mcpDeploymentTools.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,13 +381,15 @@ describe("get_deployment_details", () => {
381381
"rejects an id that is neither a deployment_ id nor a short code",
382382
async ({ prisma }) => {
383383
const { identity, request, scope } = await seed(prisma);
384-
for (const deploymentId of ["Deployment_prod1", "prod code", "prodcod", "prodcode1"]) {
384+
const malformed = ["Deployment_prod1", "prod code", "prodcod", "prodcode1", "a".repeat(21)];
385+
for (const deploymentId of malformed) {
385386
const result = await tool("get_deployment_details")(
386387
{ ...scope, deploymentId },
387388
identity,
388389
request
389390
);
390391
expect(textOf(result)).toContain("Invalid arguments");
392+
expect(textOf(result)).toContain("list_deploys");
391393
}
392394
}
393395
);

‎packages/cli-v3/src/mcp/config.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export const toolsMetadata = {
116116
name: "trigger_task",
117117
title: "Trigger Task",
118118
description:
119-
"Trigger a task in the project. Use the get_tasks tool to get a list of tasks and ask the user to select one if it's not clear which one to use. The run executes in the background, so only wait for it to complete (with the wait_for_run_to_complete tool) if the user asked you to.",
119+
"Trigger a task in the project. List the project's tasks first and ask the user to select one if it's not clear which one to use. The run executes in the background, so only wait for it to complete (with the wait_for_run_to_complete tool) if the user asked you to.",
120120
},
121121
get_run_details: {
122122
name: "get_run_details",

0 commit comments

Comments
 (0)