create_hook
Creates a custom app hook in ERPNext by defining a hook type and value, so AI assistants can register doc events, scheduler events, or other Frappe hooks.
Instructions
Create a new Hook (custom app hook) in ERPNext
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"hook_type": "<hook_type>",
"value": "<value>"
},
"name": "create_hook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | Hook value (Python path, etc.) | |
| app_name | No | App name (optional) | |
| hook_type | Yes | Hook type (e.g., doc_events, scheduler_events) |