Canonical: https://weaveos.com/glossary/tool-calling

[Home](https://weaveos.com/)/[Glossary](https://weaveos.com/glossary)/[AI coding and agents](https://weaveos.com/glossary/category/ai-coding-agents)/Tool calling

[AI coding and agents](https://weaveos.com/glossary/category/ai-coding-agents)

# Tool calling

Also known as Function calling, LLM tool use

By WeavePublished September 10, 20261 min read

## Definition

Tool calling is an interface in which a language model returns a structured request for an application-defined function or external action. The application validates and executes the tool, then supplies the result back to the model.

On this page

1. [Definition](https://weaveos.com/glossary/tool-calling#definition)
2. [The model requests, the application acts](https://weaveos.com/glossary/tool-calling#article-the-model-requests-the-application-acts)
3. [An illustrative coding turn](https://weaveos.com/glossary/tool-calling#article-an-illustrative-coding-turn)
4. [Evaluate decisions and execution](https://weaveos.com/glossary/tool-calling#article-evaluate-decisions-and-execution)
5. [How this relates to Weave](https://weaveos.com/glossary/tool-calling#weave)
6. [Sources](https://weaveos.com/glossary/tool-calling#sources)
7. [Related terms](https://weaveos.com/glossary/tool-calling#related)

## The model requests, the application acts

A model can decide that it needs a repository search or test execution and return the tool name with structured arguments. The surrounding application checks those arguments, applies permissions, runs the action, and sends the result back.

This division matters. A model's request is not proof that an action should occur. The application owns validation, authorization, error handling, and side effects.

## An illustrative coding turn

An agent receives a failing test and requests a file search. The application limits the path, performs the search, and returns matching lines. The model then proposes an edit and requests a test command. Each tool result changes the context for the next decision.

Record the tool name, arguments, result status, timing, and task outcome. Redact secrets and avoid storing more source content than the investigation requires.

## Evaluate decisions and execution

Measure whether the agent selected the right tool, supplied valid arguments, recovered from errors, and completed the task. A model that writes fluent explanations but repeatedly calls an unavailable tool is not effective in that workflow.

## How this relates to Weave

Weave Router evaluates coding-agent requests that include tool use. Tool calls can change the task's cost, latency, and failure modes, so compare routed models on complete tool-using workflows rather than text responses alone.

[Explore Router](https://weaveos.com/products/router)

## Sources and further reading

1. [Tool use overview, Claude Platform Docs](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)

## Related terms

### [Agent observability](https://weaveos.com/glossary/agent-observability)

[What agent observability records, why model calls alone are not enough, and how to trace an AI agent's complete task.](https://weaveos.com/glossary/agent-observability)

### [Model routing](https://weaveos.com/glossary/model-routing)

[How model routing selects an AI model for each request, the tradeoffs between cost and quality, and where Weave Router fits into agent workflows.](https://weaveos.com/glossary/model-routing)

### [Context window](https://weaveos.com/glossary/context-window)

[What a language model's context window contains, how token limits affect requests, and why more context does not guarantee better answers.](https://weaveos.com/glossary/context-window)

### [LLM inference](https://weaveos.com/glossary/llm-inference)

[Understand LLM inference, how a trained model generates a response, and why input length and output length affect serving costs.](https://weaveos.com/glossary/llm-inference)
