MCP reporting semantics
Rank activity in one request
Section titled “Rank activity in one request”Use packettale_rank_network_activity to combine compact summaries and return a ranked result. For the ten most-blocked reported domains over the last seven calendar days, send these tool arguments.
{ "group_by": "domain", "metric": "blocked", "order": "desc", "limit": 10, "days": 7}The server aggregates across matching devices, applications, countries and days before sorting. It returns up to ten domains in this example. A domain reported on several days or by several groups has one combined row.
| Input | Default | Meaning |
|---|---|---|
group_by |
domain |
Group by reported domain, raw host, application name, device UUID, current group ID or country. |
metric |
blocked |
Rank by blocked, allowed, connections, bytes_sent, bytes_received or bytes_total. Connections means allowed plus blocked. Total bytes means sent plus received. |
order |
desc |
Largest metric first. Use asc for the smallest positive totals. Equal values sort by grouping key ascending. |
limit |
10 |
Return between 1 and 100 grouped rows. Groups with a zero selected metric are excluded. |
days |
7 |
Include today and the preceding UTC calendar days, capped by summary retention. |
group_id, device_id, platform |
All | Restrict the source devices. Multiple supplied filters must all match. |
query |
All | Match comma-separated literal terms against application or host, case-insensitively. Any term can match. |
app, host |
All | Match a case-insensitive substring in the application name or host. |
For group_by=domain, the server excludes empty hosts and IP addresses, including IPv6 and IPv4-mapped IPv6. It lowercases hostnames and removes trailing dots. Domain grouping includes local hostnames, not just internet domains. A name such as office-laptop-042 can therefore appear alongside example.com. Subdomains remain distinct. api.example.com and example.com have separate rows. Grouping by host preserves the reported strings and includes IP addresses.
Application grouping combines equal reported application names across devices and profile IDs. Device grouping uses UUIDs. Group grouping uses each device’s current policy group. Country grouping uses the reported country code, with an empty string for unknown country.
Periods and device scope
Section titled “Periods and device scope”Summary tools use UTC calendar days. Seven days includes today and the six preceding dates. Today’s totals cover the summaries received so far. They can increase as devices report.
rank_network_activity and traffic_summary default to days=7. network_activity defaults to period="7" and accepts "1", "7", "30" or "90". The effective period is capped by the organisation’s summary retention. A one-day summary covers the current UTC date, starting at midnight. Use endpoint history for a specific time interval within a day.
The application activity and application destination tools use the current UTC date. Their MCP inputs currently expose device, application and page selection.
Summary tools exclude revoked and removed devices. Group filters and group attribution use current device membership. Retained summaries from a device that moved groups are attributed to its current group when queried.
Read a ranking response
Section titled “Read a ranking response”The following example has two matching domains. It shows the structuredContent returned by the tool.
{ "group_by": "domain", "metric": "blocked", "order": "desc", "limit": 10, "requested_days": 7, "effective_days": 7, "since": "2026-11-21", "through": "2026-11-27", "timezone": "UTC", "generated_at": "2026-11-27T12:00:00Z", "consistency": "single_statement", "rows": [ { "key": "example.com", "value": 12, "allowed": 10, "blocked": 12, "bytes_sent": 100, "bytes_received": 120 }, { "key": "other.example", "value": 5, "allowed": 9, "blocked": 5, "bytes_sent": 90, "bytes_received": 50 } ], "has_more": false, "returned_totals": { "allowed": 19, "blocked": 17, "bytes_sent": 190, "bytes_received": 170 }}value is the selected ranking metric. Every row also contains both connection counters and both byte counters. returned_totals sums only the returned rows. has_more=true means more positive groups exist beyond the requested limit. Increase the limit or narrow the filters to inspect them.
since and through are inclusive UTC dates. generated_at records when the request began. consistency="single_statement" means the grouped source records were read by one database statement. This result has no follow-up page or reusable snapshot identifier.
Interpret daily activity rows
Section titled “Interpret daily activity rows”packettale_network_activity returns daily rows grouped by date, reported host and current policy group. The same host can therefore appear on multiple pages. Rows combine matching devices and applications within that daily group. Host strings, including IP addresses, are preserved.
The sort order is date descending, blocked count descending, allowed count descending, host ascending, then group ID ascending. Each page contains 50 rows by default. destinations contains rows, page, pages, count and page_size. The totals object describes all matching rows in the selected period. Its daily array contains ascending dates with allowed_total and blocked_total counters.
The verdict input filters source rows. verdict="blocked" includes rows whose blocked count is positive. Those rows can also have allowed connections, so their allowed counts remain in the result and its totals. verdict="allowed" behaves the same way for positive allowed counts. Byte totals describe the selected rows and cannot split bytes by verdict. For a blocked-domain ranking, use rank_network_activity with metric="blocked".
Pagination during updates
Section titled “Pagination during updates”Numbered pages in the device, account, audit and summary tools are live views. Concurrent reporting, account changes or device reassignment can change the count and move rows between page requests. Summing every fetched page can repeat or miss records during those changes. A matching total in one run does not establish a snapshot guarantee.
query_history includes records at or after since and before until. Each request covers at most seven days. Records advance in ascending UTC start time and record ID order. The response returns a position cursor in next_cursor. Pass it back unchanged with the same filters. Retention or deletion can still change the underlying history. An end timestamp bounds the query interval but does not freeze its contents.
Use the ranking tool for aggregate questions that fit a single response. The MCP API currently has no as_of parameter or shared snapshot spanning several calls. For a retained detailed result, save an investigation and query its stored records.
Response schemas and errors
Section titled “Response schemas and errors”Each discovered tool advertises an output schema. The tool reference includes the response fields alongside the request schema. Reporting responses describe counters and date ranges. Paginated objects describe their row array and pagination metadata. Domain-specific records can include further fields.
Check the MCP result’s isError flag before using its structuredContent. A tool error contains a machine-readable code and a message. For example, a call requiring another scope can return this structured error.
{ "code": "insufficient_scope", "message": "Grant the required access in your MCP client."}Invalid inputs, access restrictions, stale policy revisions and unavailable endpoints also return structured tool errors. Authentication failures can return HTTP 401 before a tool runs. See Check the connection for the OAuth challenge and sign-in check.
Bulk operations also return a status and reason for each selected device. Check every entry in results, since an operation can succeed for some devices and fail for others.
Allow Google Analytics to measure how this website is used?Privacy notice