Skip to main content
ZICQ

Wiki AI Concepts

Tool Use

AI Concepts
Aliases: Tool Use Tool Calling 工具调用 ·2026-10-07

Tool Use

Tool use lets a model request operations such as search, file access, and database queries, then use their results. The application runtime or a provider-hosted tool performs execution. Claude documentation distinguishes client tools from server tools.

The round trip

  1. Define tool names, purposes, and parameter constraints.
  2. The model chooses a tool and returns a call identifier and arguments.
  3. The runtime validates format, permissions, and resource scope before execution.
  4. Return results linked to the corresponding call.
  5. Continue or answer, subject to time, call, and cost budgets.

Function calling expresses a function request with structured arguments; some providers use the terms interchangeably. Tool use also describes execution and feedback. MCP specifies tool discovery and messages, not business authorization. ReAct studies interleaved reasoning and action.

Engineering recommendations

Start with a read-only tool. For lookup_order(order_id), verify ownership before querying. A syntactically valid ID does not establish permission. Return explicit failures rather than treating a timeout as an empty result.

Use idempotency for writes, record status and latency, and enforce stopping conditions.

See function calling, structured output, prompt injection, and observability.