Skip to main content
Glama
Zabbix MCP Server

Zabbix MCP Server

by mhajder

Template Get

template_get
Read-onlyIdempotent

Retrieve Zabbix templates to inspect reusable monitoring configurations, filter by name, host, group, or template ID, and page through results.

Instructions

Get templates from Zabbix.

Templates are reusable collections of items, triggers, and graphs that can be applied to hosts. They standardize monitoring across multiple servers with the same role.

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": "template_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
searchNoSubstring search in template name. Matches partial names like 'Linux' finds 'Linux Server Template'.
hostidsNoReturn only templates linked to these hosts. An empty list matches none.
groupidsNoReturn only templates in these template groups. An empty list matches none.
sortfieldNoField to sort by. A deterministic sort is required for paging to be consistent.host
sortorderNoSort direction - 'ASC' or 'DESC'.ASC
select_tagsNoIf true, include the tags for the templates (selectTags=extend).
templateidsNoList of template IDs to get. Omit to return all templates; an empty list matches none. Find template IDs with a search or from host associations.
count_outputNoIf true, returns only the count of matched objects as an integer.
select_hostsNoIf true, include the hosts that are linked to the templates (selectHosts=extend).
select_groupsNoIf true, include the template groups the templates belong to (selectTemplateGroups=extend).
select_macrosNoIf true, include the macros for the templates (selectMacros=extend).
select_templatesNoIf true, include the templates that are linked to these templates directly (selectTemplates=extend).
template_name_containsNoShortcut to search for templates by name (constructs search={'host': template_name_contains}).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.7.1
    • addedInput schema / properties / groupids / description
      Added value: +"Return only templates in these template groups. An empty list matches none."
    • addedInput schema / properties / hostids / description
      Added value: +"Return only templates linked to these hosts. An empty list matches none."
    • changedInput schema / properties / templateids / description
      Previous value: -"List of template IDs to get. If empty, returns all templates.\n         Find template IDs with a search or from host associations."New value: +"List of template IDs to get. Omit to return all templates; an empty list matches none.\n         Find template IDs with a search or from host associations."
  2. Changed6 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."
    • changedInput schema / properties / select_groups / description
      Previous value: -"If true, include the template groups the templates belong to (selectGroups=extend)."New value: +"If true, include the template groups the templates belong to (selectTemplateGroups=extend)."
    • removedInput schema / properties / sortfield / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • changedInput schema / properties / sortfield / default
      Previous value: -nullNew value: +"host"
    • changedInput schema / properties / sortfield / description
      Previous value: -"Field to sort by."New value: +"Field to sort by. A deterministic sort is required for paging to be consistent."
    • addedInput schema / properties / sortfield / type
      Added value: +"string"
  3. First observedv0.5.3

TDQS

B3.2/5.0
Behavior3/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 clear. The description adds domain context about what templates are, but does not disclose operational details like pagination behavior, default result size, or that count_output changes the return type. Given annotation coverage, a 3 is appropriate.

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 purpose is front-loaded in the first sentence. The second and third sentences are definitional rather than behavioral, which is mildly extraneous for a retrieval tool but still useful context for agents unfamiliar with Zabbix templates.

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?

With a 16-parameter schema, an output schema present, and safety annotations, the structured fields compensate for much of the description's brevity. Still, the description does not mention filtering, sorting, or selection capabilities at all, which is a notable gap for a tool of this complexity.

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 94%, so the schema already documents nearly all of the 16 parameters in detail. The description itself provides no parameter-specific semantics, so the baseline of 3 applies when the schema does the heavy lifting.

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 first sentence states a clear verb and resource: 'Get templates from Zabbix.' An agent can distinguish this from write siblings like template_create/template_update by the verb. However, it does not explicitly differentiate from other read tools such as host_get or item_get, relying on the resource name alone.

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 offers no guidance on when to use this tool versus alternatives, nor any conditions or exclusions. It does not mention the available filtering modes (templateids, hostids, groupids, search) or when to prefer one over another, leaving the agent to infer usage entirely from the schema.

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