Skip to main content
Glama

explain_alert

Collects the facts needed to explain a single Snort alert: rule text, parsed options, 5-tuple, packet bytes, and content/pcre match offsets.

Instructions

Facts about one alert: the rule text and parsed options, the 5-tuple/direction/service, a bounded hex+ASCII dump, and which content/pcre options appear in the payload and at what offsets (wire bytes reassembled from the pcap, plus Snort's own inspected buffer). Report facts; you do the explaining. Example: explain_alert(run_id="r-0002", alert_idx=0)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYes
alert_idxYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral burden and does well: it discloses that the dump is bounded, that offsets come from wire bytes reassembled from the pcap and Snort's inspected buffer, and that the tool reports facts rather than doing analysis. It does not explicitly state read-only behavior, permissions, or error cases, keeping it from a 5.

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?

The description is front-loaded with the main purpose and uses a compact example. It is appropriately sized, though the dense technical list is slightly harder to scan than a shorter, more structured explanation would be.

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

Completeness4/5

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

There is no output schema, but the description enumerates the returned information in enough detail for an agent to understand what facts it will receive: rule text, parsed options, tuple, bounded dump, and offset findings. It is not fully complete regarding response shape or error behavior, but it is substantially adequate for this two-parameter inspection tool.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It does so only partially through the example explain_alert(run_id="r-0002", alert_idx=0), which implies alert_idx is zero-based, but it does not define run_id's source, alert_idx bounds, or the relationship between the two parameters.

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

Purpose4/5

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

The description states a specific resource, 'one alert,' and enumerates the facts returned: rule text, parsed options, 5-tuple/direction/service, hex+ASCII dump, and content/pcre offsets. It does not explicitly differentiate itself from siblings such as get_alerts or pcap_summary, so it stops short of a 5.

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

Usage Guidelines3/5

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

The phrase 'Report facts; you do the explaining' implies this tool is for fact gathering rather than analysis, which is useful context. However, it gives no explicit when-to-use guidance, prerequisites, or alternatives such as get_alerts or pcap_summary.

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