Anthropic::BashTool
Inherits JSON::Serializable < Anthropic::ServerTool < JSON::Serializable < Struct < Value < Object
Bash tool - allows Claude to execute bash commands
An agent tool for running shell commands in a sandboxed environment. This tool is GA and does not require a beta header.
message = client.messages.create(
model: Anthropic::Model::CLAUDE_SONNET_4_6,
max_tokens: 4096,
server_tools: [Anthropic::BashTool.new],
messages: [{role: "user", content: "List the files in the current directory"}]
)
Constructors
new(pull : JSON::PullParser)
Bash tool - allows Claude to execute bash commands
An agent tool for running shell commands in a sandboxed environment. This tool is GA and does not require a beta header.
message = client.messages.create(
model: Anthropic::Model::CLAUDE_SONNET_4_6,
max_tokens: 4096,
server_tools: [Anthropic::BashTool.new],
messages: [{role: "user", content: "List the files in the current directory"}]
)
new(allowed_callers : Array(String) | Nil = nil, cache_control : CacheControl | Nil = nil, defer_loading : Bool | Nil = nil, input_examples : Array(JSON::Any) | Nil = nil, strict : Bool | Nil = nil)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
allowed_callers
Sourcecache_control
Sourcedefer_loading
Sourceinput_examples
Sourcename
Sourcestrict
Sourcetype
Source