Skip to main content
Glama
NetBeez MCP Server

NetBeez MCP Server

Official
by netbeez

get_test_statistics

Retrieves pre-aggregated network test statistics over time so you can analyze trends, averages, percentiles, jitter, and MOS in configurable time buckets.

Instructions

Get pre-aggregated test statistics over time (Legacy API: GET /nb_test_statistics.json). Use this — instead of the raw test result endpoints — when you want trend analysis over a long window: averages, percentiles, variability, jitter, or MOS already bucketed into time windows.

How the response is shaped:

  • Each row is one (time-window, metric_type) pair for one matched test.

  • The unit/scale of 'value' depends on metric_type (ms for mean / percentile_mean / stdev / jitter; 1.0–5.0 for mos).

  • Omitting metric_type returns every type the matched test(s) produce; one row per (window, metric_type).

Scoping the query (combine as needed; all narrow the same set of underlying tests):

  • nb_test_id — exactly one test instance.

  • nb_test_template_id — every test instance derived from a template (one per agent).

  • agent_id — restrict to tests run by this agent.

  • nb_target_id — restrict to tests against this target.

  • test_type_id — restrict to a class of tests (Ping/DNS/HTTP/Traceroute/etc.).

Time range (mutually exclusive — pick one):

  • from + to — explicit interval (epoch ms, epoch seconds, or ISO 8601; normalized to ms).

  • last — the most recent N data points (no from/to needed).

Aggregation control:

  • window_size sets the bucket size in seconds (e.g. 60 = 1-minute buckets, 300 = 5-minute, 3600 = 1-hour).

  • granularity is an alternative aggregation hint accepted by the upstream API; pass either window_size OR granularity, not both.

  • grouping changes how rows are grouped within the response. Known value: 'nb_test_id' (per-test breakdown — useful when scoped to a template to get one series per agent). Other values are passed through to the API.

Value (watermark) filtering:

  • value_operator + value_watermark together filter rows by the aggregated 'value' (e.g. value_operator='>' with value_watermark=200 returns only buckets whose aggregated value exceeds 200). Both must be supplied for the filter to apply.

To retrieve jitter or MOS: scope to a test that produces them (a VoIP test, or a Ping test with jitter/MOS enabled) via nb_test_id, nb_test_template_id, or test_type_id, then either set metric_type='jitter' / metric_type='mos', or omit metric_type and pick rows whose metric_type field equals 'jitter' / 'mos'. If the matched test does not produce that metric, no rows are returned for it.

Response: { nb_test_statistics: [{ id, nb_test_id, timestamp, value, metric_type, window_size, datapoint_count, error_count }] }

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

Input Schema

NameRequiredDescriptionDefault
toNoEnd of the time range. Accepts Unix epoch ms, Unix epoch seconds, or ISO 8601; the client normalizes to ms. Use together with 'from'. Mutually exclusive with 'last'.
fromNoStart of the time range. Accepts Unix epoch ms, Unix epoch seconds, or ISO 8601; the client normalizes to ms. Use together with 'to'. Mutually exclusive with 'last'.
lastNoReturn the most recent N data points. Mutually exclusive with from/to.
sort_byNoField to sort the response by (e.g. a column from the row schema such as 'timestamp' or 'value'). Pair with sort_by_order to choose direction. Refer to the NetBeez API docs for the exact list of sortable fields.
agent_idNoFilter to tests run by this agent. Combinable with the other ID filters as an AND.
groupingNoGroup result rows by the named field. Known value: 'nb_test_id' (per-test breakdown — when scoped to a template, this yields one series per agent running the template). Other values are passed through to the upstream API; refer to the NetBeez API docs for the full list.
ts_orderNoOrder rows by timestamp. 'asc' = oldest first, 'desc' = newest first.
nb_test_idNoFilter by a single test instance ID (one agent + one template). Combinable with the other ID filters as an AND.
granularityNoAlternative aggregation control accepted by the upstream API; passed through verbatim. Use this OR window_size, not both. Refer to the NetBeez API docs for accepted values.
metric_typeNoWhich statistical view or derived metric to retrieve. 'mean' / 'percentile_mean' / 'stdev' are computed from the test's primary measurement (e.g. RTT for Ping, lookup time for DNS, response time for HTTP). 'jitter' and 'mos' are only emitted by tests that produce them (VoIP tests, and Ping tests with the jitter/MOS option enabled). Omit to receive all types available for the matched test(s). Determines the unit/scale of the row's 'value'.
window_sizeNoAggregation bucket size in seconds (e.g. 60 = 1-minute buckets, 300 = 5-minute, 3600 = 1-hour). Pass either window_size OR granularity, not both.
nb_target_idNoFilter to tests targeting this target (hostname/IP/URL). Combinable with the other ID filters as an AND.
test_type_idNoFilter by test type ID — restricts to one class of tests (e.g. Ping, DNS, HTTP, Traceroute). The integer mapping is defined by the upstream API.
sort_by_orderNoSort direction for sort_by. 'asc' = ascending, 'desc' = descending.
value_operatorNoComparison operator used together with value_watermark to filter rows by their aggregated 'value' (a watermark filter). Conventionally one of '>', '<', '>=', '<=', '='. Has no effect unless value_watermark is also provided.
value_watermarkNoThreshold value compared against each row's aggregated 'value' using value_operator (e.g. value_operator='>' + value_watermark=200 returns only buckets whose value exceeds 200). Has no effect unless value_operator is also provided. Units match the metric_type (e.g. ms for latency-like metrics, MOS scale 1.0–5.0 for 'mos').
nb_test_template_idNoFilter to all tests derived from this template (one test per agent assigned to the template). Combinable with the other ID filters as an AND.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so: it discloses the row shape, that 'value' units depend on metric_type (ms vs 1.0–5.0 MOS), that omitting metric_type fans out to one row per (window, metric_type), the window_size vs granularity exclusivity, and the watermark filter's two-parameter pairing requirement.

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?

Well front-loaded and organized into labeled sections (response shape, scoping, time range, aggregation, watermarks) that an agent can scan by concern. It is long for a tool description and re-explains a few things the schema already documents, but every section maps to a real parameter group rather than padding.

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

Completeness5/5

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

For a 17-parameter tool with no annotations and no output schema, the description supplies the response shape inline (including the row fields) plus the exclusivity and pairing rules that would otherwise cause failed calls. Nothing an agent needs in order to construct a correct query is missing.

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 the baseline is 3; the description earns credit for synthesizing semantics the schema states only piecemeal — that all ID filters AND together over the same underlying test set, and that scoping to a template plus grouping='nb_test_id' yields one series per agent. It also repeats several schema descriptions verbatim (from/to vs last, window_size examples, watermark pairing), so it adds less than it appears.

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

Purpose5/5

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

States a specific verb and resource ('Get pre-aggregated test statistics over time') and immediately distinguishes itself from the raw test result endpoints (get_test_results / get_scheduled_test_results) by naming trend analysis as its domain. An agent can tell what it returns and how it differs from siblings without opening the schema.

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

Usage Guidelines5/5

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

Explicitly says to use this instead of the raw test result endpoints for long-window trend work, lists what scoping dimensions can be combined, declares from/to and last as mutually exclusive, and gives a concrete recipe for retrieving jitter/MOS. It even states what happens when the matched test does not emit a metric (no rows), which is when-not guidance.

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