# Tool calling (function calling)

> Canonical: https://skillalmanac.com/glossary/tool-calling | Last verified: 2026-11-25 | Index status: index-eligible

Tool calling lets a model request an operation from an exposed tool. The application or provider may execute the request and return a result. Requesting a tool does not establish that execution was authorized or successful.

Also called: function calling, tool use, tool calls, LLM tool calling.

## In plain language

A model can request a file lookup, calculation or another operation. The surrounding application or provider handles execution under its controls and can return data or an error. The model may then answer or request another operation. A generated request is a proposal to the execution environment, not evidence that the requested action happened.

## Technical definition

Schema-based function tools describe a name and structured inputs, often with JSON Schema. Tool calling is broader: OpenAI also documents custom tools with free-form text inputs and provider-managed built-ins. In an application-function flow, application code executes permitted calls and returns results; hosted tools may be executed by the provider. As implementation practice, validate arguments and authorization before executing consequential client tools, distinguish tool errors from successful outputs, and identify the executor rather than inferring execution from a model message. These safeguards are application responsibilities, not universal requirements established by every tool-calling API.

## How it shows up when you use agents

An LLM-based agent can request a tool, receive a result and use it in a later decision. Reading a file can be implemented as a tool operation even though it does not change the file; a file may instead be attached directly or exposed as an MCP resource. A call may instead be rejected, require approval or return an error. Inspect the actual result before claiming completion.

OpenAI's documented application-function example has a request/call/execution/result/continuation flow. That example does not require every tool system to use the same input format or execute every requested operation. Keep declarations, model requests, execution and returned evidence distinct.

## Common confusions

- **Function versus tool.** Vendor terminology overlaps, but schema-based functions are one tool interface, not every possible interface.
- **Request versus execution.** A model-generated call does not prove authorization, execution or success.
- **Tool versus skill.** A tool exposes functionality. A skill provides reusable instructions and resources and may guide tool use.
- **Tool calling versus MCP.** MCP is a protocol through which tools and other capabilities can be exposed; model tool use can also occur without MCP.
- **Description versus control.** Tool descriptions help the model select functionality. Application permissions and validation remain separate controls.

## Worked examples in this catalogue

### [Agent Skills vs Tools: Instructions or Callable Actions](https://skillalmanac.com/learn/agent-skills-vs-tools)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A table comparing a skill with an MCP tool: what each is, how the model finds it, what inputs it takes, what comes back and who triggers it, followed by common failure modes such as tools called with bad arguments.

Why it exercises the concept: It separates the two ideas that people most often merge: instructions the model reads, and an action the model calls with typed arguments.

### [mcp-builder](https://skillalmanac.com/skills/anthropic/mcp-builder)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A guide for creating MCP servers that let LLM applications interact with external services through designed tools.

Why it exercises the concept: An MCP server can publish tools to compatible MCP clients. The pinned guide covers tool names, descriptions, input and output schemas, bounded results, errors, transport and testing—the server-side contract behind those calls.

### [llm-json-output-validator](https://skillalmanac.com/skills/skill-almanac/llm-json-output-validator)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: Model replies checked against a JSON Schema subset, with failures counted by class and field.

Why it exercises the concept: A tool call is structured output the model must get right. This skill shows how often replies break the schema and which fields break them.

### [Claude Code](https://skillalmanac.com/tools/claude-code)

```
/context
```

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A breakdown of what is using the session's context, so you can see how much space tool definitions and tool results take.

Why it exercises the concept: Claude Code's context view can show tool definitions and results that occupy session context. Included material consumes context capacity; whether that produces a separate charge depends on API or subscription-plan accounting.

## Related terms

- [Model Context Protocol (MCP)](https://skillalmanac.com/glossary/model-context-protocol.md)
- [AI agent](https://skillalmanac.com/glossary/ai-agent.md)
- [Agent skill](https://skillalmanac.com/glossary/agent-skill.md)
- [Agent harness](https://skillalmanac.com/glossary/agent-harness.md)
- [Context window](https://skillalmanac.com/glossary/context-window.md)
- [Large language model (LLM)](https://skillalmanac.com/glossary/large-language-model.md)
- [Web search tool](https://skillalmanac.com/glossary/web-search-tool.md)
- [Code execution (tool)](https://skillalmanac.com/glossary/code-execution.md)

## Sources

- [Tool use with Claude](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview), Anthropic (Claude API Docs) (accessed 2026-11-25)
- [Function calling](https://developers.openai.com/api/docs/guides/function-calling), OpenAI (API Docs) (accessed 2026-11-25)
- [Manage costs effectively](https://code.claude.com/docs/en/costs), Anthropic (Claude Code Docs) (accessed 2026-11-25)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-25. [Glossary index](https://skillalmanac.com/glossary.md).
