hostgroup_update
Modify an existing Zabbix host group by updating its name using specified group ID. Returns JSON-formatted results for tracking changes.
Instructions
Update an existing host group in Zabbix.
Args:
groupid: Group ID to update
name: New group name
Returns:
str: JSON formatted update result
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| groupid | Yes | ||
| name | Yes |
Input Schema (JSON Schema)
{
"properties": {
"groupid": {
"title": "Groupid",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
}
},
"required": [
"groupid",
"name"
],
"type": "object"
}
Implementation Reference
- src/zabbix_mcp_server.py:289-303 (handler)The main handler function for the 'hostgroup_update' tool, decorated with @mcp.tool() which also serves as its registration in the MCP server. It updates the name of a Zabbix host group using the Zabbix API client.def hostgroup_update(groupid: str, name: str) -> str: """Update an existing host group in Zabbix. Args: groupid: Group ID to update name: New group name Returns: str: JSON formatted update result """ validate_read_only() client = get_zabbix_client() result = client.hostgroup.update(groupid=groupid, name=name) return format_response(result)
- src/zabbix_mcp_server.py:289-289 (registration)The @mcp.tool() decorator registers the hostgroup_update function as an MCP tool.def hostgroup_update(groupid: str, name: str) -> str: