Skip to content

ToolOutcome

type ToolOutcome<O> =
| {
callId: string;
durationMs: number;
ok: true;
output: O;
summary: string;
}
| {
callId: string;
cause?: unknown;
durationMs: number;
error: string;
kind: ToolFailure;
ok: false;
};

Defined in: core/src/tools.ts:26

Type Parameter
O
{
callId: string;
durationMs: number;
ok: true;
output: O;
summary: string;
}

{
callId: string;
cause?: unknown;
durationMs: number;
error: string;
kind: ToolFailure;
ok: false;
}
callId: string;
optional cause?: unknown;
durationMs: number;
error: string;

Fed back to the model verbatim, so it must read as an instruction to a reader who cannot see our stack trace.

kind: ToolFailure;
ok: false;