Skip to main content
Glama

Search extracted files and scan verdicts

malcolm_file_scans
Read-only

List files seen on the wire with hashes and scan verdicts, filter by hash, MIME type, or executables, and pivot from hashes to related transfer records.

Instructions

List the files Zeek saw cross the wire, with their hashes and scan verdicts.

    Use this for any file-centric question — it filters event.dataset=files
    for you and returns one compact row per file instead of the multi-KB raw
    document. Use malcolm_search instead for any other record type (conn,
    dns, http); search_dsl for a substring or wildcard filename match, which
    Malcolm's exact-match filters cannot express; arkime_file_by_hash to
    pull bytes by a hash Arkime recorded on a session rather than by Zeek's
    file record.

    Both record types Malcolm files under this dataset are returned, so one
    file can come back as two rows: Zeek's record of the transfer, and
    Strelka's scan verdict, which is the only row `scan_hits` appears on —
    0 there means Strelka scanned the file and matched nothing. A row's
    `extracted` value is the argument malcolm_extract_file takes; a row
    carrying `note` instead was seen on the wire but is not on disk.
    `source_ip` and `destination_ip` are the connection's originator and
    responder, so a download reads client to server. The file went from
    `sender_ip` to `receiver_ip`, which appear when Zeek recorded the
    direction.

    No match returns a sentence saying so, naming the field if a filter used
    one Malcolm does not index, rather than an empty list. Field names are
    in the output schema.
    

Input Schema

NameRequiredDescriptionDefault
limitNoMax file records to return.
filtersNoExtra JSON filters in Malcolm filter syntax (see malcolm_search), merged on top of this tool's own. E.g. {"source.ip":"192.0.2.7"}; {"network.protocol":"smb"}. Values are matched EXACTLY — no wildcards.{}
time_toNoEnd time, dateparser format. Empty = now.
file_hashNoPivot from a hash IOC to the file records carrying it. Matched on related.hash, which holds md5, sha1, sha256, ssdeep and tlsh together, so any of those works, in either case (a tlsh is stored uppercase by Zeek and lowercase by Strelka; both are searched). One file usually has many records — one per session that carried it, plus a scan record — and they can exceed limit; add {"event.dataset":"strelka"} to filters to see the scan verdict on its own. Empty = no hash filter.
mime_typeNoExact file.mime_type value, or several comma-separated (OR). E.g. "application/x-dosexec"; "image/png,image/jpeg". Note Malcolm records PE executables as application/x-dosexec, not application/x-msdownload. Overrides executables_only when both are given. Empty = any type.
time_fromNoStart time, dateparser format ("2024-01-01", "7 days ago"). Empty = ALL history.
executables_onlyNoShortcut for the eight MIME labels that mean a native executable — PE, ELF (including the x-sharedlib every PIE binary gets), and Mach-O — in both the Zeek and the Strelka vocabulary. Use when hunting dropped binaries. A deployment can still use a label outside that set; if this returns nothing, check malcolm_field_values(field="file.mime_type").

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.2.0
    • addedOutput schema / $defs / FileRow / properties / receiver_ip
      Added value: +{
      +  "title": "Receiver Ip",
      +  "type": "string"
      +}
    • addedOutput schema / $defs / FileRow / properties / sender_ip
      Added value: +{
      +  "title": "Sender Ip",
      +  "type": "string"
      +}
    • addedOutput schema / $defs / FileScanResult / properties / limit_reached
      Added value: +{
      +  "title": "Limit Reached",
      +  "type": "boolean"
      +}
  2. Addedv1.0.2

TDQS

A4.6/5.0
Behavior5/5

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

Despite annotations already declaring a safe read-only profile, the description adds substantial non-obvious behavior: two record types land in one dataset so a single file can yield two rows, scan_hits only appears on the Strelka row (0 means scanned and clean), extracted vs note distinguishes on-disk from wire-only files, and no-match returns an explanatory sentence naming an unindexed field rather than an empty list.

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?

Long but front-loaded: purpose first, then routing, then the row-duplication and field semantics, then error behavior. Nearly every sentence carries a distinct fact, though the multi-paragraph body runs denser than an agent strictly needs.

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?

Output schema exists so return fields need not be restated, yet the description still explains the one thing the schema cannot convey: why one file may appear as two rows and which row carries scan_hits. Combined with the alternatives and no-match behavior, an agent has everything required to call it correctly.

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 100%, so the baseline is 3. The description reinforces things the schema already states (filters values matched exactly, mime_type vs executables_only precedence) and its richest field-level detail is about output columns, not the seven inputs, so it adds little beyond the structured field descriptions.

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?

Opens with a concrete verb and resource ('List the files Zeek saw cross the wire, with their hashes and scan verdicts') and immediately differentiates itself from friends by naming the dataset it filters (event.dataset=files) and the shape of what it returns. An agent can place it against malcolm_search, search_dsl and arkime_file_by_hash 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?

Explicitly routes three sibling tools: malcolm_search for other record types, search_dsl for substring/wildcard filenames that exact-match filters cannot express, and arkime_file_by_hash for bytes Arkime recorded on a session. Each alternative is paired with the condition that selects it.

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