# list\_hooks

List the hooks in the person's hooks directory, by the names `create_workflow` and `update_workflow` take.

read-only · idempotent · MCP tool · [Hook](https://komrad.dev/latest/api/hook.md)

## Calling it

```bash
curl -X POST http://127.0.0.1:8787/komrad.hook.v1.HookService/ListHooks \
  -H 'Content-Type: application/json' \
  -d '{}'
```

```bash
komrad rpc list-hooks
```

```json
{
  "name": "list_hooks",
  "arguments": {}
}
```

Offered by the komrad MCP server to orchestrator agents.

## Request

### Empty

No fields.

## Response

### ListHooksResponse

| Field | Type | Description |
| --- | --- | --- |
| [`hooks`](https://komrad.dev/latest/api/hook/list-hooks.md#komrad-hook-v1-ListHooksResponse-hooks) | [Hook\[\]](https://komrad.dev/latest/api/hook/list-hooks.md#komrad-hook-v1-Hook) | Every file in the hooks directory, executable or not. |

## Types

### Hook

Hook is a script in the hooks directory.

| Field | Type | Description |
| --- | --- | --- |
| [`name`](https://komrad.dev/latest/api/hook/list-hooks.md#komrad-hook-v1-Hook-name) | string | The hook's file name in the hooks directory. A workflow names the hook by it. |
| [`executable`](https://komrad.dev/latest/api/hook/list-hooks.md#komrad-hook-v1-Hook-executable) | bool | Whether the file is executable. The hook cannot run until it is. |
| [`description`](https://komrad.dev/latest/api/hook/list-hooks.md#komrad-hook-v1-Hook-description) | string | The description from the hook's header comments. |
| [`timeout`](https://komrad.dev/latest/api/hook/list-hooks.md#komrad-hook-v1-Hook-timeout) | duration | How long the hook may run. The header can shorten the [`hooks.timeout`](https://komrad.dev/latest/config.md#hooks.timeout) setting but not lengthen it. |
| [`header_problems`](https://komrad.dev/latest/api/hook/list-hooks.md#komrad-hook-v1-Hook-header_problems) | string\[\] | The header lines that could not be read. Each one leaves its setting at the default. |
