class

Anthropic::InlineTool

Inherits Anthropic::Tool < Reference < Object

Simple tool defined inline with blocks

Constructors

new(name : String, description : String, schema : Hash(String, Schema::Property), required : Array(String) = [] of String, cache_control : CacheControl | Nil = nil, &handler : JSON::Any -> String)
Source

Instance methods

cache_control

Cache control for prompt caching on this tool definition

Source
call(input : JSON::Any) : String

Execute the tool with the given input (optional, for auto-execution)

Source
description

Human-readable description of what the tool does

Source
input_schema_properties

JSON Schema properties describing the tool's input parameters

Source
name

The name of the tool (used by Claude to identify it)

Source
required_properties

Override to specify which input properties are required

Source