Lesson 0001 · Domains 1 & 2 · Claude Certified Architect — Foundations

How tools actually work: the agentic loop

The big picture tool_choice lives inside. Read this before Lesson 0002. ~8 minutes.
Why this lesson. Lesson 0002 drills one lever (tool_choice) in depth — this is the surrounding machine it lives in. Once you see the full request → tool_use → tool_result loop, the rest of Domains 1 & 2 (loops, MCP, errors) clicks into place — and these were exactly your "right instinct, low confidence" areas in the diagnostic.

1 · What a tool actually is

A tool is just a function you describe to Claude — three parts:

PartWhat it isWhy it matters
nameidentifier, e.g. lookup_orderhow you reference the call
descriptionplain-English: what it does, inputs, when to use vs. similar toolsprimary mechanism Claude uses to pick the right tool
input_schemaJSON schema of the argumentsguarantees the structure of what Claude sends

Claude never runs the tool. It only decides to call it and hands you the arguments. Your code (or an MCP server) does the actual work.

2 · The lifecycle — who sends what

Tool-use lifecycle with a weather example: our server sends Claude the question plus tool details; Claude asks the server to fetch current weather; the server runs code that calls a weather API and returns the data; Claude gives a final response using that data.
The same loop, concretely (weather example). ① Server → Claude: the question plus the tool descriptions (request). ② Claude → Server: “please fetch the weather” — that’s the tool_use block. ③ Server runs its own code against a weather API and returns the result (tool_result). ④ Claude → Server: final answer using the data (stop_reason: "end_turn"). Diagram: Anthropic.
1. YOU → Claude (request) tools: [...] — the function descriptions tool_choice: ... — rule: must a tool be called, and which? messages: [...] — the conversation so far 2. Claude → YOU (response) stop_reason: "tool_use" tool_use: { name, input } — Claude WANTS this call 3. YOU run the tool (your code / an MCP server) 4. YOU → Claude (next request) tool_result: { tool_use_id, content } — the output 5. Claude → YOU stop_reason: "end_turn" → final text answer …or "tool_use" again → repeat from step 3
blue = you send (input) · red = Claude sends (output)

Two pairings people mix up

3 · The three levers you control

LeverControlsFix it when…
descriptionwhich tool Claude picksit misroutes between similar tools → improve descriptions first
tool_choicewhether & which tool must be calledyou need a guaranteed call → "any"; a specific one → forced
input_schemathe structure of the outputyou need valid JSON → schema kills syntax errors (not wrong values)

4 · MCP in one breath

An MCP server is a separate process that exposes tools (and resources) over a standard protocol. The description and the implementation live on the server — not in your request.

Node analogy: the MCP server ≈ a microservice with a described API; the host ≈ a client doing "service discovery" then calling endpoints. The protocol is the shared contract, so one server works with any MCP host.

Practice — does the model run hold up?

Recall, don't recognize. Pick before the feedback shows.

Primary source

📖 Read once: Anthropic's Tool use overview — the "How tool use works" section walks the exact request → tool_use → tool_result cycle. Highest-trust source for this lesson.