中文题干 + 英文术语保持原文。共 16 题(单选 8 / 多选 4 / 判断 4)。先做完再看文末《答案与解析》。
Q1. Tool use 的另一个官方名称是: A. Retrieval Augmentation B. Function calling C. Fine-tuning D. Prompt chaining
Q2. Client tools 与 server tools 的根本区别是: A. 是否需要 API key B. 代码在哪里执行(你的应用 vs Anthropic 基础设施) C. 是否收费 D. 是否支持流式
Q3. Claude 决定调用 client tool 时,响应的 stop_reason 是: A. end_turn B. max_tokens C. tool_use D. refusal
Q4. tool_use block 中用于结果对账的字段是: A. name B. id C. input D. type
Q5. tool_result block 中标记执行错误的字段是: A. error B. status C. is_error D. failed
Q6. 提供了 tools 但未指定 tool_choice 时的默认值是: A. {"type": "auto"} B. {"type": "any"} C. {"type": "none"} D. {"type": "tool"}
Q7. tool_choice: {"type": "any"} 的副作用是: A. Claude 可以拒调 B. 预填 assistant 消息:不会先输出自然语言解释 C. 禁用并行调用 D. 自动开启 strict 模式
Q8. 工具定义中对选择质量影响最大的字段是: A. name B. description(官方建议至少 3–4 句) C. input_examples D. cache_control
Q9. tool_result 回传的格式硬约束包括: A. 必须紧随对应 tool_use,中间不能插入其他消息 B. 同一 user 消息内 tool_result 必须排在最前 C. assistant 轮有未完成 server tool 时,回传消息只能含 tool_result block D. tool_result 必须用独立的新请求发送(不进 messages 历史)
Q10. 官方工具定义最佳实践包括: A. 描述极尽详细(何时用/不用、参数含义、限制) B. 相关操作合并为带 action 参数的单个工具 C. 工具名跨服务加前缀(如 github_list_prs) D. 返回全量原始数据供 Claude 自行筛选
Q11. 错误回传的正确做法: A. is_error: true + 有指导性的错误消息 B. 缺参等无效调用也回传,让 Claude 自我修正 C. server tool 错误由 Anthropic 侧透明处理,无需你处理 D. 错误时直接终止整个对话
Q12. 适合设置 human approval 的动作特征: A. 不可逆(删除、支付、对外发送) B. 高代价 C. 合规要求最终确认 D. 只读查询
Q13. system prompt 里写"只能查询不能删除"就是有效的访问控制。
Q14. strict: true 可以保证工具入参严格符合 input_schema。
Q15. 一轮响应中 Claude 可以返回多个 tool_use block(并行工具调用),除非用 disable_parallel_tool_use: true 禁用。
Q16. 手动 extended thinking(thinking.type: "enabled")与 tool_choice: {"type": "any"} 兼容。
A1. B — "Tool use (also called function calling)"(来源: https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview(访问于 2026-08-30))。
A2. B — "Tools differ primarily by where the code executes"(来源: 同上)。web_search 等 server tools 在 Anthropic 基础设施上跑。
A3. C — client tool 调用时 stop_reason: "tool_use"(来源: 同上)。
A4. B — id(如 toolu_...)用于与 tool_result.tool_use_id 配对(来源: https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls(访问于 2026-08-30))。
A5. C — is_error: true(来源: 同上)。
A6. A — auto 是提供 tools 时的默认;不提供 tools 时默认 none(来源: https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools(访问于 2026-08-30))。
A7. B — "the API prefills the assistant message ... will not emit a natural language response"(来源: 同上)。
A8. B — "Provide extremely detailed descriptions. This is by far the most important factor"(来源: 同上)。
A9. ABC — 三条均为官方 Note 中的硬约束,违反触发 400("tool_use ids were found without tool_result blocks immediately after")(来源: handle-tool-calls,同上)。D 错:tool_result 就是要放进 messages 历史回传。
A10. ABC — 官方最佳实践原文要点;D 恰相反:"Return only high-signal information"(来源: define-tools,同上)。
A11. ABC — 官方错误处理三节的内容;D 错——错误回传正是为了让 Claude 继续/改道(来源: handle-tool-calls,同上)。
A12. ABC — 不可逆/高代价/合规是设人审门的判据;只读查询不需要(模块 04 §6)。
A13. 错 — LLM 指令不是授权机制:prompt 约束是概率性的(可被注入绕过);强制必须由应用层代码执行(来源: handle-tool-calls 的 untrusted content 警告与模块 11 主题)。
A14. 对 — strict tool use 保证入参过 schema(来源: tool-use overview Tip 与 strict-tool-use,同上)。
A15. 对 — 并行工具调用默认可用,disable_parallel_tool_use: true 关闭(来源: define-tools/tool-use overview,同上)。
A16. 错 — 手动 extended thinking 与 any/tool 不兼容会报错;仅 auto/none 兼容(adaptive thinking 模型支持强制调用)(来源: define-tools Note,同上)。