diff options
| author | joshualitt <[email protected]> | 2025-08-21 14:40:18 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-21 21:40:18 +0000 |
| commit | ec41b8db8e714867ea354c29c07f009cd837ac23 (patch) | |
| tree | 4bb01ac90a25d6d82cfc005d68aae336be192744 /packages/core/src/tools/tool-registry.ts | |
| parent | 299bf58309a0950ac81ae051b02ec64463ebd153 (diff) | |
feat(core): Annotate remaining error paths in tools with type. (#6699)
Diffstat (limited to 'packages/core/src/tools/tool-registry.ts')
| -rw-r--r-- | packages/core/src/tools/tool-registry.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/core/src/tools/tool-registry.ts b/packages/core/src/tools/tool-registry.ts index 7acd778d..60c9977d 100644 --- a/packages/core/src/tools/tool-registry.ts +++ b/packages/core/src/tools/tool-registry.ts @@ -20,6 +20,7 @@ import { connectAndDiscover } from './mcp-client.js'; import { McpClientManager } from './mcp-client-manager.js'; import { DiscoveredMCPTool } from './mcp-tool.js'; import { parse } from 'shell-quote'; +import { ToolErrorType } from './tool-error.js'; import { safeJsonStringify } from '../utils/safeJsonStringify.js'; type ToolParams = Record<string, unknown>; @@ -106,6 +107,10 @@ class DiscoveredToolInvocation extends BaseToolInvocation< return { llmContent, returnDisplay: llmContent, + error: { + message: llmContent, + type: ToolErrorType.DISCOVERED_TOOL_EXECUTION_ERROR, + }, }; } |
