# audit

> 操作审计日志查询(G3)。action=get_log 读 {project}/.godot/mcp_audit.jsonl 统计回放(操作计数/风险高亮/最近条目/时间范围);action=suggest_rollback 对指定条目给诚实回滚建议(create 类可删/project.godot before_values/其余靠 Git)。write/destructive 操作经 audit after middleware 自动落盘(changed_files 为项目相对路径,PII 护栏)。

| 属性 | 值 |
|------|-----|
| 所属层 | headless |
| 安全级别 | danger-api |
| 需要 Godot | 是 |
| 需要编辑器 | 否 |
| 只读 | 是 |
| 长耗时 | 否 |

## Actions

- `get_log`
- `suggest_rollback`

## Parameters

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| `action` | enum (2 项) | ✓ | get_log=读统计回放;suggest_rollback=对指定条目给回滚建议 |
| `project_path` | string |  | 项目路径(默认 resolveProjectPath 自动解析) |
| `limit` | number |  | get_log:取末尾 N 条(默认全部) |
| `since` | string |  | get_log:ISO 时间过滤(只看此后) |
| `entry_index` | number |  | suggest_rollback:条目序号(从 get_log entries[].index) |

## 风险分布

读 2

---
<!-- AUTO-GENERATED by scripts/gen-tool-docs.mjs from capability-matrix.json v0.32.21. DO NOT edit manually; re-run npm run gen:tool-docs after tool changes. -->
