INITIALIZING SECURE CHANNEL...
CPU MEM NET PING9.2 ms SECSECURED
COFFEE—WEB v4.0 // eu-1
ONLINE 2 847 --:--:--
/english > 40. Tool Use & Function Calling
// УРОК 40

Tool Use & Function Calling

B2

Tool Use & Function Calling

Tool use allows an LLM to call external functions — APIs, databases, code executors — to complete tasks.

How It Works

  1. Define tools as JSON schemas describing the function name, parameters, and description
  2. Send tools + user message to the LLM
  3. LLM decides which tool to call and with what arguments
  4. Your code executes the function and returns the result
  5. LLM uses the result to generate the final response

Key Terms

TermMeaning
tool definitionJSON schema describing a callable function
tool callThe LLM's request to invoke a specific tool
tool resultThe output returned to the LLM after executing the tool
parallel tool callsLLM requests multiple tools at once
tool loopCycle of: LLM calls tool → get result → LLM continues

Useful Phrases

  • "The model decided to call the search tool with the query 'latest Python release'."
  • "We support parallel tool calls so the agent can fetch weather and news simultaneously."
  • "The tool loop runs until the model produces a final text response with no more tool calls."
// TERMINAL CHALLENGE

Проверь себя

Q1. What is a 'tool definition' in the context of LLM function calling?
Q2. What does the LLM actually do when it 'calls a tool'?
Q3. What are 'parallel tool calls'?
Q4. What is the 'tool loop'?
Q5. Complete: 'The tool loop runs until the model produces a final ___ response with no more tool calls.'
╔═ GL1TCH v0.1 ═[ПОДКЛЮЧЕНО]═╗ [×]
СОЕДИНЕНИЕ АКТИВНО
запросов:
// сессия #{} начата
>_
[ РАЗРЫВ СВЯЗИ ]
лимит исчерпан...
иду спать... zzZ
хочешь больше? [зарегистрироваться] // +10 запросов в день