Skip to main content
Glama

Search network traffic (Malcolm filters)

malcolm_search
Read-only

Search Malcolm's indexed network traffic by exact field filters and human-readable time ranges to retrieve matching documents.

Instructions

Search Malcolm's indexed network traffic using Malcolm's simple filter dict.

    Use this for field-based filtering with human-readable time ranges. To
    search with Arkime expression syntax instead, or when you need a session
    id to feed arkime_session_pcap / arkime_add_tags afterward, use
    arkime_sessions (only its rows carry that id). For raw OpenSearch DSL,
    use search_dsl. Confirm field names with malcolm_field_search first —
    Malcolm uses non-standard names. Returns the raw Malcolm /mapi/document
    response (matching documents); when nothing matched and a filter names a
    field Malcolm does not index, the correct field name is reported above
    the response.

    Two defaults to know before the first call: with no time_from this
    searches ALL retained history, where malcolm_aggregate covers only the
    last 24 hours; and filter values are matched exactly, so any wildcard or
    substring has to go to search_dsl instead.

    Every document comes back whole, 2 to 3.5 KB of JSON each on Malcolm's
    training data, so 20 conn documents run to about 46,000 characters.
    For counts or top values use malcolm_aggregate, and keep limit small
    when reading documents. When the results fill limit, a "Note:" line
    above the JSON says more may match; Malcolm reports no total.
    

Input Schema

NameRequiredDescriptionDefault
limitNoMax documents to return.
doctypeNoTarget index. Empty = the Malcolm network index (Zeek/Suricata); "host"/"beat"* = host/beats logs; "arkime"/"session"* = the Arkime sessions index.
filtersNoJSON object in Malcolm filter syntax (NOT OpenSearch DSL). Values are matched EXACTLY — Malcolm compiles this to a terms query, so wildcards are NOT supported and "*example*" matches only the literal string. Use search_dsl for substring/wildcard matching. Examples: {"event.dataset":"conn"}; {"source.ip":"192.0.2.77"}; {"zeek.dns.query":"wpad.localdomain"}; {"!network.transport":"icmp"} excludes; {"network.direction":["inbound","outbound"]} is OR; {"!related.password":null} means the field must exist. Empty = match all.{}
time_toNoEnd time, dateparser format. Empty = now.
time_fromNoStart time, dateparser format ("2024-01-01", "7 days ago"). Empty = ALL history (this tool's default, unlike malcolm_aggregate which defaults to the last 24 hours).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.1
    • changedInput schema / properties / filters / description
      Previous value: -"JSON object in Malcolm filter syntax (NOT OpenSearch DSL). Values are matched EXACTLY — Malcolm compiles this to a terms query, so wildcards are NOT supported and \"*example*\" matches only the literal string. Use search_dsl for substring/wildcard matching. Examples: {\"event.dataset\":\"conn\"}; {\"source.ip\":\"192.0.2.77\"}; {\"zeek.dns.query\":\"ntp.ubuntu.com\"}; {\"!network.transport\":\"icmp\"} excludes; {\"network.direction\":[\"inbound\",\"outbound\"]} is OR; {\"!related.password\":null} means the field must exist. Empty = match all."New value: +"JSON object in Malcolm filter syntax (NOT OpenSearch DSL). Values are matched EXACTLY — Malcolm compiles this to a terms query, so wildcards are NOT supported and \"*example*\" matches only the literal string. Use search_dsl for substring/wildcard matching. Examples: {\"event.dataset\":\"conn\"}; {\"source.ip\":\"192.0.2.77\"}; {\"zeek.dns.query\":\"wpad.localdomain\"}; {\"!network.transport\":\"icmp\"} excludes; {\"network.direction\":[\"inbound\",\"outbound\"]} is OR; {\"!related.password\":null} means the field must exist. Empty = match all."
  2. Changed2 schema fields changedv1.0.2
    • changedInput schema / properties / filters / description
      Previous value: -"JSON object in Malcolm filter syntax (NOT OpenSearch DSL). Examples: {\"event.dataset\":\"conn\"}; {\"source.ip\":\"192.0.2.77\"}; {\"event.dataset\":\"dns\",\"zeek.dns.query\":\"*example.com*\"}; {\"!network.transport\":\"icmp\"} excludes; {\"network.direction\":[\"inbound\",\"outbound\"]} is OR; {\"!related.password\":null} means the field must exist. Empty = match all."New value: +"JSON object in Malcolm filter syntax (NOT OpenSearch DSL). Values are matched EXACTLY — Malcolm compiles this to a terms query, so wildcards are NOT supported and \"*example*\" matches only the literal string. Use search_dsl for substring/wildcard matching. Examples: {\"event.dataset\":\"conn\"}; {\"source.ip\":\"192.0.2.77\"}; {\"zeek.dns.query\":\"ntp.ubuntu.com\"}; {\"!network.transport\":\"icmp\"} excludes; {\"network.direction\":[\"inbound\",\"outbound\"]} is OR; {\"!related.password\":null} means the field must exist. Empty = match all."
    • changedInput schema / properties / time_from / description
      Previous value: -"Start time, dateparser format (\"2024-01-01\", \"7 days ago\"). Empty = Malcolm's default recent window."New value: +"Start time, dateparser format (\"2024-01-01\", \"7 days ago\"). Empty = ALL history (this tool's default, unlike malcolm_aggregate which defaults to the last 24 hours)."
  3. Addedv0.3.0
  4. Removedv0.2.0
  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 only cover the safety profile (readOnly, openWorld, non-destructive); the description adds substantial behavior beyond that: two important defaults (no time_from = ALL retained history vs. malcolm_aggregate's 24h; filter values match exactly so wildcards/substrings must go to search_dsl), whole-document payload sizing (~2-3.5 KB each, 20 conn docs ≈ 46,000 chars), a pagination signal ('Note:' line when limit is filled) and the fact that Malcolm reports no total, plus the field-name hint reported when an unmatched field is queried.

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-loaded and logically ordered: purpose, alternatives/prerequisite, defaults to know before the first call, then sizing and pagination warnings. It is long for a description, but nearly every clause carries distinct, decision-relevant information (routing, defaults, cost of reading documents). A touch of density could be trimmed, e.g. the parenthetical about which sibling carries the session id, but nothing is 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?

An output schema exists so return values need not be explained, and the description nevertheless adds the operationally critical bits an agent needs: the raw /mapi/document response shape, the absence of a total count, the truncation 'Note:' line, and field-name feedback on unmatched queries. Combined with the routing rules and defaults, nothing needed to invoke this correctly 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, and the schema already documents filter syntax, exact matching, and the time_from default. The description goes further by tying parameter behavior to routing decisions (wildcards/substrings belong in search_dsl; malcolm_aggregate is the 24h-default alternative) and by warning that limit should be kept small given document size, which is actionable guidance the schema lacks.

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 Malcolm's indexed network traffic using Malcolm's simple filter dict') and immediately differentiates itself from the nearest siblings by naming arkime_sessions and search_dsl as the alternatives for different syntaxes. An agent can tell it apart from every neighboring search tool without opening a 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?

Explicit routing: field-based filtering with human-readable time ranges here, Arkime expression syntax to arkime_sessions (with the specific reason: only its rows carry a session id), raw OpenSearch DSL to search_dsl. It also states a prerequisite ('Confirm field names with malcolm_field_search first') and names malcolm_aggregate as the tool for counts/top values, so both when-to-use and when-not-to-use are covered.

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