Skip to main content
Glama

network_health_score

Read-only

Calculate a 0–100 composite health score per network from device online rates, uplink health, and alert severity; rank worst networks first with explainable components.

Instructions

[READ] Composite fleet health score per network (0-100), worst-first.

Folds device online %%, uplink health %%, and an alert-severity penalty into
one weighted score per network (0.5 / 0.3 / 0.2), every component returned so
the number is explainable. Pure analysis over injected rows — no live pull.

Args:
    device_statuses: rows {serial, networkId, status, productType} (e.g. from
        org_device_statuses' 'devices').
    uplinks: optional rows {networkId, status} (active/ready = healthy).
    alerts: optional rows {networkId, severity} (critical/warning/info).
    limit: Max rows in the ranked list (default 100). The result carries
        'returned'/'limit'/'truncated'; re-run with a higher limit when
        'truncated' is true rather than treating the list as complete.

Returns dict: {networksEvaluated, fleetScore, summary:{healthy, degraded,
    critical}, weights, worst:[{networkId, score, band, devicesOnline,
    devicesTotal, onlinePct, uplinkHealthPct, alertPenalty}], returned,
    limit, truncated, note}.

Example: network_health_score(device_statuses=[
    {"networkId":"N1","status":"online"},
    {"networkId":"N1","status":"offline"}]).

Input Schema

NameRequiredDescriptionDefault
limitNo
alertsNo
uplinksNo
device_statusesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only provide readOnlyHint=true; the description adds explanation of the computation (weighted 0.5/0.3/0.2 across online %, uplink health %, alert penalty), that components are returned for explainability, and that it's pure analysis with no live pull. Good disclosure beyond annotations; doesn't cover auth or rate limits.

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-loads the [READ] tag and one-line summary, then details weights, args, and return shape. Slightly long but every section carries distinct information; the arg-by-arg breakdown is well organized.

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?

Given no output schema, the description documents the return dict fields (networksEvaluated, fleetScore, summary buckets in {}, weights, worst list fields, returned/limit/truncated/note). With 4 params, 1 required, and 0% coverage, this is thorough.

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

Parameters5/5

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

Schema coverage is 0%, so the description fully carries parameter documentation: shape of each row for device_statuses, uplinks, and alerts (including how 'active/ready' and severity values are interpreted), plus the limit/truncated semantics. This is exactly the compensation required when the schema is silent.

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-class ('composite fleet health score per network') with concrete units (0-100) and ordering rule (worst-first). Distinguishes itself from raw-data siblings like org_device_statuses and device_status by naming this as a fold/aggregation over injected rows.

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

Usage Guidelines4/5

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

Clearly points to the upstream source for the primary argument ('e.g. from org_device_statuses' devices'). Notes it operates on injected rows rather than live data, and explains when to re-run with higher limit when truncated. Doesn't explicitly say when NOT to use it (e.g. for single-network diagnosis vs network_list + device_status).

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