Agentic AI · Intermediate level

Intermediate level · Module 3 of 9 · 12 guided hours

Agent Tools and Function Calling

Giving agents tools safely: tool descriptions and JSON schemas, the function-calling loop, validating arguments, an allow-listed dispatcher, read-only database tools and least-privilege design.

Learning objectives

  • Describe tools with clear schemas and descriptions
  • Implement a safe function-calling loop with an allow-listed dispatcher
  • Build read-only database tools with least privilege

Topics

  • tool descriptions and JSON schemas
  • the function-calling loop
  • validating tool arguments
  • allow-lists and dispatchers
  • read-only database tools
  • least privilege and tool boundaries

Lessons

  1. Lesson 1 Describing Tools for a Model

    Learners write tool names, descriptions and argument schemas (generated from Pydantic models) that help the model choose correctly and make misuse hard.

    tool name and descriptionargument schemamodel_json_schema()required argumentsnarrow tools

  2. Lesson 2 A Safe Function-Calling Loop

    Learners implement the loop: the model requests a tool, the program checks the allow-list, validates arguments, runs the tool with a timeout, returns the result, and limits the number of steps.

    tool calldispatcherallow-listargument validationstep limit

  3. Lesson 3 Read-Only Data Tools and Least Privilege

    Learners build database tools that can only read approved data, using read-only connections, parameterised queries and narrow functions, and map each tool's permissions.

    read-only connectionparameterised queriesleast privilegeexcessive agencypermission map

Practical activity

Implement the project's tools: schemas, descriptions, an allow-listed function-calling loop with validation and limits, read-only data tools and a permission map.

Expected outcomes

  • Safe, well-designed agent tools
  • Least-privilege habits

Assessment

Tool implementation and tests (70%) and permission map (30%).

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.