dservice_get
Retrieve discovered services (ports and protocols) from Zabbix hosts, with filtering by host, discovery rule, status, IP, or port. Use it to inspect which services responded during network discovery.
Instructions
Retrieve discovered services (read-only). Discovered services represent individual checks (ports, protocols) that responded on a discovered host. They belong to discovered hosts (dhost) and are created by network discovery rules (drule).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "dservice_get"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results to return. | |
| filter | No | Return only results whose properties exactly match the given values (a single value or a list of values per key). Example: {"status": 0} or {"status": [0, 1]}. Keys: dcheckid, dhostid, dns, dserviceid, ip, lastdown, lastup, port, status, value. Text properties cannot be filtered; use 'search' for them. | |
| output | No | Properties of the dservice object to return. Pass 'extend' for all, 'count' for the number of matches only, or a list of property names. Default when omitted: dserviceid, dhostid, dcheckid, ip, port, status. Properties: dcheckid, dhostid, dns, dserviceid, ip, lastdown, lastup, port, status, value. | |
| search | No | Return results whose string properties contain the given pattern (case-insensitive; '*' is a wildcard when searchWildcardsEnabled is true). Example: {"name": "web"}. Keys: dns, ip, value. | |
| server | No | Target Zabbix server. Available: default. Defaults to 'default' if omitted. | |
| dhostids | No | Return only discovered services belonging to the given discovered hosts. | |
| druleids | No | Return only discovered services found by the given network discovery rules. | |
| raw_json | No | Strips the security disclaimer preamble from the response so it is pure JSON. Default: false. Requires the bearer token to have 'allow_raw_json' explicitly enabled by an operator in the admin portal - tokens without that policy receive a PolicyError instead. WARNING: setting true bypasses the prompt-injection mitigation marker that wraps untrusted Zabbix data (host names, item descriptions, problem text). LLM clients (Claude, GPT, Cursor, ...) should leave this false; only programmatic non-LLM consumers (Python scripts, n8n workflows that json.loads the result) should set true. | |
| sortfield | No | Sort by one or more of: dserviceid, dhostid, ip (a list for several; pair with 'sortorder'). No other property is sortable. | |
| sortorder | No | Sort order: 'ASC' (ascending) or 'DESC' (descending). | |
| countOutput | No | Return the count of matching results instead of the actual data. | |
| dserviceids | No | Return only discovered services with the given IDs. | |
| searchByAny | No | If true, return results matching ANY search field (OR). Default is ALL fields (AND). | |
| extra_params | No | Other native dservice.get parameters, merged into the request as-is. Parameters: dcheckids, groupCount, limitSelects. Switches (true turns one on, false is the same as leaving it out): groupCount. groupCount goes with output='count': the count is then split by the ID filters the method groups by (hostids, groupids ...), one row per ID with 'rowscount'; a single row without such a filter. Sub-object selects (value 'extend', 'count' or a list of property names): selectDHosts, selectDRules, selectHosts. Any other key is refused here, because Zabbix would silently ignore it. For a parameter you are sure exists on your release but is not listed, use zabbix_raw_api_call. | |
| searchWildcardsEnabled | No | If true, enable * and ? wildcards in search patterns. |