From 2f22a435906ae65e9432b7e17e64a1ec9a153035 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Tue, 4 Nov 2025 18:56:43 -0800 Subject: [PATCH] Fix for the MCP tool that gets logs for debugging runs This was broken when we changed the data on the backend that returns log/span data from runs. We changed the data structured and the internal API that the MCP client uses was failing to parse with the Zod schema --- .changeset/fuzzy-wolves-repeat.md | 5 +++++ packages/cli-v3/src/mcp/formatters.ts | 2 +- packages/core/src/v3/schemas/api.ts | 5 ++--- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 .changeset/fuzzy-wolves-repeat.md diff --git a/.changeset/fuzzy-wolves-repeat.md b/.changeset/fuzzy-wolves-repeat.md new file mode 100644 index 0000000000..e9133636a3 --- /dev/null +++ b/.changeset/fuzzy-wolves-repeat.md @@ -0,0 +1,5 @@ +--- +"trigger.dev": patch +--- + +Fix for the MCP tool that gets run logs to help debugging diff --git a/packages/cli-v3/src/mcp/formatters.ts b/packages/cli-v3/src/mcp/formatters.ts index a16f947a73..eee9ccf18f 100644 --- a/packages/cli-v3/src/mcp/formatters.ts +++ b/packages/cli-v3/src/mcp/formatters.ts @@ -238,7 +238,7 @@ function formatSpan( const duration = formatDuration(span.data.duration); const startTime = formatDateTime(span.data.startTime); - lines.push(`${indent}${prefix} ${span.message} ${statusIndicator}`); + lines.push(`${indent}${prefix} ${span.data.message} ${statusIndicator}`); lines.push(`${indent} Duration: ${duration}`); lines.push(`${indent} Started: ${startTime}`); diff --git a/packages/core/src/v3/schemas/api.ts b/packages/core/src/v3/schemas/api.ts index b018b2a4a8..b372ed5fa5 100644 --- a/packages/core/src/v3/schemas/api.ts +++ b/packages/core/src/v3/schemas/api.ts @@ -1267,9 +1267,9 @@ export type ApiBranchListResponseBody = z.infer