Plotanalytics
plotAnalyticsGenerate a PNG line chart for NextDNS analytics time-series metrics to visualize query trends over time. Requires recent query history; returns error if no data.
Instructions
Generate a PNG line chart for a NextDNS analytics time-series metric.
Use this to visualize query trends over time. The profile should have recent query history; otherwise the tool returns an error explaining that no data is available.
Supported metrics: status, devices, protocols, queryTypes,
ipVersions, dnssec, encryption, reasons, ips.
Time values can be Unix timestamps or relative strings like -1d.
The ;series endpoint takes no limit parameter: limit is part of
this tool's published surface, is rejected above 500 rather than clamped,
and is never forwarded, so the requested range is the only thing that bounds
the response. Three server-side limits are enforced before the request is
built, and each is rejected with an invalid_argument error naming the
limit rather than silently adjusted:
intervalmust be between 60 and 86400 seconds.limitmust not exceed 500.The range must be interpretable (a Unix timestamp, an ISO 8601 timestamp,
now, or a relative offset such as-7d; a relative unit letter is read case-sensitively and a timestamp with no timezone is read as UTC), must end after it starts, and spans at most 2000 intervals (at most 2000 points per series), so a wide range needs a proportionally largerinterval.
Examples:
- plotAnalytics(metric="status", profile_id="abc123", from_time="-1d")
- plotAnalytics(metric="devices", profile_id="abc123", from_time="-7d", interval=86400)
- a year of data: plotAnalytics(metric="status", profile_id="abc123", from_time="-1y", interval=43200)
Returns: An MCP ImageContent PNG chart, or an error dict if data is unavailable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| metric | Yes | ||
| to_time | No | now | |
| interval | No | ||
| partials | No | none | |
| timezone | No | GMT | |
| alignment | No | end | |
| from_time | No | -1d | |
| profile_id | No |