Skip to content
mentoor

Tool (function) calling

For engineers

Defining tools, running the call loop, returning errors, handling parallel calls and controlling when the model may act

See where you stand

110 questions across four stages: Understand, Apply, Solve and Judge.

Try 5 questions

Practice items, not counted towards your mastery. No account needed.

Check yourself · 1 of 5

What does the model use to decide which tool to call?

Choose one answer

Check yourself · 2 of 5

After the model requests a tool call, what must your code do?

Choose one answer

Check yourself · 3 of 5

A tool cannot find the requested record. What should it return?

Choose one answer

Check yourself · 4 of 5

A response contains three tool requests. What must your next request contain?

Choose one answer

Check yourself · 5 of 5

Which tool choice setting forces the model to call one specific tool?

Choose one answer

Topics

  1. Writing tool names, descriptions and input schemas4 min read · How the model chooses a tool from its name and description and fills arguments from its schema
  2. Running the tool call loop to completion5 min read · Detect a tool request, execute it, return the result with the matching call id, and repeat until a final answer or a step limit
  3. Returning tool errors the model can act on4 min read · Validating arguments, returning failures as error results with useful messages, and never throwing away the turn
  4. Handling parallel tool calls in one turn4 min read · Several tool requests in one response: running them concurrently and returning every result in a single reply
  5. Controlling tool choice and side-effecting actions5 min read · Auto, required, none and named tool choice, plus confirmation before tools that write, pay or send

Start here

Helps to know first

110 questions · last verified 2026-12