Skip to main content
Glama
mpeirone

zabbix-mcp-server

maintenance_create

Schedule maintenance periods in Zabbix by specifying start and end times, host or group IDs, and time periods. Streamline system updates and downtime management with JSON-formatted results.

Instructions

Create a new maintenance period in Zabbix.

Args:
    name: Maintenance name
    active_since: Start time (Unix timestamp)
    active_till: End time (Unix timestamp)
    groupids: List of host group IDs
    hostids: List of host IDs
    timeperiods: List of time periods
    description: Maintenance description
    
Returns:
    str: JSON formatted creation result

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
active_sinceYes
active_tillYes
descriptionNo
groupidsNo
hostidsNo
nameYes
timeperiodsNo

Implementation Reference

  • The handler function for the 'maintenance_create' tool, decorated with @mcp.tool() for registration. It creates a new maintenance period using the Zabbix API, validates read-only mode, prepares parameters, calls client.maintenance.create, and formats the response.
    @mcp.tool()
    def maintenance_create(name: str, active_since: int, active_till: int,
                           groupids: Optional[List[str]] = None,
                           hostids: Optional[List[str]] = None,
                           timeperiods: Optional[List[Dict[str, Any]]] = None,
                           description: Optional[str] = None) -> str:
        """Create a new maintenance period in Zabbix.
        
        Args:
            name: Maintenance name
            active_since: Start time (Unix timestamp)
            active_till: End time (Unix timestamp)
            groupids: List of host group IDs
            hostids: List of host IDs
            timeperiods: List of time periods
            description: Maintenance description
            
        Returns:
            str: JSON formatted creation result
        """
        validate_read_only()
        
        client = get_zabbix_client()
        params = {
            "name": name,
            "active_since": active_since,
            "active_till": active_till
        }
        
        if groupids:
            params["groupids"] = groupids
        if hostids:
            params["hostids"] = hostids
        if timeperiods:
            params["timeperiods"] = timeperiods
        if description:
            params["description"] = description
        
        result = client.maintenance.create(**params)
        return format_response(result)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While it correctly identifies this as a creation operation, it doesn't disclose important behavioral traits like what permissions are required, whether the creation is idempotent, what happens on failure, or any rate limits. The description mentions the return format ('JSON formatted creation result') which is helpful, but lacks other critical context for a mutation tool.

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 with clear sections for the main purpose, arguments, and return value. It's appropriately sized at 3 paragraphs/sections. The information is front-loaded with the core purpose first, followed by details. There's minimal wasted text, though the 'Args' and 'Returns' labels could be more descriptive.

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 creation tool with 7 parameters, no annotations, and no output schema, the description provides adequate but incomplete coverage. It documents all parameters and mentions the return format, but lacks important contextual information about permissions, error handling, and behavioral constraints. The absence of annotations means the description should do more to compensate, particularly for a mutation operation.

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 provides clear parameter documentation in the 'Args' section, listing all 7 parameters with brief explanations. Since schema description coverage is 0%, this parameter information in the description is essential and adds significant value beyond what the bare schema provides. The explanations clarify the purpose of each parameter, though they could be more detailed about formats (e.g., what constitutes valid time periods).

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 maintenance period') and the target system ('in Zabbix'), which provides a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like maintenance_update or maintenance_delete, though the 'create' verb inherently suggests it's for new records rather than modifying existing ones.

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 like maintenance_update or maintenance_delete. It doesn't mention prerequisites, dependencies, or scenarios where this tool is appropriate versus other maintenance-related tools in the sibling list.

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