Search devices
search_devicesFind CPE devices in GenieACS using MongoDB-style filters on tags, manufacturer, model, firmware, last inform, or TR-069 parameters; read-only queries return paginated summaries.
Instructions
Find CPE devices in GenieACS with a MongoDB-style filter: by tag, manufacturer, model, firmware version, last inform time or any TR-069 parameter. It only reads. Examples: {"_tags":"office"}; {"InternetGatewayDevice.DeviceInfo.Manufacturer":"Huawei"} (GenieACS adds ._value to parameter paths); {"_lastInform":{"$lt":"2026-01-01T00:00:00Z"}} for devices silent since that date; {"_id":{"$regex":"^202BC1-"}}. Query operators such as $eq, $ne, $gt, $lt, $in, $nin, $exists, $regex, $and and $or work; $where, $function, $accumulator and $expr are refused, and a $regex pattern may be at most 256 characters. By default each device comes back as a summary (id, last inform, tags, manufacturer, product class, serial); ask for other fields with projection. Results come in pages of limit (default 50, at most 200); page with skip.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "search_devices"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| skip | No | Matching devices to skip before this page, for paging. Default 0. | |
| sort | No | Sort order as a JSON object string: 1 ascending, -1 descending. Example: {"_lastInform":-1} for the most recent first. | |
| limit | No | Most devices to return in this page, 1 to 200. Default 50. | |
| query | Yes | The filter, as a JSON object string. Example: {"_tags":"office"} or {"_id":"202BC1-BM632w-000001"}. | |
| projection | No | Comma-separated fields to return per device, e.g. "_id,InternetGatewayDevice.DeviceInfo.SoftwareVersion". Default: the summary fields. "all" returns whole device documents, which can be large (tens of KB each). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| more | Yes | true when the page is full, so more devices may match: call again with skip = skip + count. | |
| skip | Yes | Devices skipped before this page. | |
| count | Yes | Devices in this page. | |
| limit | Yes | The page size used. | |
| devices | Yes | The matching device documents, with the fields the projection asked for. |