Skip to main content
Glama

Search Suricata alerts

malcolm_alerts
Read-only

Search Suricata IDS alerts using structured parameters that map to correct Malcolm fields, eliminating field-name lookup. Always filters event.dataset=alert.

Instructions

Search Suricata alerts with structured parameters, no field knowledge needed.

    Use this instead of malcolm_search when hunting Suricata alerts: it maps
    each argument to the correct Malcolm field for you (you don't need to
    know whether it's suricata.alert.signature or rule.name). It always
    filters event.dataset=alert. These are Suricata IDS alerts, signature
    matches on the wire; three other things on this server are also called
    alerts and are different mechanisms — malcolm_alerting_monitors and
    malcolm_alerting_alerts are the OpenSearch alerting plugin's standing
    rules and their firings, malcolm_anomaly_detectors is its machine-learning
    baseline, and malcolm_create_alert (alerting write class) records a
    finding of your own.

    Behavior: `signature` and `category` are substring searches, which Malcolm
    cannot express in a filter (its filters are exact terms), so this tool
    resolves the substring against the field's 500 most common values first
    and filters on the matches. A substring that matches no recorded value
    returns a message saying so rather than an empty result set — that is the
    difference between "no such signature here" and "no alerts fired". When
    more than 500 values exist in the window, the message says how many alert
    documents carry the values that were not scanned instead of asserting
    absence; narrow the window, or filter rule.name on the exact name with
    malcolm_search. When the substring did match but rarer values went
    unscanned, a "Note:" line precedes the JSON saying how many alert
    documents those values carry. Another "Note:" line says when the alerts
    filled limit, since Malcolm reports no total.

    Returns {"showing": N, "alerts": [...]}, one row per alert with its
    document id, time, rule name, id and category, Suricata severity and
    action, both endpoints, transport, protocol and community_id (the key
    that finds the same flow in Zeek's conn records through malcolm_search).
    Set full=true for the raw documents, which carry every field.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sidNoComma-separated Suricata signature IDs, matched on ECS rule.id (Malcolm renames suricata.alert.signature_id to it).
fullNoReturn the raw alert documents (about 2 KB each) instead of one compact row per alert.
limitNoMax alerts to return.
actionNoRule action: "allowed" or "blocked" (Suricata drop/reject).
dest_ipNoFilter by destination IP.
time_toNoEnd time, dateparser format. Empty = now.
categoryNoAlert category substring, matched on ECS rule.category (Malcolm normalizes suricata.alert.category to it).
severityNoComma-separated severity levels, e.g. "1,2" (1=high, 2=medium, 3=low).
signatureNoAlert signature substring, e.g. "ET MALWARE", "CVE-2024". Matched on ECS rule.name (Malcolm renames suricata.alert.signature to it).
source_ipNoFilter by source IP.
time_fromNoStart time, dateparser format. Empty searches ALL history, and the signature/category substring pre-scan covers the same window.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.2.0
    • addedInput schema / properties / full
      Added value: +{
      +  "default": false,
      +  "description": "Return the raw alert documents (about 2 KB each) instead of one compact row per alert.",
      +  "title": "Full",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / time_from / description
      Previous value: -"Start time, dateparser format. Empty searches ALL history, but the signature/category substring pre-scan then sees only the last 24 hours — pass a range when hunting an older signature."New value: +"Start time, dateparser format. Empty searches ALL history, and the signature/category substring pre-scan covers the same window."
  2. Changed2 schema fields changedv1.0.2
    • changedInput schema / properties / signature / description
      Previous value: -"Alert signature substring, e.g. \"ET MALWARE\", \"CVE-2024\"."New value: +"Alert signature substring, e.g. \"ET MALWARE\", \"CVE-2024\". Matched on ECS rule.name (Malcolm renames suricata.alert.signature to it)."
    • changedInput schema / properties / time_from / description
      Previous value: -"Start time, dateparser format. Empty = recent window."New value: +"Start time, dateparser format. Empty searches ALL history, but the signature/category substring pre-scan then sees only the last 24 hours — pass a range when hunting an older signature."
  3. Changed12 schema fields changedv0.3.0
    • addedInput schema / properties / action / description
      Added value: +"Rule action: \"allowed\" or \"blocked\" (Suricata drop/reject)."
    • addedInput schema / properties / category / description
      Added value: +"Alert category substring, matched on ECS rule.category (Malcolm normalizes suricata.alert.category to it)."
    • addedInput schema / properties / dest_ip / description
      Added value: +"Filter by destination IP."
    • addedInput schema / properties / limit / description
      Added value: +"Max alerts to return."
    • addedInput schema / properties / limit / maximum
      Added value: +500
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • addedInput schema / properties / severity / description
      Added value: +"Comma-separated severity levels, e.g. \"1,2\" (1=high, 2=medium, 3=low)."
    • addedInput schema / properties / sid / description
      Added value: +"Comma-separated Suricata signature IDs, matched on ECS rule.id (Malcolm renames suricata.alert.signature_id to it)."
    • addedInput schema / properties / signature / description
      Added value: +"Alert signature substring, e.g. \"ET MALWARE\", \"CVE-2024\"."
    • addedInput schema / properties / source_ip / description
      Added value: +"Filter by source IP."
    • addedInput schema / properties / time_from / description
      Added value: +"Start time, dateparser format. Empty = recent window."
    • addedInput schema / properties / time_to / description
      Added value: +"End time, dateparser format. Empty = now."
  4. Changed3 schema fields changedv0.2.0
    • addedInput schema / properties / action
      Added value: +{
      +  "default": "",
      +  "title": "Action",
      +  "type": "string"
      +}
    • addedInput schema / properties / category
      Added value: +{
      +  "default": "",
      +  "title": "Category",
      +  "type": "string"
      +}
    • addedInput schema / properties / sid
      Added value: +{
      +  "default": "",
      +  "title": "Sid",
      +  "type": "string"
      +}
  5. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already establish the safe read profile, but the description adds substantial behavior: the substring pre-scan over the field's 500 most common values, the distinct 'no such signature' vs 'no alerts fired' messages, the 'Note:' lines for unscanned values and limit saturation, and the fact that Malcolm reports no total. This is far beyond annotation coverage.

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 core purpose and the alternative-tool routing before the detailed substring caveats, and every paragraph earns its place. It is long, but the length is driven by genuinely necessary behavioral caveats rather than filler.

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 11 parameters, an output schema, and read-only annotations, the description supplies everything an agent needs: selection guidance, the substring-search caveat, limit/absence semantics, and the shape of the compact vs full return. Nothing material 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 each parameter is already documented, but the description adds meaning the schema lacks: which fields are substring-searched and why (exact-term filters), how unmatched substrings are resolved, and that full=true returns raw ~2KB documents. It does not add per-parameter syntax for sid/severity/time ranges, which the schema already handles.

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 ('Search Suricata alerts') and explicitly distinguishes itself from malcolm_search and the three other alert-named mechanisms on the server. An agent can route correctly without opening any 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?

Gives an explicit when-to-use ('use this instead of malcolm_search when hunting Suricata alerts') and enumerates the confusingly named siblings (malcolm_alerting_monitors, malcolm_alerting_alerts, malcolm_anomaly_detectors, malcolm_create_alert) with what each actually is. No inference required.

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