One Logo Pool Ball
FoundationModels · IOS API REFERENCE

LanguageModelSession.ToolCallError

struct · iOS 26.0+ · SDK 27.1

struct ToolCallError

An error that occurs while a language model is calling a tool.

Members (6)

get · iOS 26.0+

underlyingError

TypeScript
get underlyingError(): NativeError
Swift declaration
var underlyingError: any Error

The underlying error that was thrown during a tool call.

set · iOS 26.0+

underlyingError

TypeScript
set underlyingError(value: NativeError)
Swift declaration
var underlyingError: any Error

The underlying error that was thrown during a tool call.

get · iOS 26.0+

errorDescription

TypeScript
get errorDescription(): (string) | null
Swift declaration
var errorDescription: String? { get }

A string representation of the error description.

init · iOS 26.0+

init

TypeScript
static init(tool: SDKHandle, underlyingError: NativeError): LanguageModelSession_ToolCallError
Swift declaration
init(tool: any Tool, underlyingError: any Error)

Creates a tool call error - Parameters: - tool: The tool that produced the error. - underlyingError: The underlying error that was thrown during a tool call.

get · iOS 26.0+

tool

TypeScript
get tool(): SDKHandle
Swift declaration
var tool: any Tool

The tool that produced the error.

set · iOS 26.0+

tool

TypeScript
set tool(value: SDKHandle)
Swift declaration
var tool: any Tool

The tool that produced the error.

Skipped declarations

No declarations were skipped in this snapshot.

All FoundationModels types →