list_hooks

List the hooks the user has written, which are executable files in their hooks directory.

Hookread-onlyidempotentMCP tool

A hook is a script or program that takes one agent as its input, and a workflow names one against a moment in its agents' lives, such as pre-launch or post-resume. The name is what create_workflow and update_workflow take in a hook's script field. A file listed with executable false cannot be run until the user chmods it, and the description and timeout are what the file's own header comments declare about it.

Calling it#

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

Request#

Empty#

No fields.

Response#

ListHooksResponse#

FieldTypeDescription
hookslist of Hook

Every file in the hooks directory, runnable or not.

Types#

Hook#

FieldTypeDescription
namestring

The file name in the hooks directory, which is what a workflow names to fire it.

executablebool

Whether the file can be run, which it cannot until the user chmods it.

descriptionstring

What the script says about itself in its own header comments.

timeoutduration

How long komrad waits for it, taken from its header, or unset to wait the default.

headerProblemslist of string

What komrad could not read in the header, which leaves the rest of it at the defaults.