Skip to main content

Interface: IToolResultPart

Defined in: contracts/types.ts:127

What came back for one tool call: the tool's output, or the text the model reads when the call was rejected by the human, denied by the policy or failed.

Stored in a TOOL turn by the TurnBuilder, one per IToolCallPart. The agent loop reads it to know which tools were executed (rejected, denied and failed results do not count, D76), the UI reads it to render the timeline.

Properties​

callId​

callId: string

Defined in: contracts/types.ts:131

The callId of the IToolCallPart this result answers.


denied?​

optional denied?: boolean

Defined in: contracts/types.ts:139

True when the tool's policy refused the call (D87); output holds the text the model reads. Not counted as executed (D76).


endedRun?​

optional endedRun?: boolean

Defined in: contracts/types.ts:156

True on the result of the call that ended the run (the tool's endsRun, D86); at most one per run.

A paused run keeps it in its messages, so a run that pauses in the step a tool ended it still ends after the resume.


errorCode?​

optional errorCode?: number

Defined in: contracts/types.ts:150

The code of the error behind a failed call: the tool's own dynaError code, or the gateway's for a refusal, an invalid input, a timeout, an oversized output or a wrapped foreign error.

Names the failure without parsing output.error, and matches IToolErrorReport.error.code of the same callId.

Only with failed: true; absent when the error carried no code.


failed?​

optional failed?: boolean

Defined in: contracts/types.ts:141

True when the tool did not run or threw (refused, invalid input, timeout, error); output holds {error}. Not counted as executed (D76).


kind​

kind: TOOL_RESULT

Defined in: contracts/types.ts:129

The discriminant of TTurnPart.


output​

output: unknown

Defined in: contracts/types.ts:135

What execute returned; on a rejected, denied or failed call the text the model read instead.


rejected?​

optional rejected?: boolean

Defined in: contracts/types.ts:137

True when the human rejected the call; output holds the reason.


toolName​

toolName: string

Defined in: contracts/types.ts:133

The tool that was called.