---
name: tool-invocation
scope:
  - '*'
products:
  - '*'
id: ka-hard-rule-工具调用规则
asset_kind: governance_rule
lifecycle_status: active
authority: canonical
owner_mechanism_id: mc-tool-invocation-contract
routes: ['*']
primary_triggers:
  - 工具调用规则
secondary_triggers: []
negative_triggers: []
priority: P0
specificity: 5
consumes:
  - mc-workflow-contract
hard_blocks:
  - forbidden_next_tool
  - strict_controlled未审批
fallback: manual_required
required_evidence:
  - tool_trace
  - invocation_violations
version: 1.1.0
last_reviewed: '2026-06-01'
type: governance_rule
when: 工具调用规则
stages: ["*"]
---

# 工具调用规则

## 核心原则

MCP 工具调用必须遵守契约约束: 工具链顺序、权限等级、禁止转换。

## 工具分类

1. **strict_controlled**: 严格管控工具，需要前置审批
2. **read_only_bypass**: 只读工具，可自由调用
3. **normal_controlled**: 常规管控工具，需遵守转换规则

## 规则

1. 每个工具必须声明 default_next_tools 和 forbidden_next_tools
2. forbidden_next_tools 中的转换必须被阻断
3. strict_controlled 工具不可跳过审批流程
4. 工具调用链必须可追踪 (tool_trace)

## 验收标准

- [ ] 所有 MCP 工具在 Tool Invocation Contract Registry 中已注册
- [ ] forbidden_next_tools 转换被正确阻断
- [ ] validateToolInvocation() 返回 0 hard_fail
- [ ] tool_trace 包含完整调用链
