Skip to main content
Glama
AdGuard DNS API MCP Server

AdGuard DNS API MCP Server

by Ankur1911

getDevicesQueriesStats

Read-onlyIdempotent

Retrieve paginated DNS query statistics grouped by device for a chosen period, ranked by query count. Filter by devices, countries, or DNS servers to analyze per-device traffic.

Instructions

Gets devices statistics

Returns DNS query statistics grouped by device for the specified period. Response is paginated, items are arranged by query count. For the initial request a default limit is applied if not specified. For the subsequent requests cursor must be provided (limit can be omitted). Filtering parameters, if specified for the initial request, must be provided on each page request as well.

Calls GET /oapi/v1/stats/devices.

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": "getDevicesQueriesStats"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoPagination limit (may be overridden by cursor) (default: 10)
cursorNoPagination cursor
devicesNoFilter by devices
timespanNoStatistics timespan (has greater priority over explicitly provided millis)
countriesNoFilter by countries
dns_serversNoFilter by DNS servers
X_Account_IdNoOptional ID of the account to operate on. Defaults to the authenticated user's own account. Use GET /oapi/v1/accounts to list available accounts.
time_to_millisNoTime to in milliseconds (inclusive), required if `timespan` is not specified
time_from_millisNoTime from in milliseconds (inclusive), required if `timespan` is not specified

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnlyHint, idempotentHint, openWorldHint), so the description's job is to add operational context — and it does, spelling out the two-phase pagination contract, that filters must persist across pages, and that results are ordered by query count. This is real behavior beyond the annotations, though it says nothing about rate limits or result-size behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The pagination contract is front-loaded and each sentence carries distinct information. The opening line 'Gets devices statistics' is slightly redundant with the more precise sentence that immediately follows, a minor waste in an otherwise tight definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter stats tool with no output schema, the description covers the pagination protocol, filter persistence, and result ordering, while the schema fully documents the individual parameters. The remaining gap is the shape of each returned device-stat item, which an agent cannot learn from either the description or an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description earns a bump by explaining the interaction between limit and cursor across requests (default applied initially, cursor required subsequently, limit optional then) and by stating that filter parameters must be resent on each page. That is meaning the schema only hints at with 'may be overridden by cursor'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource — DNS query statistics grouped by device for a specified period — plus the underlying endpoint GET /oapi/v1/stats/devices. The 'grouped by device' phrase implicitly separates it from siblings like getDomainsQueriesStats and getTimeQueriesStats, though it never names those alternatives explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives strong procedural guidance for pagination (default limit on the first call, cursor required afterwards, filters must be repeated on each page). It does not tell the agent when to pick this tool over the other grouped-stats siblings such as getDomainsQueriesStats or getTimeQueriesStats, leaving that to inference from 'grouped by device'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.