Type Alias: ToolModelOutput
ToolModelOutput = {
type:"text";value:string; } | {type:"content";value:ToolContentBlock[]; } | {type:"omit"; }
Defined in: packages/core/src/utils/tools.ts:70
What the model sees of a tool's result (returned by toModelOutput).
Examples
Text representation
toModelOutput: ({ output }) => ({
type: 'text',
value: `Search found ${output.results.length} results`
})
Omit from model context
toModelOutput: ({ output }) => ({
type: 'omit' // Tool ran but output won't be sent to model
})
Rich content blocks
toModelOutput: ({ output }) => ({
type: 'content',
value: [{ type: 'text', text: output.summary }]
})