Graphorin API reference v0.4.0
Graphorin API reference / @graphorin/core / / ToolResult
Interface: ToolResult<TOutput>
Defined in: packages/core/src/types/tool.ts:161
The successful outcome of a tool invocation, returned to the model.
Stable
Type Parameters
| Type Parameter | Default type |
|---|---|
TOutput | unknown |
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
contentParts? | readonly | readonly MessageContent[] | Optional content parts to append to the conversation (images, files, etc.). Tools that emit binary results use this field instead of trying to encode the binary into output. | packages/core/src/types/tool.ts:170 |
durationMs | readonly | number | - | packages/core/src/types/tool.ts:171 |
output | readonly | TOutput | - | packages/core/src/types/tool.ts:164 |
resultHandle? | readonly | ResultHandle | Set when the tool's output was large enough to be stored behind a handle (the 'spill-to-file' truncation strategy, or — later — an MCP resource_link) instead of being inlined in full. The runtime inlines only the bounded ResultHandle.preview and lets the model fetch the rest on demand via the built-in read_result tool. Absent for results that were inlined directly. | packages/core/src/types/tool.ts:180 |
toolCallId | readonly | string | - | packages/core/src/types/tool.ts:162 |
toolName | readonly | string | - | packages/core/src/types/tool.ts:163 |