Skip to content

Interface: ToolErrorOptions

Defined in: packages/core/src/core/response.ts:281

Options for a self-healing error response.

See

toolError for usage

Properties

availableActions?

ts
optional availableActions: string[];

Defined in: packages/core/src/core/response.ts:287

Action names the agent should try instead


details?

ts
optional details: Record<string, string>;

Defined in: packages/core/src/core/response.ts:304

Structured metadata about the error (e.g. the invalid value, the entity ID that wasn't found, or constraint violations).

Rendered as <details> child elements in the XML envelope.

Example

ts
`{ entity_id: 'inv_123', expected_type: 'string' }`

message

ts
message: string;

Defined in: packages/core/src/core/response.ts:283

Human-readable error description


retryAfter?

ts
optional retryAfter: number;

Defined in: packages/core/src/core/response.ts:311

Suggested retry delay in seconds for transient errors.

Rendered as <retry_after>{n} seconds</retry_after> in the XML envelope. Useful for rate-limit and concurrency errors.


severity?

ts
optional severity: ErrorSeverity;

Defined in: packages/core/src/core/response.ts:295

Error severity.

Defaults to 'error' when omitted.

Example

ts
`'warning'` for deprecation notices

suggestion?

ts
optional suggestion: string;

Defined in: packages/core/src/core/response.ts:285

Recovery suggestion for the LLM agent