Skip to main content
Glama
mpeirone

zabbix-mcp-server

maintenance_get

Retrieve maintenance periods from Zabbix by specifying maintenance IDs, host group IDs, or host IDs. Returns JSON-formatted data in the desired output format for monitoring and analysis.

Instructions

Get maintenance periods from Zabbix.

Args:
    maintenanceids: List of maintenance IDs to retrieve
    groupids: List of host group IDs to filter by
    hostids: List of host IDs to filter by
    output: Output format
    
Returns:
    str: JSON formatted list of maintenance periods

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupidsNo
hostidsNo
maintenanceidsNo
outputNoextend

Implementation Reference

  • The handler function for the 'maintenance_get' MCP tool. It is registered via the @mcp.tool() decorator and implements the logic to retrieve maintenance periods from the Zabbix API using the zabbix_utils client, formatting the response as JSON.
    @mcp.tool()
    def maintenance_get(maintenanceids: Optional[List[str]] = None,
                        groupids: Optional[List[str]] = None,
                        hostids: Optional[List[str]] = None,
                        output: Union[str, List[str]] = "extend") -> str:
        """Get maintenance periods from Zabbix.
        
        Args:
            maintenanceids: List of maintenance IDs to retrieve
            groupids: List of host group IDs to filter by
            hostids: List of host IDs to filter by
            output: Output format (extend or list of specific fields)
            
        Returns:
            str: JSON formatted list of maintenance periods
        """
        client = get_zabbix_client()
        params = {"output": output}
        
        if maintenanceids:
            params["maintenanceids"] = maintenanceids
        if groupids:
            params["groupids"] = groupids
        if hostids:
            params["hostids"] = hostids
        
        result = client.maintenance.get(**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 retrieves data ('Get'), implying it's a read operation, but doesn't disclose authentication requirements, rate limits, error conditions, or whether it supports pagination/filtering beyond the listed parameters. The return format is mentioned ('JSON formatted list'), but without details on structure or potential empty responses.

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 well-structured and appropriately sized. It starts with a clear purpose statement, followed by an 'Args:' section listing parameters with brief explanations, and a 'Returns:' section. Each sentence adds value without redundancy. However, the parameter explanations could be slightly more detailed to fully compensate for the lack of schema descriptions.

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 moderate complexity (4 parameters, no annotations, no output schema), the description is partially complete. It covers the purpose and parameters well but lacks behavioral context (e.g., authentication, errors) and detailed output information. For a read operation with filtering parameters, more guidance on usage and response handling would improve completeness.

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 adds significant value beyond the input schema, which has 0% description coverage. It explains each parameter's purpose: 'maintenanceids: List of maintenance IDs to retrieve', 'groupids: List of host group IDs to filter by', 'hostids: List of host IDs to filter by', and 'output: Output format'. This clarifies what each parameter controls, though it doesn't specify format details (e.g., what 'extend' means for output) or interaction rules between filters.

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 tool's purpose: 'Get maintenance periods from Zabbix.' This specifies the verb ('Get'), resource ('maintenance periods'), and system ('Zabbix'). It distinguishes from siblings like maintenance_create, maintenance_delete, and maintenance_update by focusing on retrieval rather than modification. However, it doesn't explicitly differentiate from other 'get' tools like host_get or item_get 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, typical use cases, or how it differs from other retrieval tools in the sibling list (e.g., host_get, item_get). The agent must infer usage from the tool name and description alone without explicit context.

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