Skip to main content
Glama
mpeirone

zabbix-mcp-server

template_create

Generate and configure new Zabbix monitoring templates by specifying technical names, host groups, visible names, and descriptions. Streamlines template creation for efficient system monitoring.

Instructions

Create a new template in Zabbix.

Args:
    host: Template technical name
    groups: List of host groups (format: [{"groupid": "1"}])
    name: Template visible name
    description: Template description
    
Returns:
    str: JSON formatted creation result

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNo
groupsYes
hostYes
nameNo

Implementation Reference

  • Implements the template_create MCP tool handler. Creates a new Zabbix template using the ZabbixAPI client.template.create method. Validates read-only mode first and formats the response as JSON.
    @mcp.tool()
    def template_create(host: str, groups: List[Dict[str, str]],
                        name: Optional[str] = None, description: Optional[str] = None) -> str:
        """Create a new template in Zabbix.
        
        Args:
            host: Template technical name
            groups: List of host groups (format: [{"groupid": "1"}])
            name: Template visible name
            description: Template description
            
        Returns:
            str: JSON formatted creation result
        """
        validate_read_only()
        
        client = get_zabbix_client()
        params = {
            "host": host,
            "groups": groups
        }
        
        if name:
            params["name"] = name
        if description:
            params["description"] = description
        
        result = client.template.create(**params)
        return format_response(result)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool creates a new template, implying a write/mutation operation, but doesn't disclose critical behavioral traits such as required permissions, whether the operation is idempotent, potential side effects (e.g., impact on linked hosts), error conditions, or rate limits. The description adds minimal context beyond the basic action.

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 appropriately sized and front-loaded, starting with the core purpose in the first sentence. The Args and Returns sections are structured clearly, with each parameter explained concisely. There's no redundant information, and every sentence serves a purpose, though the format could be slightly more polished (e.g., using bullet points).

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?

Given the tool's complexity (a write operation with 4 parameters), lack of annotations, and no output schema, the description is moderately complete. It covers the purpose and parameters well but lacks behavioral context (e.g., permissions, side effects) and detailed return value explanation beyond 'JSON formatted creation result'. For a mutation tool with no structured safety hints, more disclosure would be beneficial.

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

Parameters4/5

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

The description explicitly lists all four parameters (host, groups, name, description) with brief explanations, adding meaningful semantics beyond the input schema's 0% description coverage. It clarifies that 'host' is the technical name, 'groups' is a list of host groups with a specific format example, 'name' is the visible name, and 'description' is the template description. This compensates well for the schema's lack of parameter descriptions.

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 clearly states the action ('Create a new template') and resource ('in Zabbix'), which provides a specific verb+resource combination. It distinguishes this tool from sibling tools like template_get, template_update, and template_delete by specifying creation rather than retrieval, modification, or deletion. However, it doesn't explicitly differentiate from other creation tools like host_create or user_create beyond the resource type.

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 provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing existing host groups), when not to use it (e.g., for updating existing templates), or direct alternatives among sibling tools (like template_update for modifications). The only implied usage is for creating templates, but no contextual boundaries are established.

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

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mpeirone/zabbix-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server