Skip to main content
Glama
initMAX

Zabbix MCP Server

script_getscriptsbyhosts

Read-only

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

TableJSON Schema
NameRequiredDescriptionDefault
serverNoTarget Zabbix server. Available: default. Defaults to 'default' if omitted.
hostidsYesHost IDs to get available scripts for.
raw_jsonNoStrips 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

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.41.0

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover safety (readOnlyHint=true, openWorldHint=true), so the bar is lower. The description adds genuinely useful behavioral context beyond them: results are filtered by host group permissions and script scope, which tells the agent why a requested host may come back with an empty or reduced script set.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, purpose front-loaded, then return shape, then behavior and use case. Every sentence carries information, though the trailing 'useful for...' clause is the softest and could be folded into the first sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values need not be explained, and annotations plus the 100% schema coverage carry the rest. The description covers purpose, return shape, and permission-based filtering, leaving only minor gaps such as behavior for unknown host IDs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so hostids, server, and raw_json are already fully documented in the schema, including the raw_json security/policy warning. The description adds no parameter-level detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get scripts available for the given hosts') and clarifies the return shape ('mapping of host IDs to the scripts that can be executed on each host'). The host-scoped framing implicitly separates it from script_get and script_getscriptsbyevents, but it never names those alternatives explicitly, which keeps it short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Useful for building dynamic script menus in host detail views' gives one concrete usage context, so usage is implied rather than absent. There is no when-not guidance, no prerequisites, and no explicit routing to the sibling script_getscriptsbyevents for the event-driven case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.