Count devices
count_devicesCount the authenticated company's devices, optionally narrowed by device status, assigned policy (or several, with "policies"), "lastSyncBefore" (each device's last sync, the portal's "Last sync", before an instant: use it for devices not synced, not seen or offline since a date), "lastSeenBefore" (asset record updated before an instant; not proof of being offline) and/or "missing" (devices without an IMEI or a serial number, e.g. "how many devices have no IMEI"). Use this instead of search_devices when only a total is needed, e.g. "how many active devices do we have" or "how many devices have not synced in a week". With "groupBy" it breaks the count down by "policy", "model" and/or "status" in one call, exact for the whole fleet: use it for which models are in a policy, how many of each model, or each model per policy, never search_devices, whose results are capped.
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": "count_devices"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| policy | No | Filter by the policy's path name (its unique short identifier, as returned by list_policies as "pathName" - not its human-readable display name). | |
| status | No | Filter by device status. ACTIVE = enrolled and functioning normally; INACTIVE = enrolled but disabled; SYNCHRONIZING = enrollment in progress; DELETED = removed from the fleet; REPROVISIONED = wiped and re-enrolled; EXTERNAL = tracked as an asset without MDM enrollment. | |
| company | No | Optional: a `company` value from list_companies to run this in. Omit it for the connection's own company. | |
| groupBy | No | Break the count down: one group per combination of these values, largest first, each with its count ("model" is the device's model code, with its commercial "marketingName" when known; null when the device reports none). ["model"] answers how many devices of each model; ["policy", "model"] each model per policy. | |
| missing | No | Only devices that have none of these identifiers: "imei" (no IMEI: a Wi-Fi-only device, or one that never reported it) and/or "serialNumber" (no serial number). Use it for questions such as how many devices have no IMEI, or which ones. | |
| policies | No | Count the devices of any of these policies (path names, as for "policy"), all in one call. Use it for a group of policies, e.g. every policy whose name contains a word. | |
| lastSeenBefore | No | Only include assets whose record was updated before this ISO-8601 instant (e.g. "2026-01-01T00:00:00Z"). Metadata changes can update the record; this does not prove the device is offline. Must not be in the future. Minute-granularity: a device updated up to 59 seconds after this instant may still be included. | |
| lastSyncBefore | No | Only include devices whose last sync (the portal's "Last sync": their last contact with Nomid) is before this ISO-8601 instant (e.g. "2026-01-01T00:00:00Z"). Use it for devices not synced, not seen or offline since a date. A device that never synced, or an asset without MDM, has no last sync and is never included. Must not be in the future. Minute-granularity: a device that synced up to 59 seconds after this instant may still be included. |