Check my levelCoursesProgramsFor teamsPricing
UKSign inSign up
Check my levelCoursesProgramsFor teamsPricingClaude quizPromptsBlogFAQSearchSign upUK
AcademlCoursesClaude Tool Use: Function Calling
Get started free

Online course, Engineering, Claude

Claude Tool Use Course: Function Calling in Python

6 lessons based on Anthropic's tool use course: from a JSON Schema calculator to a support chatbot with four tools.

Start: 7 days freePreview the first lesson, no sign-in

No card needed. The first two lessons are free after sign-up, all lessons come with Pro at $9 a month.

A get_article tool call and its result fit together like two partsLesson 1, 25 minTool Use Overview
  • Intermediatelevel
  • 2 h 45 min6 lessons, 3 modules
  • At your own paceupdated Nov 9, 2026
  • Certificatewith a check code
What you will learnLessonsCertificateQuestionsStart the course

What you will learn

  • Explain the tool use loop: the model requests a call, your code runs the function, the result goes back in tool_result
  • Define a tool with name, description and input_schema, and restrict values with enum
  • Check stop_reason and find every tool_use block by type to read the tool name and arguments
  • Get JSON that matches your schema with structured outputs and strict tool use: sentiment scores, entity extraction
  • Pick a tool_choice mode (auto, any, tool or none) and know which models reject forced calls with a 400 error
  • Keep the message history in the right order: the assistant turn, then tool_result with the same tool_use_id
  • Stop unnecessary tool calls with a system prompt
  • Build a chatbot with four tools: a call dispatcher, a loop and a user reply inside <reply> tags

What is Claude tool use and what does the course cover

Tool use, also called function calling, lets Claude ask your code to run a function and get the result back in a tool_result block. This Academl course has 3 modules and 6 lessons of 25 minutes, based on Anthropic's course. You define a tool in JSON Schema, run the four-step loop, get schema-exact JSON with structured outputs and strict tool use, pick a tool_choice mode and build a support chatbot.

Pricing and what's free →
02
Free lesson

Your First Simple Tool

Claude 3 Haiku, the model in Anthropic's original example (retired on April 20, 2026), multiplied 1,984,135 by 9,343,116 without a tool and was off by 55,364,261,400. In this lesson you define a strict calculator in JSON Schema with an enum of operations, pass it in tools to claude-haiku-5-5 and, on stop_reason = tool_use, get the exact answer: 18,538,003,464,660.

Open the lesson →

Lessons

Tool use fundamentals → structured outputs and tool_choice → the complete loop and a multi-tool chatbot. Both lessons of the first module are free.

Module 1 · 2 lessons · 50 min

Tool Use Fundamentals

What tool use is, why it matters, and how the complete 4-step cycle works between your code and Claude.

1Tool Use Overviewfree25 minWhat function calling is, why you'd extend Claude with tools, and how the 4-step tool use cycle works end to end.2Your First Simple Toolfree25 minBuild a calculator tool, define it with JSON Schema, pass it to Claude, and handle the ToolUseBlock response to get accurate arithmetic results.
Module 2 · 2 lessons · 50 min

Structured Outputs and Tool Choice

Using tool use to force structured JSON output and controlling tool selection with the tool_choice parameter.

3Structured Outputs via Tool Use25 minThe fake-tool trick for guaranteed JSON: sentiment analysis, entity extraction, and article classification using tool input_schema as a response schema.4Controlling Tool Selection: tool_choice25 minThree tool_choice modes: auto (Claude decides), any (must call one), tool (always call a specific one). SMS chatbot and sentiment analyzer as practical examples.
Module 3 · 2 lessons · 1 h 5 min

Complete Workflow and Agentic Patterns

The full 4-step cycle with tool_result and a support chatbot with four tools.

5Complete Workflow: tool_result and Data Return

Who it is for

  • Python developers connecting Claude to their own APIs, databases and CRM
  • People who have sent requests to the Claude API and are moving on to agents that take actions
  • Engineers who need stable JSON from a model response without parsing free text
  • Teams building a support bot or an assistant that looks up an order, cancels it and replies to the customer

How the lessons work

  1. A 25-minute lesson with Python codeEvery step of the loop is shown on code from Anthropic's notebooks: the request with tools, the tool_use block, the function call, tool_result.
  2. A hands-on task in every lessonFor example: build a temperature converter tool or a support ticket classifier with tool_choice. Submit it and the AI reviews it (after sign-up).
  3. Ready-made prompt and common mistakesA prompt that gets Claude to write the definition of your own tool, and mistakes such as a mismatched tool_use_id or the role “tool” instead of “user”.
  4. 3-question quiz and AI tutorThe quiz checks the key points; the lesson's AI tutor answers questions on the topic.
  5. CertificateAfter all lessons you get a certificate with a unique verification code.

Certificate of completion

You get it when you finish every lesson. Each certificate has its own code, so an employer can check it on our site. You can add it to LinkedIn.

See how a certificate is checked
Sample

Sources behind the course

The lessons build on Anthropic's notebooks, written for Claude 3 models. The first four lessons now run on claude-opus-5-5 and claude-haiku-5-5 and cover strict tool use (strict: true), structured outputs, parallel calls and server tools. The complete workflow and chatbot lessons still follow the notebook code: set a current model ID from the docs, find tool_use blocks by type and answer each of them with a tool_result in one user message. Forced tool_choice (any or tool) returns a 400 error on Opus 5.5, Sonnet 5.5 and Fable 5.2; use structured outputs there.

  • Anthropic — Tool use course on GitHub (6 notebooks)
  • Claude API — Tool use overview
  • Claude API — Define tools and tool_choice
  • Claude API — Handle tool calls and tool_result
  • Claude API — Strict tool use
  • Claude API — Structured outputs

