# 第三章 工具

Tool (工具)是 Claude 最重要的扩展能力之一。通过工具调用，Claude 可以突破语言模型的固有限制，与外部世界交互。

***

## 为什么需要工具？

Claude 本身有以下局限：

| 局限      | 解决方案        |
| ------- | ----------- |
| 无法联网    | 调用搜索 API    |
| 数学不精确   | 调用计算器工具     |
| 无法访问数据库 | 调用数据库查询工具   |
| 不知道当前时间 | 调用时间 API    |
| 无法发送消息  | 调用邮件/消息 API |

***

## 本章学习目标

* [ ] 理解工具的工作原理
* [ ] 定义工具的 Schema
* [ ] 处理工具调用和返回结果
* [ ] 编排多工具协作
* [ ] 了解高级特性

***

## 章节导航

| 章节                                                                                | 主题               |
| --------------------------------------------------------------------------------- | ---------------- |
| [3.1](/claude_guide/di-er-bu-fen-gong-ju-pian/03_tools/3.1_overview.md)           | 工具概述与工作原理        |
| [3.2](/claude_guide/di-er-bu-fen-gong-ju-pian/03_tools/3.2_schema.md)             | 定义工具 Schema      |
| [3.3](/claude_guide/di-er-bu-fen-gong-ju-pian/03_tools/3.3_results.md)            | 处理工具调用结果         |
| [3.4](/claude_guide/di-er-bu-fen-gong-ju-pian/03_tools/3.4_orchestration.md)      | 多工具编排与复杂流程       |
| [3.5](/claude_guide/di-er-bu-fen-gong-ju-pian/03_tools/3.5_programmatic.md)       | 高级特性：程序化工具调用     |
| [3.6](/claude_guide/di-er-bu-fen-gong-ju-pian/03_tools/3.6_tool_search.md)        | 管理大型工具库：工具搜索     |
| [3.7](/claude_guide/di-er-bu-fen-gong-ju-pian/03_tools/3.7_structured_outputs.md) | 结构化输出：保证响应格式的可靠性 |

***

> 💡 本章需要 API 访问权限。如果你只使用 claude.ai 网页版，可以通过 [MCP](/claude_guide/di-er-bu-fen-gong-ju-pian/04_mcp.md) 获得类似能力。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yeasy.gitbook.io/claude_guide/di-er-bu-fen-gong-ju-pian/03_tools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
