Skip to content

ToolResult

Defined in: packages/sdk/src/tools/types.ts:116

What a tool returns. content is what the model reads, details is for logs and user interfaces, and structured is typed data for your code; only content reaches the model. isError marks a failure for the model. terminate asks the run to end after this step. pause asks the user a question: the call then waits for the answer, which reaches the model as its result. outcome reports what a write did: any kind except applied sets isError, and the model reads the outcome’s sentence and fields before content.

S = unknown

readonly content: readonly ModelContent[]

Defined in: packages/sdk/src/tools/types.ts:117


readonly optional details?: unknown

Defined in: packages/sdk/src/tools/types.ts:118


readonly optional isError?: boolean

Defined in: packages/sdk/src/tools/types.ts:120


readonly optional outcome?: WriteOutcome

Defined in: packages/sdk/src/tools/types.ts:123


readonly optional pause?: object

Defined in: packages/sdk/src/tools/types.ts:122

readonly kind: "clarification"

readonly question: string


readonly optional structured?: S

Defined in: packages/sdk/src/tools/types.ts:119


readonly optional terminate?: boolean

Defined in: packages/sdk/src/tools/types.ts:121

These docs are licensedCC BY 4.0. Thelicence text is in the repository.