Skip to main content
Glama

List Raw Sessions

list_raw_sessions
Read-onlyIdempotent

List sessions with raw archived messages in a time window, grouped by identity fields, with optional user message samples and exclusion of unresolved provenance.

Instructions

List sessions with raw archive messages inside a time window, grouped by (source_root, host, project, session_id) with a stable session_ref, content_hash, first/last message epoch, message count, and optional role=user message samples. Unresolved or conflicted provenance is skipped and reported in excluded_legacy_identities; latest fills at most that many newest healthy sessions and does not spend slots on skipped rows. Use for recap-style summaries of what happened in a period. Output fields match remem raw sessions --json.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sinceNoOnly sessions with messages at or after this time (Unix epoch, ISO8601 datetime, or YYYY-MM-DD)
untilNoOnly sessions with messages at or before this time (Unix epoch, ISO8601 datetime, or YYYY-MM-DD; a date includes that full UTC day)
latestNoReturn only the newest N sessions
sampleNoSample up to N role=user message texts per session, ascending by time (default 0 = no samples)
projectNoProject name filter

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
latestNo
sampleYes
projectNo
sessionsYes
since_epochNo
until_epochNo
excluded_legacy_rowsYes
excluded_legacy_sessionsYes
excluded_legacy_identitiesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.6.93
    • addedOutput schema / $defs / RawSessionOutput / properties / display_label
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / $defs / RawSessionOutput / properties / mmdd
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / $defs / RawSessionOutput / properties / session_intent
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / $defs / RawSessionOutput / properties / session_intent_source
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / $defs / RawSessionOutput / properties / session_topic
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedOutput schema / $defs / RawSessionOutput / required
      Previous value: -[
      -  "session_ref",
      -  "host",
      -  "session_mode",
      -  "source_root",
      -  "project",
      -  "session_id",
      -  "first_epoch",
      -  "last_epoch",
      -  "message_count",
      -  "user_message_count",
      -  "assistant_message_count",
      -  "content_hash",
      -  "user_message_samples"
      -]New value: +[
      +  "session_ref",
      +  "host",
      +  "session_mode",
      +  "source_root",
      +  "project",
      +  "session_id",
      +  "first_epoch",
      +  "last_epoch",
      +  "message_count",
      +  "user_message_count",
      +  "assistant_message_count",
      +  "content_hash",
      +  "user_message_samples",
      +  "mmdd",
      +  "session_intent",
      +  "session_topic",
      +  "display_label",
      +  "session_intent_source"
      +]
  2. Changed3 schema fields changedv0.6.90
    • addedOutput schema / $defs / ExcludedSessionIdentityOutput
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "host": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "project": {
      +      "type": "string"
      +    },
      +    "session_id": {
      +      "type": "string"
      +    },
      +    "source_root": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "source_root",
      +    "project",
      +    "session_id"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / excluded_legacy_identities
      Added value: +{
      +  "items": {
      +    "$ref": "#/$defs/ExcludedSessionIdentityOutput"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "sample",
      -  "count",
      -  "excluded_legacy_rows",
      -  "excluded_legacy_sessions",
      -  "sessions"
      -]New value: +[
      +  "sample",
      +  "count",
      +  "excluded_legacy_rows",
      +  "excluded_legacy_sessions",
      +  "excluded_legacy_identities",
      +  "sessions"
      +]
  3. Changed10 schema fields changedv0.6.84
    • addedInput schema / properties / latest
      Added value: +{
      +  "description": "Return only the newest N sessions",
      +  "format": "int64",
      +  "nullable": true,
      +  "type": "integer"
      +}
    • addedOutput schema / $defs / RawSessionOutput / properties / content_hash
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / $defs / RawSessionOutput / properties / host
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / $defs / RawSessionOutput / properties / session_mode
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / $defs / RawSessionOutput / properties / session_ref
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / $defs / RawSessionOutput / required
      Previous value: -[
      -  "source_root",
      -  "project",
      -  "session_id",
      -  "first_epoch",
      -  "last_epoch",
      -  "message_count",
      -  "user_message_count",
      -  "assistant_message_count",
      -  "user_message_samples"
      -]New value: +[
      +  "session_ref",
      +  "host",
      +  "session_mode",
      +  "source_root",
      +  "project",
      +  "session_id",
      +  "first_epoch",
      +  "last_epoch",
      +  "message_count",
      +  "user_message_count",
      +  "assistant_message_count",
      +  "content_hash",
      +  "user_message_samples"
      +]
    • addedOutput schema / properties / excluded_legacy_rows
      Added value: +{
      +  "format": "uint",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / excluded_legacy_sessions
      Added value: +{
      +  "format": "uint",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / latest
      Added value: +{
      +  "format": "int64",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "sample",
      -  "count",
      -  "sessions"
      -]New value: +[
      +  "sample",
      +  "count",
      +  "excluded_legacy_rows",
      +  "excluded_legacy_sessions",
      +  "sessions"
      +]
  4. Changed1 schema field changedv0.6.45
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "RawSessionOutput": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "assistant_message_count": {
      +          "format": "int64",
      +          "type": "integer"
      +        },
      +        "first_epoch": {
      +          "format": "int64",
      +          "type": "integer"
      +        },
      +        "last_epoch": {
      +          "format": "int64",
      +          "type": "integer"
      +        },
      +        "message_count": {
      +          "format": "int64",
      +          "type": "integer"
      +        },
      +        "project": {
      +          "type": "string"
      +        },
      +        "session_id": {
      +          "type": "string"
      +        },
      +        "source_root": {
      +          "type": "string"
      +        },
      +        "user_message_count": {
      +          "format": "int64",
      +          "type": "integer"
      +        },
      +        "user_message_samples": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "source_root",
      +        "project",
      +        "session_id",
      +        "first_epoch",
      +        "last_epoch",
      +        "message_count",
      +        "user_message_count",
      +        "assistant_message_count",
      +        "user_message_samples"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "count": {
      +      "format": "uint",
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "project": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "sample": {
      +      "format": "int64",
      +      "type": "integer"
      +    },
      +    "sessions": {
      +      "items": {
      +        "$ref": "#/$defs/RawSessionOutput"
      +      },
      +      "type": "array"
      +    },
      +    "since_epoch": {
      +      "format": "int64",
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "until_epoch": {
      +      "format": "int64",
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "sample",
      +    "count",
      +    "sessions"
      +  ],
      +  "title": "RawSessionsOutput",
      +  "type": "object"
      +}
  5. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, covering safety. The description adds meaningful behavior: it explains how unresolved/conflicted provenance is skipped and reported in excluded_legacy_identities, and how 'latest' does not waste slots on skipped rows. This goes beyond the annotations.

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?

The description is dense but every sentence adds value: it states the action, grouping, output fields, exclusion handling, and a use case. It is well-structured and front-loaded with the core behavior, with no 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 the output schema exists, return values are covered elsewhere. The description covers the grouping, exclusion behavior, use case, and even notes that output fields match a CLI command. An agent has everything needed to decide when and how to call this tool correctly.

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 description coverage is 100%, so all parameters have individual descriptions. The description adds extra nuance for the 'latest' parameter (fills at most that many healthy sessions, doesn't spend slots on skipped rows) and clarifies the grouping and output structure, which helps parameter understanding beyond the schema.

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?

The description clearly states the verb (list), the resource (sessions with raw archive messages), and the scope (time window, grouped by specific fields). It also mentions the output fields and a use case ('recap-style summaries'), which distinguishes it from siblings like search_raw or timeline.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives a clear context for use ('Use for recap-style summaries of what happened in a period') but does not explicitly name alternative tools or state when not to use this tool. It implies usage rather than excluding other options.

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