Skip to content

Commit a7f9568

Browse files
authored
fix(telemetry): always set isError for tool events (#308)
1 parent e60c16e commit a7f9568

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/mcp/src/sf-mcp-server.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,13 @@ export class SfMcpServer extends McpServer implements ToolMethodSignatures {
144144
this.telemetry?.sendEvent('TOOL_CALLED', {
145145
name,
146146
runtimeMs,
147-
isError: result.isError,
147+
// `isError`:
148+
// Whether the tool call ended in an error.
149+
//
150+
// If not set, this is assumed to be false (the call was successful).
151+
//
152+
// https://modelcontextprotocol.io/specification/2025-06-18/schema#calltoolresult
153+
isError: result.isError ?? false,
148154
});
149155

150156
return result;

0 commit comments

Comments
 (0)