Skip to content

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 ParameterDefault type
TOutputunknown

Properties

PropertyModifierTypeDescriptionDefined in
contentParts?readonlyreadonly 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
durationMsreadonlynumber-packages/core/src/types/tool.ts:171
outputreadonlyTOutput-packages/core/src/types/tool.ts:164
resultHandle?readonlyResultHandleSet 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
toolCallIdreadonlystring-packages/core/src/types/tool.ts:162
toolNamereadonlystring-packages/core/src/types/tool.ts:163