Skip to content
providerkit
GitHub

ToolResult

type ToolResult =
| ToolImageHistory & object
| {
content: string;
kind: | ToolFailure
| "denied"
| "refused"
| "cancelled"
| "unknown_tool"
| "disabled_tool"
| "invalid_output"
| "interrupted";
ok: false;
};

Defined in: agents/src/types.ts:899

ToolImageHistory & object

final keeps the raw stopping-tool output (or summary for text agents), not the validator’s possibly non-JSON return value. Restoring can validate without replay.


{
content: string;
kind: | ToolFailure
| "denied"
| "refused"
| "cancelled"
| "unknown_tool"
| "disabled_tool"
| "invalid_output"
| "interrupted";
ok: false;
}
content: string;
kind:
| ToolFailure
| "denied"
| "refused"
| "cancelled"
| "unknown_tool"
| "disabled_tool"
| "invalid_output"
| "interrupted";

refused: host.screenCall refused the call before it started.

ok: false;