AI / Claude Models Basics Interview Questions
What is tool use (function calling) in Claude and which models support it?
Tool use (also called function calling) allows Claude to request the execution of external functions and incorporate their results into its responses. You define a set of tools with names, descriptions, and input schemas; Claude decides when to call them and how to structure the arguments.
# Defining a tool for Claude to use response = client.messages.create( model="claude-opus-4-8", max_tokens=1024, tools=[ { "name": "get_weather", "description": "Get current weather for a city", "input_schema": { "type": "object", "properties": { "city": {"type": "string", "description": "City name"}, "unit": {"type": "string", "enum": ["celsius","fahrenheit"]} }, "required": ["city"] } } ], messages=[{"role": "user", "content": "What's the weather in London?"}] ) # Claude responds with a tool_use block specifying the function and args # You execute the function and return results in a tool_result block
All current Claude models support tool use. Key capabilities include:
- Parallel tool use — Claude can call multiple tools simultaneously in one turn
- Multi-step tool use — Claude reasons across multiple tool call/result cycles
- Computer use — special tools (bash, text editor, computer) for Claude to interact with systems
- Fine-grained tool streaming — GA on Sonnet 4.6 and later (no beta header needed)
More Related questions...