feat(mcp): log include MCP request with error (#6778)

This commit is contained in:
Lee James
2025-08-22 14:10:30 -04:00
committed by GitHub
parent d35abdab99
commit 240830afac
2 changed files with 13 additions and 7 deletions

View File

@@ -142,9 +142,9 @@ class DiscoveredMCPToolInvocation extends BaseToolInvocation<
if (this.isMCPToolError(rawResponseParts)) {
const errorMessage = `MCP tool '${
this.serverToolName
}' reported tool error with response: ${JSON.stringify(
rawResponseParts,
)}`;
}' reported tool error for function call: ${safeJsonStringify(
functionCalls[0],
)} with response: ${safeJsonStringify(rawResponseParts)}`;
return {
llmContent: errorMessage,
returnDisplay: `Error: MCP tool '${this.serverToolName}' reported an error.`,