Skip to main content
Glama
mpeirone

zabbix-mcp-server

apiinfo_version

Retrieve Zabbix API version details in JSON format. This tool provides essential version information for seamless integration and monitoring setup.

Instructions

Get Zabbix API version information.

Returns:
    str: JSON formatted API version info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'apiinfo_version' tool. It retrieves the Zabbix API version using the ZabbixAPI client and formats the result as JSON.
    def apiinfo_version() -> str:
        """Get Zabbix API version information.
        
        Returns:
            str: JSON formatted API version info
        """
        client = get_zabbix_client()
        result = client.apiinfo.version()
        return format_response(result)
  • Helper function that initializes and returns the authenticated Zabbix API client, used by the apiinfo_version tool.
    def get_zabbix_client() -> ZabbixAPI:
        """Get or create Zabbix API client with proper authentication.
        
        Returns:
            ZabbixAPI: Authenticated Zabbix API client
            
        Raises:
            ValueError: If required environment variables are missing
            Exception: If authentication fails
        """
        global zabbix_api
        
        if zabbix_api is None:
            url = os.getenv("ZABBIX_URL")
            if not url:
                raise ValueError("ZABBIX_URL environment variable is required")
            
            logger.info(f"Initializing Zabbix API client for {url}")
            
            # Configure SSL verification
            verify_ssl = os.getenv("VERIFY_SSL", "true").lower() in ("true", "1", "yes")
            logger.info(f"SSL certificate verification: {'enabled' if verify_ssl else 'disabled'}")
            
            # Initialize client
            zabbix_api = ZabbixAPI(url=url, validate_certs=verify_ssl)
    
            # Authenticate using token or username/password
            token = os.getenv("ZABBIX_TOKEN")
            if token:
                logger.info("Authenticating with API token")
                zabbix_api.login(token=token)
            else:
                user = os.getenv("ZABBIX_USER")
                password = os.getenv("ZABBIX_PASSWORD")
                if not user or not password:
                    raise ValueError("Either ZABBIX_TOKEN or ZABBIX_USER/ZABBIX_PASSWORD must be set")
                logger.info(f"Authenticating with username: {user}")
                zabbix_api.login(user=user, password=password)
            
            logger.info("Successfully authenticated with Zabbix API")
        
        return zabbix_api
  • Helper function that formats the API response data as a JSON string, used by the apiinfo_version tool.
    def format_response(data: Any) -> str:
        """Format response data as JSON string.
        
        Args:
            data: Data to format
            
        Returns:
            str: JSON formatted string
        """
        return json.dumps(data, indent=2, default=str)
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool returns JSON-formatted info, which adds useful behavioral context beyond the basic purpose. However, it does not mention potential errors, rate limits, or authentication needs, leaving some gaps for a tool with zero annotation coverage.

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 front-loaded with the purpose in the first sentence, followed by a brief note on return format. Both sentences earn their place by providing essential information without waste, making it highly efficient and well-structured.

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

Completeness4/5

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

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is mostly complete. It covers the purpose and return format, but lacks details on error handling or behavioral traits. For such a simple tool, this is sufficient but not exhaustive.

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 tool has 0 parameters, and schema description coverage is 100%, so no parameter info is needed. The description does not add parameter semantics, but this is appropriate given the lack of parameters. A baseline of 4 is applied as it adequately handles the zero-parameter case without unnecessary details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get') and resource ('Zabbix API version information'), distinguishing it from sibling tools that perform operations like create, delete, update, or get specific resources (e.g., host_get, item_get). It precisely defines what the tool does without being vague or tautological.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for retrieving API version info, but does not explicitly state when to use this tool versus alternatives. Given that it's a unique tool among siblings (no direct alternatives for version info), the implied context is adequate, but no explicit guidance on prerequisites or exclusions is provided.

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