diff options
Diffstat (limited to 'packages/core/src/tools/tools.ts')
| -rw-r--r-- | packages/core/src/tools/tools.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/core/src/tools/tools.ts b/packages/core/src/tools/tools.ts index 0d7b402a..0e3ffabf 100644 --- a/packages/core/src/tools/tools.ts +++ b/packages/core/src/tools/tools.ts @@ -5,6 +5,7 @@ */ import { FunctionDeclaration, PartListUnion, Schema } from '@google/genai'; +import { ToolErrorType } from './tool-error.js'; /** * Interface representing the base Tool functionality @@ -217,6 +218,14 @@ export interface ToolResult { * For now, we keep it as the core logic in ReadFileTool currently produces it. */ returnDisplay: ToolResultDisplay; + + /** + * If this property is present, the tool call is considered a failure. + */ + error?: { + message: string; // raw error message + type?: ToolErrorType; // An optional machine-readable error type (e.g., 'FILE_NOT_FOUND'). + }; } export type ToolResultDisplay = string | FileDiff; |
