🔥 BLACK FRIDAY SALE1 course ₹199·any 3 courses ₹399 for 3 months·ALL courses + 1 mock interview ₹599 for 6 monthsClaim offer →

Agentic AI (LangChain and LangGraph) · Agent Foundations · Intermediate · 32 min read

How Tool Calling Really Works: Messages, JSON Schemas and the Execution Loop

Look inside tool calling. Learn the message protocol (AIMessage tool_calls and ToolMessage ids), how a Python function becomes a JSON schema the model sees, parallel calls and tool_choice, writing the loop by hand, and the design rules that make tools reliable, safe and cheap.

How Tool Calling Really Works: Messages, JSON Schemas and the Execution Loop: lesson illustration

A first look

  • Intermediate level · 32 min read
  • 7 interview questions with model answers
  • Agent Foundations · Agentic AI (LangChain and LangGraph)

You will learn to

  • The exact message protocol between your program and the model during a tool call
  • How a Python function and its docstring become the schema the model actually sees
  • bindtools, toolchoice, parallel tool calls and why they matter for latency and correctness
  • …and 3 more topics inside
Create an account to start

Create a free account to see what this lesson covers

  • Every free lesson in every section, in full
  • Track your progress and pick up where you left off
  • Free practice questions and an incident simulation
  • Takes under a minute: name, email and a password

No card needed. Full access to Agentic AI (LangChain and LangGraph) is a paid upgrade you can choose later.