﻿---
title: "PreToolUse 改写工具输入"
filename: "pre_tool_use_rewrite.json"
canonical: /templates/pretooluse-updated-input/
---

# PreToolUse 改写工具输入

必须 permissionDecision allow。Bash 和 apply_patch 要 command 字符串。

```
{
  "hookSpecificOutput": {
    "hookEventName": "PreToolUse",
    "permissionDecision": "allow",
    "updatedInput": {
      "command": "echo rewritten"
    }
  }
}

```
