Skip to main content
Glama
mpeirone

zabbix-mcp-server

user_get

Retrieve users from Zabbix with optional filtering by user IDs, search criteria, or custom filters. Returns a JSON-formatted list of users for streamlined integration and analysis.

Instructions

Get users from Zabbix with optional filtering.

Args:
    userids: List of user IDs to retrieve
    output: Output format
    search: Search criteria
    filter: Filter criteria
    
Returns:
    str: JSON formatted list of users

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNo
outputNoextend
searchNo
useridsNo

Implementation Reference

  • The main handler function for the 'user_get' tool. It is decorated with @mcp.tool(), which registers it as an MCP tool. The function retrieves users from the Zabbix API using the pyzabbix client, applies optional filters, and returns a formatted JSON response.
    def user_get(userids: Optional[List[str]] = None,
                 output: Union[str, List[str]] = "extend",
                 search: Optional[Dict[str, str]] = None,
                 filter: Optional[Dict[str, Any]] = None) -> str:
        """Get users from Zabbix with optional filtering.
        
        Args:
            userids: List of user IDs to retrieve
            output: Output format (extend or list of specific fields)
            search: Search criteria
            filter: Filter criteria
            
        Returns:
            str: JSON formatted list of users
        """
        client = get_zabbix_client()
        params = {"output": output}
        
        if userids:
            params["userids"] = userids
        if search:
            params["search"] = search
        if filter:
            params["filter"] = filter
        
        result = client.user.get(**params)
        return format_response(result)

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