---
name: tool-invocation-workflow
scope:
  - '*'
products:
  - '*'
id: ka-procedure-工具调用流程
asset_kind: procedure
lifecycle_status: active
authority: supporting
owner_mechanism_id: mc-tool-invocation-contract
routes:
  - code_change
primary_triggers:
  - 工具调用流程
secondary_triggers: []
negative_triggers: []
priority: P1
specificity: 5
consumes:
  - mc-workflow-contract
emits:
  - tool_invocation_result
  - tool_trace
required_evidence:
  - tool_trace
  - invocation_violations
version: 1.1.0
last_reviewed: '2026-06-01'
type: procedure
when: 工具调用流程
stages: ["任务规划", "编码与单元测试"]
---
# 工具调用流程

## 步骤

1. 接收工具调用请求 (tool_name, arguments)
2. 在 Tool Invocation Contract Registry 中查找工具契约
3. 检查当前调用链是否违反 forbidden_next_tools
4. 检查 strict_controlled 工具的前置审批
5. 执行工具调用
6. 记录 tool_trace

## 注意事项

- 只读工具可自由调用，不受转换约束
- 工具调用失败时记录到 task_context
