Services

Resources

Company

/

Tool call

Tool call

A tool call is a request from a large language model (LLM) for the application to run a named function, such as a search or an API call, with arguments the model chose. The application runs the function and sends the result back to the model. The capability is also called function calling.

How it works

The application sends the model a list of tools, each with a name, a description and a JSON schema for its arguments. The model replies with either a final answer or a tool call, marked by its finish reason. In a triage agent, the model might ask for check_service_health("catalog"), read the result, then ask for check_dependencies. Each one appears as an execute_tool span in OpenTelemetry.

Why it matters in production

Tool calls reach systems you may not own, so they add latency, failures and security exposure to every request. Count tool calls per request: a rising count means the agent is doing more work per answer, which costs tokens even when nothing fails.

See also

On the One2N blog

References

  1. Origin of the term

  2. Model Context Protocol specification

  3. Toolformer: language models can teach themselves to use tools (Schick et al., 2023)

Sequence diagram of a tool call between your app, the LLM and a tool. The app sends a question and the tool list; the LLM replies with a call to check_service_health; the app runs the tool and returns the result; the LLM then asks for check_dependencies and finally gives an answer. A red bracket over the loop notes that each extra tool call costs tokens and time.

Putting this into practice?

Talk to One2N about our AI engineering services

Talk to One2N about our AI engineering services