Skip to main content
Glama

Search Arkime sessions

arkime_sessions
Read-only

Search Arkime sessions by expression to return matching rows and the session IDs required by drill-down tools like detail and PCAP.

Instructions

Search Arkime sessions by expression; returns trimmed rows each carrying a session id.

    This is the ONLY search returning a session id, and every
    session-scoped tool needs one: arkime_session_detail,
    arkime_session_pcap, arkime_session_payload,
    arkime_session_file_by_hash and arkime_add_tags. For one session's own
    row use arkime_session_detail; for its PCAP bytes/metadata use
    arkime_session_pcap. To search with Malcolm filter dicts and dateparser
    times instead of Arkime expressions and epoch seconds, use
    malcolm_search. Returns `matched` (how many sessions the expression
    found, which is usually far more than are returned), `showing`, and the
    session rows. Each row's `id` is what the drill-down tools take.
    

Input Schema

NameRequiredDescriptionDefault
limitNoMax sessions to return. Each row is a JSON object carrying its own keys, which is why this stops at 100; when you want thousands of rows and no session id, arkime_sessions_csv takes up to 10,000.
time_toNoEnd time as EPOCH SECONDS (NOT a dateparser string). Empty = now.
time_fromNoStart time as EPOCH SECONDS (NOT a dateparser string like "7 days ago"). Empty = Arkime's recent-only default; pass a range for historical data.
expressionYesArkime expression syntax (NOT OpenSearch DSL, NOT a Malcolm filter dict). Examples: "ip==192.0.2.77"; "ip.src==192.0.2.77 && ip.dst==198.51.100.1"; "protocols==dns"; "port.dst==443"; "http.uri==/login*"; "country.dst==CN". Every clause must be field-operator-value — there is no free-text search. Field existence is the literal token EXISTS!, as in "zeek.ftp.password == EXISTS!". A list is an OR: "port == [80,443]". Field names are Arkime's own, NOT the ECS names malcolm_field_search returns — look them up with arkime_field_search. A name Arkime cannot resolve, or an expression it cannot parse, is reported as an error carrying Arkime's own message.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.0
    • changedInput schema / properties / expression / description
      Previous value: -"Arkime expression syntax (NOT OpenSearch DSL, NOT a Malcolm filter dict). Examples: \"ip==192.0.2.77\"; \"ip.src==192.0.2.77 && ip.dst==198.51.100.1\"; \"protocols==dns\"; \"port.dst==443\"; \"http.uri==/login*\"; \"country.dst==CN\". Every clause must be field-operator-value — there is no free-text search. Field existence is the literal token EXISTS!, as in \"zeek.ftp.password == EXISTS!\". A list is an OR: \"port == [80,443]\". Field names are Arkime's own, NOT the ECS names malcolm_field_search returns — look them up with arkime_field_search. A name Arkime cannot resolve is not an error: measured on Malcolm v26.07.1, \"nosuch.field==1\" over a window holding 6M sessions answered matched:0 with no marker, indistinguishable from a query that genuinely found nothing."New value: +"Arkime expression syntax (NOT OpenSearch DSL, NOT a Malcolm filter dict). Examples: \"ip==192.0.2.77\"; \"ip.src==192.0.2.77 && ip.dst==198.51.100.1\"; \"protocols==dns\"; \"port.dst==443\"; \"http.uri==/login*\"; \"country.dst==CN\". Every clause must be field-operator-value — there is no free-text search. Field existence is the literal token EXISTS!, as in \"zeek.ftp.password == EXISTS!\". A list is an OR: \"port == [80,443]\". Field names are Arkime's own, NOT the ECS names malcolm_field_search returns — look them up with arkime_field_search. A name Arkime cannot resolve, or an expression it cannot parse, is reported as an error carrying Arkime's own message."
  2. Changed2 schema fields changedv1.0.2
    • changedInput schema / properties / expression / description
      Previous value: -"Arkime expression syntax (NOT OpenSearch DSL, NOT a Malcolm filter dict). Examples: \"ip==192.0.2.77\"; \"ip.src==192.0.2.77 && ip.dst==198.51.100.1\"; \"protocols==dns\"; \"port.dst==443\"; \"http.uri==/login*\"; \"country.dst==CN\"."New value: +"Arkime expression syntax (NOT OpenSearch DSL, NOT a Malcolm filter dict). Examples: \"ip==192.0.2.77\"; \"ip.src==192.0.2.77 && ip.dst==198.51.100.1\"; \"protocols==dns\"; \"port.dst==443\"; \"http.uri==/login*\"; \"country.dst==CN\". Every clause must be field-operator-value — there is no free-text search. Field existence is the literal token EXISTS!, as in \"zeek.ftp.password == EXISTS!\". A list is an OR: \"port == [80,443]\". Field names are Arkime's own, NOT the ECS names malcolm_field_search returns — look them up with arkime_field_search. A name Arkime cannot resolve is not an error: measured on Malcolm v26.07.1, \"nosuch.field==1\" over a window holding 6M sessions answered matched:0 with no marker, indistinguishable from a query that genuinely found nothing."
    • changedInput schema / properties / limit / description
      Previous value: -"Max sessions to return."New value: +"Max sessions to return. Each row is a JSON object carrying its own keys, which is why this stops at 100; when you want thousands of rows and no session id, arkime_sessions_csv takes up to 10,000."
  3. Addedv0.3.0
  4. Removedv0.2.0
  5. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, destructiveHint=false, and openWorldHint, so safety is covered. The description adds real behavioral context beyond that: rows are trimmed, `matched` is usually far more than `showing`, and the id feeds session-scoped drill-down tools. It does not mention rate limits or auth, but the result-shape disclosure is substantive.

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 capability and the session-id uniqueness before routing to alternatives. Every sentence carries routing or return-value information, though the multi-clause sibling enumeration makes it slightly longer than necessary.

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, yet the description still disambiguates `matched` vs `showing` and the row id, and covers expression pitfalls and the CSV alternative. Nothing an agent needs to call this correctly is missing.

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% and already documents epoch-seconds vs dateparser, empty-default behavior, expression syntax, and the limit cap. The description adds little parameter detail beyond what the schema provides, so a baseline 3 is appropriate.

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 Arkime sessions by expression) and immediately identifies its unique role among the siblings: it is the ONLY search that returns a session id. An agent can distinguish it from arkime_session_detail, malcolm_search, and arkime_sessions_csv 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 names alternatives with the condition that selects them: arkime_session_detail for one session's own row, arkime_session_pcap for PCAP bytes, malcolm_search for Malcolm filter dicts/dateparser times, and arkime_sessions_csv (via the limit param) for thousands of rows without a session id. When and when-not are both covered.

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