Skip to main content
Glama

Queryanalytics

queryAnalytics

Fetches NextDNS analytics metrics—query status, devices, protocols, destinations—as totals or time series, filtered by profile or device.

Instructions

Query NextDNS analytics metrics.

Metrics: - status: Query resolution status (default, blocked, allowed, relayed). - devices: Queries per device. - protocols: DNS transport protocol (DoH, DoT, Do53 UDP/TCP, DoQ). - queryTypes: DNS record types requested (A, AAAA, CNAME, etc.). - ipVersions: IPv4 vs IPv6 queries. - dnssec: DNSSEC validation results. - encryption: Encrypted vs unencrypted queries. - reasons: Why queries were blocked or allowed. - ips: Top source IPs. - destinations: Top destinations; requires destination_type such as countries or gafam.

Set series=true to fetch time-series data instead of aggregate totals. Time values can be Unix timestamps or relative strings like -1d. Note: series=true is not supported when metric="domains".

Optional filters: - cursor: Pagination cursor from a previous response. - device: Filter analytics to a single device id. - status: For the domains metric, filter by resolution status. - root: For the domains metric, group results by root domain (boolean).

Examples: - totals: queryAnalytics(metric="status", profile_id="abc123", from_time="-1d") - time series: queryAnalytics(metric="status", profile_id="abc123", from_time="-1d", series=true) - destinations: queryAnalytics(metric="destinations", profile_id="abc123", from_time="-1d", destination_type="countries")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootNo
limitNo
cursorNo
deviceNo
metricYes
seriesNo
statusNo
to_timeNo
intervalNo
partialsNo
timezoneNo
alignmentNo
from_timeNo
profile_idYes
destination_typeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.0.1

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses key behavioral constraints: series=true is unsupported for metric=domains, destinations requires destination_type, time values accept Unix timestamps or relative strings like '-1d'. These are useful non-obvious behaviors. However, it doesn't disclose rate limits, auth requirements, or the response shape.

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?

Front-loaded with the core purpose, then structured sections (Metrics, Optional filters, Examples). The examples section adds real value. Some verbosity in per-metric explanations, but the structure makes it scannable.

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?

Has an output schema so return value explanation isn't needed. For a 15-parameter tool, the description covers the semantic meaning of metric values and the important conditional constraints. Missing explanations for several parameters (interval, alignment, partials, timezone) is a gap, but overall adequate.

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 description coverage is 0%, so the description must compensate. It explains meaning for many parameters: metric (with full enumeration of 11 values and their semantics), series, cursor, device, status (scoped to domains metric), root (scoped to domains metric), destination_type. Several parameters remain unexplained (limit, to_time, from_time, interval, partials, timezone, alignment) but the ones that matter most for correct invocation are covered.

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?

States a specific verb (query) and resource (NextDNS analytics metrics), and clearly enumerates the available metrics. Doesn't differentiate from the sibling plotAnalytics, but the metric enumeration and emphasis on aggregate totals vs time-series gives an agent a clear sense of what this tool does.

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?

Explains usage context implicitly: series=true for time-series, cursor for pagination, device for filtering. However, it never explains when to use this versus plotAnalytics, which appears to be the natural alternative for visual analysis. No explicit when-not guidance.

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