summaryrefslogtreecommitdiff
path: root/packages/server/src/tools/mcp-tool.ts
diff options
context:
space:
mode:
authorOlcan <[email protected]>2025-05-30 15:59:23 -0700
committerGitHub <[email protected]>2025-05-30 15:59:23 -0700
commitc81148a0cc8489f657901c2cc7247c0834075e1a (patch)
tree896711ba726b36ecd85f143b30bb30bbefcaeb5c /packages/server/src/tools/mcp-tool.ts
parent2e57989aec569055a11f21762f72b961377281ab (diff)
use json block for mcp tool output (and re-enable markdown rendering) (#635)
Diffstat (limited to 'packages/server/src/tools/mcp-tool.ts')
-rw-r--r--packages/server/src/tools/mcp-tool.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/server/src/tools/mcp-tool.ts b/packages/server/src/tools/mcp-tool.ts
index 80e6bbde..d02b8632 100644
--- a/packages/server/src/tools/mcp-tool.ts
+++ b/packages/server/src/tools/mcp-tool.ts
@@ -42,7 +42,7 @@ Returns the MCP server response as a json string.
name,
description,
parameterSchema,
- false, // isOutputMarkdown
+ true, // isOutputMarkdown
false, // canUpdateOutput
);
}
@@ -93,9 +93,10 @@ Returns the MCP server response as a json string.
timeout: this.timeout ?? MCP_TOOL_DEFAULT_TIMEOUT_MSEC,
},
);
+ const output = '```json\n' + JSON.stringify(result, null, 2) + '\n```';
return {
- llmContent: JSON.stringify(result, null, 2),
- returnDisplay: JSON.stringify(result, null, 2),
+ llmContent: output,
+ returnDisplay: output,
};
}
}