C12: Agentic AI Foundations for Interviews

Section 4: Tool Calling, Actions and MCP


SLIDE 22: Section Intro, Tool Calling and Actions

Section 4: Tool Calling, Actions and MCP

Tool calling is what separates an agent from a chatbot. When an LLM calls a tool, it generates a structured request to invoke an external function, and your system executes it. Without tool calling, the LLM is limited to what it memorized during training. With tool calling, it can look up live data, process payments, query databases, and modify real systems.

This section covers how function calling works mechanically, how to design tool schemas that the LLM can use reliably, how to handle errors when tools fail, how to optimize with parallel execution, and how the Model Context Protocol (MCP) standardizes tool integration.

What We’ll Cover

  1. How LLMs call external functions (the mechanism)
  2. Designing tool schemas (name, description, parameters)
  3. Structured output and response parsing
  4. Error handling when tools fail
  5. Parallel and sequential tool execution
  6. Model Context Protocol (MCP)
  7. Worked example: designing the support agent’s complete tool set

Connection to the Agent Loop

In the Perceive, Reason, Act, Observe loop from Section 1, tool calling IS the “Act” step. The LLM reasons about what tool to call (Reason), generates the structured call (Act), your system executes it and returns the result (Observe), and the LLM reasons about the result before deciding the next step. Everything in this section teaches you how to build and control that “Act” step.


SLIDE 23: How LLMs Call External Functions