Package: @effect/ai
Module: Response
Encoded representation of tool result parts for serialization.
Signature
export interface ToolResultPartEncoded extends BasePartEncoded<"tool-result", ToolResultPartMetadata> {
/**
* Unique identifier matching the original tool call.
*/
readonly id: string
/**
* Name of the tool being called, which corresponds to the name of the tool
* in the `Toolkit` included with the request.
*/
readonly name: string
/**
* The result returned by the tool execution.
*/
readonly result: unknown
/**
* Whether or not the result of executing the tool call handler was an error.
*/
readonly isFailure: boolean
/**
* Optional provider-specific name for the tool, which can be useful when the
* name of the tool in the `Toolkit` and the name of the tool used by the
* model are different.
*
* This is usually happens only with provider-defined tools which require a
* user-space handler.
*/
readonly providerName?: string | undefined
/**
* Whether the tool was executed by the provider (true) or framework (false).
*/
readonly providerExecuted?: boolean | undefined
}
Since v1.0.0