- Glossary
- PreToolUse hook
Glossary term
PreToolUse hook
A hook that runs before a tool call and can allow, deny or ask for approval.
Also called PreToolUse.
Open lesson 44.2
PreToolUse: block or modify a call · Chapter 44, and 4 more lessons below
In plain words
The right place for hard limits, such as refunds over a threshold or writes to protected paths.
Taught in
- 44.2PreToolUse: block or modify a callChapter 44, Hooks and the agent lifecycle · main lesson
- 33.5Forcing tools to run in orderChapter 33, The tool use loop
- 44.1Lifecycle eventsChapter 44, Hooks and the agent lifecycle
- 45.2Human-in-the-loop checkpointsChapter 45, Guardrails and escalation
- 65.8Worked example: agent SDK permission callbacksChapter 65, Agent security
Also in these lessons
Agent loopAttentionis_errorPermission modetool_choicetool_result