script_getscriptsbyhosts
Retrieve executable scripts for specified hosts, returning a host ID to script mapping that respects group permissions and script scope. Use it to build dynamic script menus in host detail views.
Instructions
Get scripts available for the given hosts. Returns a mapping of host IDs to the scripts that can be executed on each host. Takes into account host group permissions and script scope. Useful for building dynamic script menus in host detail views.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server | No | Target Zabbix server. Available: default. Defaults to 'default' if omitted. | |
| hostids | Yes | Host 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |