Skip to main content
Glama
Zabbix MCP Server

Zabbix MCP Server

script_get

Read-only

Retrieves global scripts configured in Zabbix to find which ones can run on specific hosts, host groups, or event actions. Filter by type, scope, or name to inspect script details.

Instructions

Retrieve global scripts configured in Zabbix. Scripts can be executed on hosts manually or as action operations. Types include custom script (0), IPMI (1), SSH (2), Telnet (3), webhook (5). Each script has a scope (action operation, manual host action, manual event action) and host group permissions. Use groupids/hostids to find scripts available for specific targets.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "script_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of results to return.
filterNoReturn only results whose properties exactly match the given values (a single value or a list of values per key). Example: {"status": 0} or {"status": [0, 1]}. Keys: authtype (5.4+), confirmation, description, execute_on, groupid, host_access, manualinput (7.0+), manualinput_default_value (7.0+), manualinput_prompt (7.0+), manualinput_validator (7.0+), manualinput_validator_type (7.0+), menu_path (5.4+), name, new_window (6.4+), parameters (5.4+), password (5.4+), port (5.4+), privatekey (5.4+), publickey (5.4+), scope (5.4+), scriptid, timeout (5.4+), type, url (6.4+), username (5.4+), usrgrpid. Text properties cannot be filtered; use 'search' for them.
outputNoProperties of the script object to return. Pass 'extend' for all, 'count' for the number of matches only, or a list of property names. Default when omitted: scriptid, name, type, scope. Properties: authtype (5.4+), command, confirmation, description, execute_on, groupid, host_access, manualinput (7.0+), manualinput_default_value (7.0+), manualinput_prompt (7.0+), manualinput_validator (7.0+), manualinput_validator_type (7.0+), menu_path (5.4+), name, new_window (6.4+), parameters (5.4+), password (5.4+), port (5.4+), privatekey (5.4+), publickey (5.4+), scope (5.4+), scriptid, timeout (5.4+), type, url (6.4+), username (5.4+), usrgrpid.
searchNoReturn results whose string properties contain the given pattern (case-insensitive; '*' is a wildcard when searchWildcardsEnabled is true). Example: {"name": "web"}. Keys: command, confirmation, description, manualinput_default_value (7.0+), manualinput_prompt (7.0+), manualinput_validator (7.0+), menu_path (5.4+), name, password (5.4+), port (5.4+), privatekey (5.4+), publickey (5.4+), timeout (5.4+), url (6.4+), username (5.4+).
serverNoTarget Zabbix server. Available: default. Defaults to 'default' if omitted.
hostidsNoReturn only scripts available for the given host IDs.
groupidsNoReturn only scripts available for hosts in these host group IDs.
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.
scriptidsNoReturn only scripts with the given IDs.
sortfieldNoSort by one or more of: scriptid, name (a list for several; pair with 'sortorder'). No other property is sortable.
sortorderNoSort order: 'ASC' (ascending) or 'DESC' (descending).
countOutputNoReturn the count of matching results instead of the actual data.
searchByAnyNoIf true, return results matching ANY search field (OR). Default is ALL fields (AND).
extra_paramsNoOther native script.get parameters, merged into the request as-is. Parameters: usrgrpids. Sub-object selects (value 'extend', 'count' or a list of property names): selectActions (6.0+), selectGroups (removed in 7.2), selectHostGroups (6.2+), selectHosts. Any other key is refused here, because Zabbix would silently ignore it. For a parameter you are sure exists on your release but is not listed, use zabbix_raw_api_call.
searchWildcardsEnabledNoIf true, enable * and ? wildcards in search patterns.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.42.5
    • changedInput schema / properties / filter / description
      Previous value: -"Return only results whose properties exactly match the given values (a single value or a list of values per key). Example: {\"status\": 0} or {\"status\": [0, 1]}. Keys: authtype (6.0+), confirmation, description, execute_on, groupid, host_access, manualinput (7.0+), manualinput_default_value (7.0+), manualinput_prompt (7.0+), manualinput_validator (7.0+), manualinput_validator_type (7.0+), menu_path (6.0+), name, new_window (6.4+), parameters (6.0+), password (6.0+), port (6.0+), privatekey (6.0+), publickey (6.0+), scope (6.0+), scriptid, timeout (6.0+), type, url (6.4+), username (6.0+), usrgrpid. Text properties cannot be filtered; use 'search' for them."New value: +"Return only results whose properties exactly match the given values (a single value or a list of values per key). Example: {\"status\": 0} or {\"status\": [0, 1]}. Keys: authtype (5.4+), confirmation, description, execute_on, groupid, host_access, manualinput (7.0+), manualinput_default_value (7.0+), manualinput_prompt (7.0+), manualinput_validator (7.0+), manualinput_validator_type (7.0+), menu_path (5.4+), name, new_window (6.4+), parameters (5.4+), password (5.4+), port (5.4+), privatekey (5.4+), publickey (5.4+), scope (5.4+), scriptid, timeout (5.4+), type, url (6.4+), username (5.4+), usrgrpid. Text properties cannot be filtered; use 'search' for them."
    • changedInput schema / properties / output / description
      Previous value: -"Properties of the script object to return. Pass 'extend' for all, 'count' for the number of matches only, or a list of property names. Default when omitted: scriptid, name, type, scope. Properties: authtype (6.0+), command, confirmation, description, execute_on, groupid, host_access, manualinput (7.0+), manualinput_default_value (7.0+), manualinput_prompt (7.0+), manualinput_validator (7.0+), manualinput_validator_type (7.0+), menu_path (6.0+), name, new_window (6.4+), parameters (6.0+), password (6.0+), port (6.0+), privatekey (6.0+), publickey (6.0+), scope (6.0+), scriptid, timeout (6.0+), type, url (6.4+), username (6.0+), usrgrpid."New value: +"Properties of the script object to return. Pass 'extend' for all, 'count' for the number of matches only, or a list of property names. Default when omitted: scriptid, name, type, scope. Properties: authtype (5.4+), command, confirmation, description, execute_on, groupid, host_access, manualinput (7.0+), manualinput_default_value (7.0+), manualinput_prompt (7.0+), manualinput_validator (7.0+), manualinput_validator_type (7.0+), menu_path (5.4+), name, new_window (6.4+), parameters (5.4+), password (5.4+), port (5.4+), privatekey (5.4+), publickey (5.4+), scope (5.4+), scriptid, timeout (5.4+), type, url (6.4+), username (5.4+), usrgrpid."
    • changedInput schema / properties / search / description
      Previous value: -"Return results whose string properties contain the given pattern (case-insensitive; '*' is a wildcard when searchWildcardsEnabled is true). Example: {\"name\": \"web\"}. Keys: command, confirmation, description, manualinput_default_value (7.0+), manualinput_prompt (7.0+), manualinput_validator (7.0+), menu_path (6.0+), name, password (6.0+), port (6.0+), privatekey (6.0+), publickey (6.0+), timeout (6.0+), url (6.4+), username (6.0+)."New value: +"Return results whose string properties contain the given pattern (case-insensitive; '*' is a wildcard when searchWildcardsEnabled is true). Example: {\"name\": \"web\"}. Keys: command, confirmation, description, manualinput_default_value (7.0+), manualinput_prompt (7.0+), manualinput_validator (7.0+), menu_path (5.4+), name, password (5.4+), port (5.4+), privatekey (5.4+), publickey (5.4+), timeout (5.4+), url (6.4+), username (5.4+)."
  2. Changed1 schema field changedv1.42.4
    • changedInput schema / properties / extra_params / anyOf
      Previous value: -[
      -  {
      -    "propertyNames": {
      -      "enum": [
      -        "editable",
      -        "excludeSearch",
      -        "preservekeys",
      -        "startSearch",
      -        "usrgrpids",
      -        "selectActions",
      -        "selectGroups",
      -        "selectHostGroups",
      -        "selectHosts"
      -      ]
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {
      +      "selectActions": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "extend",
      +              "count"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "items": {
      +              "enum": [
      +                "actionid",
      +                "esc_period",
      +                "eventsource",
      +                "name",
      +                "notify_if_canceled",
      +                "pause_suppressed",
      +                "pause_symptoms",
      +                "status"
      +              ],
      +              "type": "string"
      +            },
      +            "minItems": 1,
      +            "type": "array"
      +          }
      +        ]
      +      },
      +      "selectGroups": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "extend",
      +              "count"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "items": {
      +              "enum": [
      +                "flags",
      +                "groupid",
      +                "internal",
      +                "name",
      +                "uuid"
      +              ],
      +              "type": "string"
      +            },
      +            "minItems": 1,
      +            "type": "array"
      +          }
      +        ]
      +      },
      +      "selectHostGroups": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "extend",
      +              "count"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "items": {
      +              "enum": [
      +                "flags",
      +                "groupid",
      +                "name",
      +                "uuid"
      +              ],
      +              "type": "string"
      +            },
      +            "minItems": 1,
      +            "type": "array"
      +          }
      +        ]
      +      },
      +      "selectHosts": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "extend",
      +              "count"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "items": {
      +              "enum": [
      +                "description",
      +                "flags",
      +                "host",
      +                "hostid",
      +                "inventory_mode",
      +                "ipmi_authtype",
      +                "ipmi_password",
      +                "ipmi_privilege",
      +                "ipmi_username",
      +                "maintenance_from",
      +                "maintenance_status",
      +                "maintenance_type",
      +                "maintenanceid",
      +                "name",
      +                "proxy_hostid",
      +                "proxyid",
      +                "status",
      +                "tls_accept",
      +                "tls_connect",
      +                "tls_issuer",
      +                "tls_subject"
      +              ],
      +              "type": "string"
      +            },
      +            "minItems": 1,
      +            "type": "array"
      +          }
      +        ]
      +      }
      +    },
      +    "propertyNames": {
      +      "enum": [
      +        "editable",
      +        "excludeSearch",
      +        "preservekeys",
      +        "startSearch",
      +        "usrgrpids",
      +        "selectActions",
      +        "selectGroups",
      +        "selectHostGroups",
      +        "selectHosts"
      +      ]
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  3. Changed10 schema fields changedv1.42.2
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / extra_params / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "propertyNames": {
      +      "enum": [
      +        "editable",
      +        "excludeSearch",
      +        "preservekeys",
      +        "startSearch",
      +        "usrgrpids",
      +        "selectActions",
      +        "selectGroups",
      +        "selectHostGroups",
      +        "selectHosts"
      +      ]
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / filter / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "propertyNames": {
      +      "enum": [
      +        "authtype",
      +        "confirmation",
      +        "description",
      +        "execute_on",
      +        "groupid",
      +        "host_access",
      +        "manualinput",
      +        "manualinput_default_value",
      +        "manualinput_prompt",
      +        "manualinput_validator",
      +        "manualinput_validator_type",
      +        "menu_path",
      +        "name",
      +        "new_window",
      +        "parameters",
      +        "password",
      +        "port",
      +        "privatekey",
      +        "publickey",
      +        "scope",
      +        "scriptid",
      +        "timeout",
      +        "type",
      +        "url",
      +        "username",
      +        "usrgrpid"
      +      ]
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / output / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "extend",
      +      "count"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "enum": [
      +        "authtype",
      +        "command",
      +        "confirmation",
      +        "description",
      +        "execute_on",
      +        "groupid",
      +        "host_access",
      +        "manualinput",
      +        "manualinput_default_value",
      +        "manualinput_prompt",
      +        "manualinput_validator",
      +        "manualinput_validator_type",
      +        "menu_path",
      +        "name",
      +        "new_window",
      +        "parameters",
      +        "password",
      +        "port",
      +        "privatekey",
      +        "publickey",
      +        "scope",
      +        "scriptid",
      +        "timeout",
      +        "type",
      +        "url",
      +        "username",
      +        "usrgrpid"
      +      ],
      +      "type": "string"
      +    },
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / output / description
      Previous value: -"Properties of the script object to return. Pass 'extend' for all, 'count' for the number of matches only, or a comma-separated list of property names. Default when omitted: scriptid, name, type, scope. Properties: authtype (6.0+), command, confirmation, description, execute_on, groupid, host_access, manualinput (7.0+), manualinput_default_value (7.0+), manualinput_prompt (7.0+), manualinput_validator (7.0+), manualinput_validator_type (7.0+), menu_path (6.0+), name, new_window (6.4+), parameters (6.0+), password (6.0+), port (6.0+), privatekey (6.0+), publickey (6.0+), scope (6.0+), scriptid, timeout (6.0+), type, url (6.4+), username (6.0+), usrgrpid."New value: +"Properties of the script object to return. Pass 'extend' for all, 'count' for the number of matches only, or a list of property names. Default when omitted: scriptid, name, type, scope. Properties: authtype (6.0+), command, confirmation, description, execute_on, groupid, host_access, manualinput (7.0+), manualinput_default_value (7.0+), manualinput_prompt (7.0+), manualinput_validator (7.0+), manualinput_validator_type (7.0+), menu_path (6.0+), name, new_window (6.4+), parameters (6.0+), password (6.0+), port (6.0+), privatekey (6.0+), publickey (6.0+), scope (6.0+), scriptid, timeout (6.0+), type, url (6.4+), username (6.0+), usrgrpid."
    • changedInput schema / properties / search / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "propertyNames": {
      +      "enum": [
      +        "command",
      +        "confirmation",
      +        "description",
      +        "manualinput_default_value",
      +        "manualinput_prompt",
      +        "manualinput_validator",
      +        "menu_path",
      +        "name",
      +        "password",
      +        "port",
      +        "privatekey",
      +        "publickey",
      +        "timeout",
      +        "url",
      +        "username"
      +      ]
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / sortfield / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "scriptid",
      +      "name"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "enum": [
      +        "scriptid",
      +        "name"
      +      ],
      +      "type": "string"
      +    },
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / sortfield / description
      Previous value: -"Sort by one or more of: scriptid, name (comma-separated for several; pair with 'sortorder'). No other property is sortable."New value: +"Sort by one or more of: scriptid, name (a list for several; pair with 'sortorder'). No other property is sortable."
    • changedInput schema / properties / sortorder / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "ASC",
      +      "DESC"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "enum": [
      +        "ASC",
      +        "DESC"
      +      ],
      +      "type": "string"
      +    },
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "script_getOutput",
      -  "type": "object"
      -}New value: +null
  4. First observedv1.41.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds useful domain behavior (scripts have a scope and host group permissions that constrain availability of results), but says nothing about defaults, pagination, or the security-sensitive raw_json toggle — that is left entirely to the schema.

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?

Front-loads the core action, then supplies compact domain context in short declarative sentences. The sentence about manual/action execution is somewhat peripheral but sets up the scope concept that follows, so little is wasted.

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

Completeness3/5

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

For a 15-parameter read tool with a rich, fully described schema and no output schema, the description covers the domain model but not the query mechanics (limit/output/filter/search/sort) or the default returned fields. It is adequate but leaves the calling strategy largely to the schema.

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 coverage is 100%, so all 15 parameters including filter/search/output/extra_params are fully documented in the schema. The description only reinforces the meaning of groupids/hostids as availability filters; it adds no syntax or interaction detail beyond the schema, which is the baseline-3 case.

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+resource ('Retrieve global scripts configured in Zabbix') and adds domain framing: script types (0/1/2/3/5), scopes, and host group permissions. It does not name any sibling (e.g. script_getscriptsbyhosts / script_getscriptsbyevents), so an agent cannot tell from the text alone how this differs from those narrower lookups.

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?

The final sentence gives one concrete usage cue ('Use groupids/hostids to find scripts available for specific targets'), which implies when this tool is the right choice. There is no explicit when-not guidance and no named alternative, so the agent must infer that host/event-specific variants exist elsewhere.

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