struct

Anthropic::ToolCaller

Inherits JSON::Serializable < Struct < Value < Object

Normalized caller information for server-side tool invocations.

The API may return this as either a legacy string or an object such as {"type":"direct"} or {"type":"code_execution_20260120","tool_id":"..."}.

Constructors

new(type : String, tool_id : String | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

direct?
Source
to_s(io : IO) : Nil

Same as #inspect(io).

Source
tool_id
Source
type
Source