Use Claude’s native function calling capability to interact with external tools
Official documentation: https://docs.anthropic.com/en/docs/build-with-claude/tool-useUse Anthropic Claude models to perform function calling (tool use) in native format.
claude-haiku-4-5-20251001claude-sonnet-4-20250514claude-opus-4-5-20251101role and content.name (string): The name of the tooldescription (string): Description of what the tool doesinput_schema (object): JSON Schema defining the tool’s input parametersmessage.tool_use blocks.tool_use when the model wants to call a tool.