Skip to main content
Glama
Zabbix MCP Server

Zabbix MCP Server

by mhajder

Usermacro Get

usermacro_get
Read-onlyIdempotent

Retrieve Zabbix user macros to parameterize monitoring configurations, with filtering by host, template, or global scope and pagination support.

Instructions

Get user macros from Zabbix.

User macros are variables that can be referenced in items, triggers, and scripts. They allow parameterization of monitoring configurations with custom values.

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": "usermacro_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of results to return. Default is 100.
offsetNoNumber of matching records to skip. Use with 'limit' to page through results; check 'has_more' and 'total' in the response.
outputNoextend
searchNoDictionary with search criteria like {'macro': '{$THRESHOLD}'}.
hostidsNoList of host IDs to get macros from. An empty list matches none.
sortfieldNoField to sort by. usermacro.get only allows 'macro'.macro
sortorderNoSort direction - 'ASC' or 'DESC'.ASC
globalmacroNoReturn global macros.
templateidsNoList of template IDs to get macros from. An empty list matches none.
count_outputNoIf true, returns only the count of matched objects as an integer.
hostmacroidsNoList of host macro IDs to get. An empty list matches none.
filter_paramsNoAdditional filter parameters for advanced filtering.
globalmacroidsNoList of global macro IDs to get. An empty list matches none.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.7.1
    • changedInput schema / properties / globalmacroids / description
      Previous value: -"List of global macro IDs to get."New value: +"List of global macro IDs to get. An empty list matches none."
    • changedInput schema / properties / hostids / description
      Previous value: -"List of host IDs to get macros from."New value: +"List of host IDs to get macros from. An empty list matches none."
    • changedInput schema / properties / hostmacroids / description
      Previous value: -"List of host macro IDs to get."New value: +"List of host macro IDs to get. An empty list matches none."
    • changedInput schema / properties / templateids / description
      Previous value: -"List of template IDs to get macros from."New value: +"List of template IDs to get macros from. An empty list matches none."
  2. Changed5 schema fields changedv0.6.0
    • changedInput schema / properties / offset / description
      Previous value: -"Number of results to skip (for pagination). Requires sortfield to be set."New value: +"Number of matching records to skip. Use with 'limit' to page through results; check 'has_more' and 'total' in the response."
    • removedInput schema / properties / sortfield / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / sortfield / default
      Previous value: -nullNew value: +"macro"
    • changedInput schema / properties / sortfield / description
      Previous value: -"Field to sort by."New value: +"Field to sort by. usermacro.get only allows 'macro'."
    • addedInput schema / properties / sortfield / type
      Added value: +"string"
  3. First observedv0.5.3

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds only a conceptual definition of user macros and does not disclose behavior beyond 'get', such as pagination, count-only mode, or host/global/template macro scoping.

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?

The description is short and front-loaded with the core action: getting user macros. The second sentence is useful context but not strictly necessary for invocation, so it is efficient though slightly under-specified for a 13-parameter tool.

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?

An output schema exists and the input schema is richly annotated, so return format and most parameter details need not be repeated. However, for a 13-parameter tool with global, host, and template macro modes, the description is thin on how to choose among those modes and when to use filtering or count-only behavior.

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 92%, so the input schema already documents nearly all parameters in detail. The description does not add any parameter-specific meaning beyond the schema, but the baseline is 3 when schema coverage is this high.

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?

The description states a clear verb and resource: 'Get user macros from Zabbix.' It also explains what user macros are, which helps an agent understand the object. However, it does not explicitly distinguish this tool from sibling operations such as usermacro_create or usermacro_delete.

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

Usage Guidelines2/5

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

The description gives no guidance on when to use this tool versus alternatives, nor does it mention important usage distinctions such as global macros versus host/template macros. It simply says it gets user macros, leaving all invocation context to the schema.

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