What's free and what it costs

  • The first two lessons — the tool use overview and your first simple tool — are free after a free sign-up.
  • After sign-up you get 7 days of full access to all 6 lessons and the whole catalog, no card needed.
  • After that, Pro costs $9 a month or $79 a year. Online card payment is not connected yet: write to info@academl.com and we open access manually.
  • Claude API calls in the examples run on your own key and are billed by Anthropic at its rates.

Claude tool use course: questions

What is the difference between tool use and function calling?+

They are the same mechanism: Anthropic calls it tool use, and its docs add “also called function calling”. Claude never runs your code. It returns a tool_use block with the tool name and arguments, your application calls the function and sends the result back in tool_result.

What experience do I need?+

The course is intermediate: you need Python at the level of functions and dictionaries, plus an Anthropic API key. If you have never called Claude from code, start with “Anthropic API Fundamentals”, which covers pip install anthropic and your first request.

How do I get guaranteed JSON from Claude?+

Use structured outputs: pass a JSON Schema in output_config.format with type json_schema. The feature is GA and needs no beta header. When the JSON is a tool's arguments, add strict: true to the tool definition. A regular tool without strict guarantees nothing. The old trick with tool_choice = {"type": "tool", "name": …} returns a 400 error on Opus 5.5, Sonnet 5.5 and Fable 5.2. Lesson 3 shows both ways on sentiment scores and entity extraction.

How do the tool_choice modes auto, any and tool differ?+

auto lets Claude decide whether to call a tool, and it is the default when tools are provided. any forces a call to one of the tools while Claude picks which, as in the lesson's SMS bot that can only act through tools. tool always calls the named tool. none keeps the tools in the request and blocks calls to them. Opus 5.5, Sonnet 5.5, Fable 5.2 and 5.1, and Mythos 5.2 and 5.1 reject any and tool with a 400 error; Haiku 5.5 and Opus 5 accept them.

Why does the API return an error after tool_result?+

Usually because of message order. Before tool_result the history must contain the assistant turn with the tool_use block, tool_use_id must match that block's id, and the result goes in a message with the user role. All three mistakes are covered in the complete workflow lesson.

The course in short

level
Intermediate
For whom
For developers
Task
AI agents
Tool
Claude
Format
Lessons, quizzes and tasks checked by AI
Lesson language
English

Is this course right for you?

Check your level in 3 minutes. We will show which course to start with.

Check my level

More courses on this topic

Full catalog
Intermediate

MCP, tools, and integrations

MCP course: why the protocol exists, which servers to install first, when to build your own and when a plain tool call is enough.

1 h 25 min, 4 lessonsCertificate
Intermediate

AI Agents: From Architecture to Production

9 lessons on AI agents in Python with the Anthropic SDK: the agent loop, tool calling, memory, orchestrator–worker, MCP, A2A, evals, guardrails, deployment.

5 h 40 min, 9 lessonsCertificate
Advanced

AI Agents & Tool Use

16 Python lessons: function calling in Claude and OpenAI, ReAct from scratch, planning, memory, MCP, LangChain and CrewAI, human-in-the-loop, security, deploy.

8 h 55 min, 16 lessonsCertificate
Advanced

OpenAI Agents & Orchestration

5 Python lessons: handoffs, a coding agent on the Agents SDK, reasoning models with function calling, 4 agents with Structured Outputs. Updated for 2026.

2 h 35 min, 5 lessonsCertificate

Keep going

Anthropic API Fundamentals: SDK setup and your first Claude request →AI Agents fundamentals: the agent loop and tools →MCP, tools and integrations →Claude API from A to Z →Function calling with OpenAI: OpenAI Cookbook recipes →AI for Developers track: Claude Code, agents, MCP →How to write tool descriptions for Claude function calling →Claude Opus 5.5: free trial, test costs and API pricing →

Start with your first tool

The tool use overview and the calculator lesson are open after a free sign-up. Sign up with email or Google to get 7 days of full access to the whole course and catalog.

Sign up
CoursesLLM coursesFor teamsPricingFAQBlogAboutPrivacy
© 2026 AcademlDevelopment & promotion —MMIX — Marketing Mix
30 min
The correct tool_result message format, updating the messages list, and building a Wikipedia Q&A chatbot with a system prompt to prevent unnecessary tool calls.
6Chatbot with Multiple Tools35 minTechNova support chatbot with 4 tools (get_user, get_order_by_id, get_customer_orders, cancel_order), a processing loop, system prompt, and extracting responses from reply tags.
Certificate
Your name
for the course
Tool Use in Claude: Based on Anthropic Materials
ACADEML · VERIFIED · ACADEML · VERIFIED · SAMPLE
Is this course connected with Anthropic?+

It is built on Anthropic's open tool use course from the anthropics/courses repository: the same six topics and the notebook code. Academl adds hands-on tasks with AI review, quizzes and a tutor. Anthropic archived the repository in September 2026, so check the Claude API docs for newer features.

How much does the course cost?+

The first two lessons are always free. Signing up gives 7 days of full access with no card. Pro opens every lesson in the catalog for $9 a month or $79 a year.