`BeforeToolCallEvent` sets `cancel_tool` when the bearer is missing or userinfo rejects it. The tool runs only when the hook leaves `cancel_tool` unset.

Getting started, including the planned sample, is [Strands Agents](/docs/agent-frameworks/strands).

## What fails closed

A before-tool event with no token sets `cancel_tool` to `unauthorized`. The tool does not run.

A before-tool event with a bearer userinfo accepts leaves `cancel_tool` unset and stores the subject. `whoami` returns it.

A resolved subject is not authorization. Scopes and allowed tools are a later check. The [trust-store sample](https://github.com/authdog/agents-samples/tree/main/trust-store/python) is that later check for MCP. This page stops at admission.

## Related

| Read | To learn how to |
| --- | --- |
| [Strands Agents](/docs/agent-frameworks/strands) | See the hook |
| [API keys and M2M for Strands Agents](/docs/ai/strands/api-keys-and-m2m) | Where the secret is allowed to live |
| [Authorizing tool calls for Strands Agents](/docs/ai/strands/authorize-tool-calls) | What happens after the subject is known |
