Skip to main content
Glama

itemprototype_get

Retrieve item prototypes from Zabbix by specifying item IDs, discovery rule IDs, or host IDs. Filter and format results in JSON for efficient monitoring integration.

Instructions

Get item prototypes from Zabbix with optional filtering.

Args: itemids: List of item prototype IDs to retrieve discoveryids: List of discovery rule IDs to filter by hostids: List of host IDs to filter by output: Output format search: Search criteria filter: Filter criteria Returns: str: JSON formatted list of item prototypes

Input Schema

NameRequiredDescriptionDefault
discoveryidsNo
filterNo
hostidsNo
itemidsNo
outputNoextend
searchNo

Input Schema (JSON Schema)

{ "properties": { "discoveryids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Discoveryids" }, "filter": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Filter" }, "hostids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Hostids" }, "itemids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Itemids" }, "output": { "default": "extend", "title": "Output", "type": "string" }, "search": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Search" } }, "type": "object" }

Implementation Reference

  • The handler function for the 'itemprototype_get' MCP tool. It is decorated with @mcp.tool() which also serves as registration. The function calls the Zabbix API to retrieve item prototypes based on the provided parameters and returns a formatted JSON response.
    @mcp.tool() def itemprototype_get(itemids: Optional[List[str]] = None, discoveryids: Optional[List[str]] = None, hostids: Optional[List[str]] = None, output: Union[str, List[str]] = "extend", search: Optional[Dict[str, str]] = None, filter: Optional[Dict[str, Any]] = None) -> str: """Get item prototypes from Zabbix with optional filtering. Args: itemids: List of item prototype IDs to retrieve discoveryids: List of discovery rule IDs to filter by hostids: List of host 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 item prototypes """ client = get_zabbix_client() params = {"output": output} if itemids: params["itemids"] = itemids if discoveryids: params["discoveryids"] = discoveryids if hostids: params["hostids"] = hostids if search: params["search"] = search if filter: params["filter"] = filter result = client.itemprototype.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