Skip to main content
Glama
mpeirone

zabbix-mcp-server

trigger_create

Define and configure custom triggers in Zabbix monitoring to detect specific conditions. Set description, expression, severity, status, and comments to automate issue alerts.

Instructions

Create a new trigger in Zabbix.

Args:
    description: Trigger description
    expression: Trigger expression
    priority: Severity (0=not classified, 1=info, 2=warning, 3=average, 4=high, 5=disaster)
    status: Status (0=enabled, 1=disabled)
    comments: Additional comments
    
Returns:
    str: JSON formatted creation result

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commentsNo
descriptionYes
expressionYes
priorityNo
statusNo

Implementation Reference

  • The main handler function for the 'trigger_create' MCP tool. It is decorated with @mcp.tool() which handles both implementation and registration in FastMCP. The function creates a new trigger in Zabbix by calling the ZabbixAPI client's trigger.create method after validating permissions and formatting parameters.
    @mcp.tool()
    def trigger_create(description: str, expression: str,
                       priority: int = 0, status: int = 0,
                       comments: Optional[str] = None) -> str:
        """Create a new trigger in Zabbix.
        
        Args:
            description: Trigger description
            expression: Trigger expression
            priority: Severity (0=not classified, 1=info, 2=warning, 3=average, 4=high, 5=disaster)
            status: Status (0=enabled, 1=disabled)
            comments: Additional comments
            
        Returns:
            str: JSON formatted creation result
        """
        validate_read_only()
        
        client = get_zabbix_client()
        params = {
            "description": description,
            "expression": expression,
            "priority": priority,
            "status": status
        }
        
        if comments:
            params["comments"] = comments
        
        result = client.trigger.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 full burden for behavioral disclosure. While it indicates this is a creation operation, it doesn't specify permissions required, whether the operation is idempotent, error handling behavior, or rate limits. The return format is mentioned but without details about success/failure responses or potential side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with a clear purpose statement followed by well-organized parameter documentation. Every sentence serves a specific purpose with zero wasted content, making it easy to parse and understand quickly.

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 5 parameters and no annotations or output schema, the description provides good parameter documentation but lacks behavioral context. It covers the 'what' (parameters) adequately but not the 'how' (behavioral traits, error handling, permissions). The return format is mentioned but without structural details.

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 meaningful semantic context for all 5 parameters beyond what the schema offers (0% coverage). It explains what each parameter represents, including enumerated values for 'priority' and 'status' with clear mappings. This significantly compensates for the lack of schema 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 trigger') and resource ('in Zabbix'), providing specific verb+resource pairing. However, it doesn't differentiate from sibling tools like 'trigger_update' or 'trigger_delete', which would require explicit comparison to achieve a score of 5.

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 'trigger_update' or 'trigger_delete', nor does it mention prerequisites or contextual usage scenarios. It simply states what the tool does without indicating appropriate application contexts.

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