Function Calling and Tool Use in AI Systems

Tool Use Turns Models Into System Actors

Function calling lets an AI system request structured actions such as searching, writing records, sending messages, querying databases, or triggering workflows. That turns the model from a text generator into a system actor.

Engineering Controls

  • Use strict schemas for tool arguments and reject invalid calls.
  • Separate read-only tools from write or action tools.
  • Apply least-privilege permissions per user, role, tenant, and workflow.
  • Make dangerous actions require confirmation or human approval.
  • Log requested calls, validated calls, executed calls, outputs, errors, and retries.

Design Tools Like APIs

Every tool exposed to a model should have a clear contract, safe defaults, idempotency where possible, permission checks, input validation, error handling, and observability.

Return to the AI for Engineers / Developers guide.

← Return to AI for Engineers / Developers Guide