Skip to main content
Glama
mpeirone

zabbix-mcp-server

graph_get

Retrieve and filter graphs from Zabbix using specific criteria such as graph, host, or template IDs. Outputs JSON-formatted graph data for integration and monitoring purposes.

Instructions

Get graphs from Zabbix with optional filtering.

Args:
    graphids: List of graph IDs to retrieve
    hostids: List of host IDs to filter by
    templateids: List of template IDs to filter by
    output: Output format
    search: Search criteria
    filter: Filter criteria
    
Returns:
    str: JSON formatted list of graphs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNo
graphidsNo
hostidsNo
outputNoextend
searchNo
templateidsNo

Implementation Reference

  • The graph_get tool handler: retrieves graphs from Zabbix API. Registered via @mcp.tool() decorator. Uses get_zabbix_client() and format_response() helpers.
    @mcp.tool()
    def graph_get(graphids: Optional[List[str]] = None,
                  hostids: Optional[List[str]] = None,
                  templateids: Optional[List[str]] = None,
                  output: Union[str, List[str]] = "extend",
                  search: Optional[Dict[str, str]] = None,
                  filter: Optional[Dict[str, Any]] = None) -> str:
        """Get graphs from Zabbix with optional filtering.
        
        Args:
            graphids: List of graph IDs to retrieve
            hostids: List of host IDs to filter by
            templateids: List of template IDs to filter by
            output: Output format (extend or list of specific fields)
            search: Search criteria
            filter: Filter criteria
            
        Returns:
            str: JSON formatted list of graphs
        """
        client = get_zabbix_client()
        params = {"output": output}
        
        if graphids:
            params["graphids"] = graphids
        if hostids:
            params["hostids"] = hostids
        if templateids:
            params["templateids"] = templateids
        if search:
            params["search"] = search
        if filter:
            params["filter"] = filter
        
        result = client.graph.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 'Get[s] graphs' and returns 'JSON formatted list of graphs,' implying a read-only operation, but doesn't address critical behaviors: whether it requires authentication, has rate limits, supports pagination, or handles errors. For a tool with 6 parameters and no annotation coverage, this leaves significant gaps in understanding how it behaves in practice.

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 a clear purpose statement followed by 'Args' and 'Returns' sections, making it easy to scan. It avoids unnecessary verbosity, though the parameter explanations are minimal. Every sentence serves a purpose, with no redundant information, though it could be more front-loaded with critical usage details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters, no output schema, no annotations), the description is incomplete. It covers the basic purpose and parameters but lacks essential context: no output details beyond 'JSON formatted list', no error handling, no authentication requirements, and no differentiation from sibling tools. For a data retrieval tool in a monitoring system like Zabbix, this leaves too many unknowns for reliable agent use.

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?

The description lists all 6 parameters with brief labels (e.g., 'graphids: List of graph IDs to retrieve'), adding basic semantic meaning beyond the schema's 0% description coverage. However, it doesn't explain how parameters interact (e.g., if 'graphids' overrides other filters), what 'output' options exist beyond 'extend', or the format of 'search' and 'filter' objects. This provides marginal value but doesn't fully compensate for the schema's lack of 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 tool's purpose: 'Get graphs from Zabbix with optional filtering.' It specifies the verb ('Get'), resource ('graphs'), and system ('Zabbix'), making the intent unambiguous. However, it doesn't differentiate from sibling tools like 'history_get' or 'trend_get' that also retrieve data, leaving room for confusion about when to choose this specific graph retrieval tool.

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 mentions 'optional filtering' but doesn't specify scenarios where filtering by graphids, hostids, or templateids is appropriate, nor does it reference sibling tools like 'item_get' or 'trigger_get' that might retrieve related data. Without usage context, the agent must infer applicability from the tool name alone.

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