Skip to content
All topics

Domain

Tool calling

Letting models request function calls safely: schemas, validation, permissions, idempotency and human approval.

0 of 10 articles published. Topics are listed in reading order: each comes after the topics it builds on.

Tool calling basics

How a model asks the application to run a function.

  1. How tool calling worksComing soon

    The model proposes a call with arguments; your code decides whether to run it and returns the result.

    Fundamentals · Beginner

  2. Writing tool schemasComing soon

    Names, descriptions and JSON Schema parameters that a model uses correctly, with examples of what goes wrong.

    Implementation · Intermediate

  3. Parallel and sequential tool callsComing soon

    Running several independent calls at once, ordering dependent ones, and returning results the model can match up.

    Implementation · Advanced

Safe tool execution

Treating every tool call as untrusted input.

  1. Validating tool argumentsComing soon

    Parsing every argument with a schema before execution, and never passing model output straight into queries or shells.

    Security · Intermediate

  2. Permissions for tool callsComing soon

    Running tools as the end user with their rights, not as a privileged service account.

    Security · Advanced

  3. Idempotent tools and safe retriesComing soon

    Designing tools so a repeated call does no extra harm, using idempotency keys for writes.

    Implementation · Advanced

  4. Human approval for consequential tool callsComing soon

    Showing a person exactly what will happen before sending, paying, deleting or publishing, and recording the decision.

    Architecture · Advanced

Tool design

Shaping tools that models use well.

  1. Designing tools for modelsComing soon

    Fewer, task-shaped tools with clear boundaries usually beat thin wrappers over every API endpoint.

    Architecture · Advanced

  2. Returning errors from toolsComing soon

    Error results the model can act on (retry, ask the user, choose another tool) without leaking internals.

    Implementation · Advanced

  3. Working with many toolsComing soon

    How large tool lists cost tokens and confuse selection, and ways to load only the relevant tools.

    Performance · Production