Skip to main content
Glama

Export sessions as CSV

arkime_sessions_csv
Read-only

Export many Arkime sessions as a compact CSV table, one row each, for reading large result sets as tables without JSON overhead. Filter by time, expression, and limit rows.

Instructions

Export many sessions as a compact CSV table, one row each.

    Use this when you want a lot of sessions cheaply: CSV costs far fewer
    tokens than the same rows as JSON, so it suits "show me every DNS
    session this host made" when you intend to read the result as a table.
    Use arkime_sessions instead when you need a session id to drill into
    (this returns none), and arkime_connections for a who-talked-to-whom
    summary.

    Returns raw CSV TEXT with a header row, not JSON. `limit` bounds the
    rows exactly. A request naming a column Arkime does not accept hangs
    rather than failing, so a timeout is reported as a probable `fields`
    problem.
    

Input Schema

NameRequiredDescriptionDefault
limitNoMax rows to export.
fieldsNoComma-separated columns, as ECS DOTTED names ("source.ip,destination.port") — the names malcolm_field_search returns, NOT Arkime db names (srcIp) or expression names (ip.src). A name Arkime does not accept is never reported as an error: it either comes back as an empty column or the request hangs until it times out. Leave empty for Arkime's default columns, which always work.
time_toNoEnd time as EPOCH SECONDS (NOT a dateparser string). Empty = now.
time_fromNoStart time as EPOCH SECONDS (NOT a dateparser string). Empty = Arkime's default recent window.
expressionNoArkime expression syntax to scope the rows, e.g. "ip == 192.0.2.7 && protocols == dns". Empty = all sessions.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.1
    • changedInput schema / properties / fields / description
      Previous value: -"Comma-separated columns, as ECS DOTTED names (\"source.ip,destination.port\") — the names malcolm_field_search returns, NOT Arkime db names (srcIp) or expression names (ip.src). A name Arkime does not accept is never reported as an error: measured on Arkime 6.6.0 it either comes back as an empty column or the request hangs until it times out. Leave empty for Arkime's default columns, which always work."New value: +"Comma-separated columns, as ECS DOTTED names (\"source.ip,destination.port\") — the names malcolm_field_search returns, NOT Arkime db names (srcIp) or expression names (ip.src). A name Arkime does not accept is never reported as an error: it either comes back as an empty column or the request hangs until it times out. Leave empty for Arkime's default columns, which always work."
  2. Addedv1.0.2

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/openWorld/non-destructive, and the description adds substantial context beyond them: the return is raw CSV TEXT, not JSON; `limit` bounds rows exactly; and crucially, an unaccepted column name causes a hang rather than an error, so a timeout should be read as a probable `fields` problem. This is exactly the operational knowledge an agent cannot get from the schema.

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?

Front-loaded with the purpose, then the when-to-use/alternatives, then the return format and the failure-mode caveat. Every sentence earns its place; no filler or restatement of the name.

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 an output schema present, return values need not be enumerated, yet the description still flags the raw-CSV-text format for clarity. Combined with the hang warning and the sibling routing, an agent has everything needed 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 schema already documents all five parameters including the invalid-column warning. The description adds only the mild nuance that `limit` bounds rows exactly. Baseline 3 is appropriate when the schema carries the bulk of parameter meaning.

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?

Names a specific verb (Export), resource (sessions), and output format (compact CSV table, one row each). It immediately differentiates itself from siblings by contrasting with arkime_sessions (no session id) and arkime_connections (summary rather than rows).

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 states when to use it (wanting many sessions cheaply, reading results as a table, e.g. "every DNS session this host made") and names the alternatives with the condition that selects them: arkime_sessions when a session id is needed, arkime_connections for who-talked-to-whom. Nothing is left to inference.

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