Skip to main content
Glama

session_messages

Read-onlyIdempotent

Retrieve messages for a specific session with filtering, sorting, and pagination; returns only the message list, not session details or status.

Instructions

Get messages for a session. Returns only the message list; does not fetch session details or status.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session_id": "<session_id>"
    },
    "name": "session_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNoFilter by message type.
limitNoMax messages to return.
orderNoSort order by updated time.
cursorNoPagination cursor from previous page.
serverNoServer id. Omit when exactly one server is available.
session_idYesSession id on that server.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint=false, so safety is covered. The description's added value is the scope boundary (message list only, no details/status), but it says nothing about pagination behavior even though a cursor parameter exists.

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?

Two short sentences, both front-loaded: the primary action first, then the scope exclusion. No filler and nothing repeated from the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only list tool with full schema coverage and annotations, the definition is usable as-is. However, with no output schema, a brief note on what a message entry contains or how paging terminates would meaningfully help an agent.

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 every parameter (type, limit, order, cursor, server, session_id) is documented in the schema itself. The description adds no filtering, ordering, or pagination semantics beyond that, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Get messages for a session") and bounds the scope by saying it does not return session details or status. That implicitly separates it from siblings like session_get and session_status, though no sibling is named explicitly.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: reach for this when you need the message list, not session metadata. There is no explicit when-to-use rule, no named alternative, and no guidance on when to prefer sessions_search or session_diff.

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