The whole hunk
from line 96, old and new numbered
/
lines
from line 96
9696
9797#### Parameters
9898
99| Parameter | Type | Description |
100| :------------- | :---------------------------------------------- | :------------------------------------------------------------------ |
101| `name` | `str` | Unique identifier for the tool |
102| `description` | `str` | Human-readable description of what the tool does |
103| `input_schema` | `type \| dict[str, Any]` | Schema defining the tool's input parameters (see below) |
104| `annotations` | [`ToolAnnotations`](#toolannotations)` \| None` | Optional MCP tool annotations providing behavioral hints to clients |
99| Parameter | Type | Description |
100| :------------- | :---------------------------------------------- | :--------------------------------------------------------------------------------------------- |
101| `name` | `str` | Unique identifier for the tool |
102| `description` | `str` | Human-readable description of what the tool does |
103| `input_schema` | `type \| dict[str, Any]` | Schema defining the tool's input parameters. See [Input schema options](#input-schema-options) |
104| `annotations` | [`ToolAnnotations`](#toolannotations)` \| None` | Optional MCP tool annotations providing behavioral hints to clients |
105105
106106#### Input schema options
107107
from line 2370
23702370
23712371### Hook Usage Example
23722372
2373This example registers two hooks: one that blocks dangerous bash commands like `rm -rf /`, and another that logs all tool usage for auditing. The security hook only runs on Bash commands (via the `matcher`), while the logging hook runs on all tools.
2373This example registers two hooks: one that blocks dangerous Bash commands like `rm -rf /`, and another that logs all tool usage for auditing. The security hook only runs on Bash commands (via the `matcher`), while the logging hook runs on all tools.
23742374
23752375```python theme={null}
23762376import asyncio