Skip to content
Claude Certified Developer – Foundations (CCDV-F) Exam Prep

Lesson 17 of 25 · 7 min

x
17/25

Tool Implementation

Video lesson: CCDV-F 17/25: Tool Implementation (Domain 8, 4.4%)

Official scope (Exam Guide v1.0): function calling, tool descriptions, error handling, agentic harness dispatch, client-side vs server-side tools, approval patterns, tool-set construction.

Anatomy of a tool

name, description, input_schema (JSON Schema), optional input examples and strict: true. The description is by far the most important factor: what it does, when to use it and when not, what each parameter means, what it returns, its limits. Several sentences, not a phrase. Tool definitions are assembled into the model's instructions, so a vague description is a vague prompt.

Client vs server tools

TypeExamplesWho executesWhat you see
Client: your ownget_weather, lookup_orderYour codestop_reason: tool_use, tool_use blocks; you return tool_result
Client: Anthropic-schemabash, text_editor, memory, computer use, browser useYour code (Anthropic publishes the schema and trains on it)Same as above
Serverweb_search, web_fetch, code_execution, tool_search, MCP connectorAnthropic's infrastructureserver_tool_use and results in the same response; pause_turn if the server loop hits its limit

Server tools can add usage charges (for example per web search). Tool definitions and a tool-use system prompt (a few hundred tokens) count as input.

Harness dispatch (verified flow, design guidance on structure)

Read each tool_use block → look up the handler by name (a registry) → validate input → run → return a tool_result with the matching tool_use_id. Claude may request several tools in parallel: run independent ones concurrently and return all results in one user message, with no text after them. The SDK tool runner can do this loop for you.

Errors are results

Return a tool_result with is_error: true and an actionable message so the model can correct and retry; do not crash the loop.

tool_choice

auto (default with tools), any, tool (named), none. Forced choices suppress text before the call and are rejected (400) on Opus 5.5, Sonnet 5.5 and Fable 5.1; there, use auto with strict tools, or structured outputs.

Approval patterns (design guidance, verified mechanisms)

Read-only by default; allowlists; human approval before destructive or irreversible actions; hooks or permission rules that deny or ask; validate inputs and the caller's rights server-side; never trust model-supplied arguments blindly; least privilege per tool.

Tool-set construction (design guidance, verified mechanics)

Fewer, more capable tools over many near-duplicates; namespaced names (orders_lookup); return only high-signal fields with stable ids; make misuse hard through parameter design. For large libraries, defer loading and use tool search so only needed definitions enter context.

Exam traps

  • One-line descriptions for similar tools, causing misrouting.
  • "Claude executes my function." Your code does (except server tools).
  • Throwing an exception instead of an error tool_result.
  • Forced tool_choice on a model that rejects it.
  • Returning results one by one for parallel calls, or adding text after them.

References

  1. Tool use overview — checked Oct 16, 2026
  2. Define tools — checked Oct 16, 2026
  3. Handling stop reasons — checked Oct 16, 2026
  4. Errors (forced tool use) — checked Oct 16, 2026
  5. Tool search tool — checked Oct 16, 2026

Check your understanding

  • Claude keeps picking the wrong one of two similar tools. First fix?Show answer

    Answer

    Sharpen both descriptions (when to use, when not); consider merging or renaming.
  • Web search: who runs it?Show answer

    Answer

    Anthropic (server tool).
  • A delete tool takes an id from the model. Safeguards?Show answer

    Answer

    Server-side validation of id and caller rights, confirmation or human approval, least privilege.
  • Two tool_use blocks in one response. How do you reply?Show answer

    Answer

    One user message with both tool_result blocks.
Previous

Progress is saved in this browser.

Next Lesson