Anthropic::AdvisorTool
Inherits JSON::Serializable < Anthropic::ServerTool < JSON::Serializable < Struct < Value < Object
Advisor tool — delegates questions to a secondary model at runtime.
A server-side "tool" that lets the primary model consult a specified advisor model on demand. Useful for routing specialized questions to a different model within the same conversation.
Requires the beta header advisor-tool-2026-03-01.
message = client.beta.messages.create(
betas: [Anthropic::ADVISOR_TOOL_BETA],
model: Anthropic::Model::CLAUDE_OPUS_4_7,
max_tokens: 1024,
server_tools: [Anthropic::AdvisorTool.new(model: Anthropic::Model::CLAUDE_HAIKU_4_5)],
messages: [{role: "user", content: "Check this code for vulnerabilities."}]
)
Constructors
Advisor tool — delegates questions to a secondary model at runtime.
A server-side "tool" that lets the primary model consult a specified advisor model on demand. Useful for routing specialized questions to a different model within the same conversation.
Requires the beta header advisor-tool-2026-03-01.
message = client.beta.messages.create(
betas: [Anthropic::ADVISOR_TOOL_BETA],
model: Anthropic::Model::CLAUDE_OPUS_4_7,
max_tokens: 1024,
server_tools: [Anthropic::AdvisorTool.new(model: Anthropic::Model::CLAUDE_HAIKU_4_5)],
messages: [{role: "user", content: "Check this code for vulnerabilities."}]
)
Class methods
Instance methods
Allowed callers for the advisor tool. Valid values include "direct",
"code_execution_20250825", "code_execution_20260120", and
"code_execution_20260521".