Skip to main content
Glama

Netmon (demo)

alerts_history

Read-onlyIdempotent

Authoritative 'what fired and when' stream — wraps the alert_history table (one row per incident, both legacy and modern) and alert_outlet_log (per-dispatch ledger keyed by history_id).

Default mode: lists incidents newest-first. Each row is one incident with opened_at / last_event_at / resolved_at framing the lifecycle, plus aggregated outlet_types[], dispatch_count, and failed_count. status is computed from resolved_at: 'open' if null, 'resolved' otherwise.

Drill-down mode: pass incident_id (the alert_history.id, NOT alert_id) to switch the call to /api/alert-history/{id}/log and return the per-outlet dispatch ledger for that one incident. Use this for 'did the email actually go' / 'what did the webhook payload look like' / 'which outlets failed' follow-ups.

Filters (default mode, all client-side, AND-combined): status (open|resolved|all, default all), severity (int or array — scheme is 1-5, lower=worse), device_id, source (legacy|modern|all), hours (1-168, default 24, applied against last_event_at), search (substring on alert_label/subject).

Important caps: the upstream endpoint returns at most 500 rows ordered by last_event_at DESC. We can't reach older rows than that. meta.upstream_cap reports this so the LLM can warn the user when results may be truncated. severity_label is added server-side so the LLM doesn't memorize the scale.

Pagination is over the post-filter result. Tag-scope is enforced by Laravel — tag-restricted users see only incidents for devices in their slug set.

Permission: alerts. Examples: alerts_history({status: 'open', severity: [1,2], hours: 1}) alerts_history({device_id: 42, hours: 24}) alerts_history({incident_id: 9182}) // dispatch ledger

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo1-indexed page number (default 1).
hoursNoLookback window applied against last_event_at (default 24).
searchNoCase-insensitive substring on alert_label / subject.
sourceNoFilter by source axis. Default 'all'.
statusNoFilter by lifecycle state. Default 'all'.
end_timeNoISO-8601 UTC; pairs with start_time.
per_pageNoRows per page (default 50, max 200).
severityNoSeverity int or array of ints (1-5, lower=worse).
device_idNoRestrict to one device id.
start_timeNoISO-8601 UTC; pairs with end_time.
incident_idNoIf set, switches to per-incident dispatch-ledger mode (returns alert_outlet_log rows). This is alert_history.id, NOT alert_id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, and non-destructive hints, but the description adds critical operational context: the upstream 500-row cap, meta.upstream_cap reporting, severity_label added server-side, pagination over post-filter results, and Laravel-enforced tag-scope. This goes beyond annotations and fully discloses the tool's constraints and server-side behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Although lengthy, the description is tightly structured into labeled sections (default mode, drill-down, filters, caps, pagination, permissions, examples) with no fluff. Every sentence adds operational value, and the critical constraints are front-loaded before the examples. This is appropriate for a tool with 11 parameters and two distinct modes.

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?

With no output schema, the description carries the burden of explaining return structures, and it does so thoroughly: default mode returns per-incident lifecycle timestamps plus aggregated outlet_types[], dispatch_count, failed_count, and computed status; drill-down returns the per-outlet dispatch ledger. It also covers pagination, caps, and filtering semantics, leaving no critical gap for correct usage.

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 100%, but the description still adds significant semantic value: it explains that incident_id switches to drill-down mode and is alert_history.id not alert_id, that hours applies against last_event_at, that status is computed from resolved_at, and that filters are AND-combined. These details are not present in the schema's per-field descriptions, making the description indispensable for correct invocation.

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?

The description clearly states it is an authoritative stream of alert incidents with a default listing mode and a drill-down mode for per-outlet dispatch logs. It names the underlying tables and distinguishes itself from the sibling alerts_list by describing the incident lifecycle and aggregation, so an agent can tell them apart 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?

The description explicitly explains when to use default mode versus drill-down mode (e.g., 'Use this for did the email actually go follow-ups'), lists filters, and notes the upstream 500-row cap so the agent can warn users about truncation. It effectively guides the agent to the right mode and parameter combinations for common questions.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.