📖 Lesson content
Summary
Tools allow Claude to access information from the outside world, solving one of its key limitations. By default, Claude only has access to information it was trained on, which means it can't provide current information like today's weather or recent news.

When a user asks "What's the weather in San Francisco, California?" Claude will typically respond with "I'm sorry, but I don't have access to up-to-date weather information." Tools fix this problem by creating a bridge between Claude and external data sources.
How Tool Use Works
The tool use process follows a specific flow that involves multiple back-and-forth communications between your server and Claude:

- Initial Request: You send Claude a question along with instructions on how to get extra data
- Tool Request: Claude analyzes the question and asks for specific external data it needs
- Data Retrieval: Your server runs code to fetch the requested information
- Final Response: Claude uses the external data to provide a complete, informed answer
Weather Example in Practice
Here's how the tool use flow works for a weather query:

When a user asks about weather, you include details on how to retrieve current weather data in your initial request to Claude. Claude recognizes it needs current weather information and asks your server to get it. Your server calls a weather API, retrieves the live data, and sends it back to Claude. Finally, Claude combines the original question with the fresh weather data to provide an accurate, current response.
Implementation Challenges
Tool use can feel confusing because there's a disconnect between the logical flow and how you actually write the code. The implementation doesn't follow the same order as the conceptual steps:

In practice, you often need to:
- Write the tool function first
- Create a JSON schema specification
- Handle the ToolUse and ToolResult parts
- Include the schema with your request
This jumping around between different parts of the implementation is why tool use initially seems complex. The key is understanding that each step in the logical flow requires specific code components that you'll build in a different order than they execute.
In the following videos, we'll implement tool use step by step, frequently referencing this flow diagram to keep track of which piece we're currently building.
🔁 Related lessons
- Next: Tool functions
- Previous: Quiz on prompt engineering
- Same section: Overview of Claude Models · Accessing the API · Making a request
- Part of paths: Path C
- Reference docs: Glossary · Skills atlas · By use-case
📚 Source & attribution
- Original Anthropic Academy lesson: https://anthropic.skilljar.com/claude-in-amazon-bedrock/276756
- © 2025 Anthropic. Educational fair-use only.