struct

Anthropic::ResponseTool

Inherits JSON::Serializable < Struct < Value < Object

A custom tool definition echoed back by the API (inline tool definitions). An echo of a request ToolDefinition with the input schema kept as JSON::Any (response echoes may vary) and cache_control omitted.

Constructors

from_definition(definition : ToolDefinition) : self

Build a response tool from a request tool definition.

Source
new(input_schema : JSON::Any, name : String, allowed_callers : Array(String) | Nil = nil, defer_loading : Bool | Nil = nil, description : String | Nil = nil, eager_input_streaming : Bool | Nil = nil, input_examples : Array(JSON::Any) | Nil = nil, strict : Bool | Nil = nil, type : String | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

allowed_callers
Source
defer_loading?
Source
description
Source
eager_input_streaming
Source
input_examples
Source
input_schema
Source
name
Source
strict
Source
type

Tool kind. Always "custom" when present.

Source