Skip to main content
Glama
mpeirone

zabbix-mcp-server

hostgroup_get

Retrieve Zabbix host groups using group IDs, search criteria, or filters. Returns a JSON-formatted list for integration with AI assistants or monitoring workflows.

Instructions

Get host groups from Zabbix.

Args:
    groupids: List of group IDs to retrieve
    output: Output format
    search: Search criteria
    filter: Filter criteria
    
Returns:
    str: JSON formatted list of host groups

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNo
groupidsNo
outputNoextend
searchNo

Implementation Reference

  • The main handler function for the 'hostgroup_get' tool. It is registered via the @mcp.tool() decorator and implements the logic to fetch host groups from the Zabbix API based on provided parameters (groupids, output, search, filter), formats the params, calls client.hostgroup.get(**params), and returns JSON-formatted result using format_response.
    @mcp.tool()
    def hostgroup_get(groupids: Optional[List[str]] = None,
                      output: Union[str, List[str]] = "extend",
                      search: Optional[Dict[str, str]] = None,
                      filter: Optional[Dict[str, Any]] = None) -> str:
        """Get host groups from Zabbix.
        
        Args:
            groupids: List of group IDs to retrieve
            output: Output format (extend or list of specific fields)
            search: Search criteria
            filter: Filter criteria
            
        Returns:
            str: JSON formatted list of host groups
        """
        client = get_zabbix_client()
        params = {"output": output}
        
        if groupids:
            params["groupids"] = groupids
        if search:
            params["search"] = search
        if filter:
            params["filter"] = filter
        
        result = client.hostgroup.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 full burden. It states this is a 'Get' operation, implying read-only behavior, but doesn't disclose any behavioral traits like authentication requirements, rate limits, pagination, error conditions, or what happens when no groups match the criteria. The return format is mentioned but without details on structure or error 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 appropriately sized and well-structured with clear sections (purpose, args, returns). Every sentence earns its place, though the parameter descriptions could be more informative. It's front-loaded with the core purpose first.

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 4 parameters with 0% schema coverage, no annotations, and no output schema, the description provides basic coverage but lacks depth. It explains what the tool does and lists parameters, but doesn't fully address behavioral aspects or parameter details needed for effective use. The return format is mentioned but without schema details.

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?

Schema description coverage is 0%, so the description must compensate. It lists all 4 parameters (groupids, output, search, filter) with brief labels, adding some semantic meaning beyond the schema's property names. However, it doesn't explain what each parameter does, their relationships, or provide examples (e.g., what 'output: extend' means, how search differs from filter). This partial compensation earns a baseline score.

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 verb ('Get') and resource ('host groups from Zabbix'), making the purpose immediately understandable. It distinguishes this from obvious siblings like hostgroup_create, hostgroup_delete, and hostgroup_update by being a read operation, though it doesn't explicitly differentiate from other 'get' tools like host_get or template_get.

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?

No guidance is provided on when to use this tool versus alternatives. With many sibling 'get' tools (host_get, template_get, item_get, etc.), there's no indication of when hostgroup_get is appropriate versus other retrieval tools, nor any mention of prerequisites or typical use cases.

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