script_getscriptsbyevents
Retrieves scripts available for specified Zabbix events, returning an event ID to script mapping so you can build dynamic script menus in event detail views.
Instructions
Get scripts available for the given events. Returns a mapping of event IDs to the scripts that can be executed in each event's context. Useful for building dynamic script menus in event detail views.
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": {
"eventids": "<eventids>"
},
"name": "script_getscriptsbyevents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server | No | Target Zabbix server. Available: default. Defaults to 'default' if omitted. | |
| eventids | Yes | Event IDs to get available scripts for. | |
| raw_json | No | Strips the security disclaimer preamble from the response so it is pure JSON. Default: false. Requires the bearer token to have 'allow_raw_json' explicitly enabled by an operator in the admin portal - tokens without that policy receive a PolicyError instead. WARNING: setting true bypasses the prompt-injection mitigation marker that wraps untrusted Zabbix data (host names, item descriptions, problem text). LLM clients (Claude, GPT, Cursor, ...) should leave this false; only programmatic non-LLM consumers (Python scripts, n8n workflows that json.loads the result) should set true. | |
| scriptid | No | Return only this script, with its macros resolved for each event. Zabbix 7.0+. | |
| manualinput | No | Value of the {MANUALINPUT} macro to resolve in the script. Zabbix 7.0+. |