Interface: ToolExecutionResult<TOutput>
Defined in: packages/agentos/src/core/tools/ITool.ts:49
Defines the standardized outcome of a tool's execution. It captures whether the execution was successful, the resulting output data, or any error information if it failed.
ToolExecutionResult
Type Parameters
TOutput
TOutput = any
The expected type of the output data if the tool executes successfully. Defaults to any.
Properties
contentType?
optionalcontentType:string
Defined in: packages/agentos/src/core/tools/ITool.ts:53
The MIME type of the output data.
Defaults to "application/json". Other common types include "text/plain", "image/png", etc.
This helps consumers of the tool result to correctly interpret the output.
details?
optionaldetails:Record<string,any>
Defined in: packages/agentos/src/core/tools/ITool.ts:54
An optional object for any additional details or metadata about the execution or error. This can include things like error codes, stack traces (for debugging), performance metrics, or other contextual information.
error?
optionalerror:string
Defined in: packages/agentos/src/core/tools/ITool.ts:52
A human-readable error message if the execution failed (success is false).
output?
optionaloutput:TOutput
Defined in: packages/agentos/src/core/tools/ITool.ts:51
The output data from the tool if successful. The structure
of this data should ideally conform to the tool's outputSchema (if defined).
success
success:
boolean
Defined in: packages/agentos/src/core/tools/ITool.ts:50
Indicates whether the tool execution was successful. true for success, false for failure.