Skip to main content
Glama
AgentHistoryMCP
by luo0629

List Agent Sessions

list_sessions
Read-onlyIdempotent

Lists indexed AI coding agent sessions so you can filter by project path or agent IDs and sort by activity.

Instructions

List indexed sessions across AI Coding Agents, optionally filtered by project path and agent_ids, sorted by recent activity.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_sessions"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNoSort order (default 'updated_desc').updated_desc
limitNoMaximum sessions to return (default 30).
agentsNoOptional list of agent_ids to filter.
offsetNoPagination offset (default 0).
project_pathNoOptional project path to filter sessions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.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=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered without the description. The description adds only that sessions are 'indexed' and ordered by recent activity, which mildly reinforces the default sort but gives no pagination, result-size, or empty-result context beyond what the schema states.

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?

A single front-loaded sentence that leads with the verb and resource, then qualifies filtering and ordering. No filler, no repetition of schema details, and nothing that could be cut without losing information.

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 read-only list tool with full annotation coverage and a fully described schema, most of the burden is already met. However, there is no output schema, and the description never indicates what a session record contains or how results are shaped (e.g., summary fields per session), leaving the return surface undocumented.

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%, with all five parameters (sort, limit, agents, offset, project_path) documented including defaults and bounds, so the schema does the heavy lifting. The description restates the project_path and agent_ids filters and the recency sort without adding format examples, path syntax, or filter-combination semantics.

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 ('List indexed sessions') plus the domain ('across AI Coding Agents'), which is enough to tell it apart from the singular read_session sibling. It stops short of explicitly naming how it differs from search_history or list_projects, so it is clear but not sibling-differentiated.

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?

The phrase 'optionally filtered by project path and agent_ids' implies when the filters apply, but there is no explicit when-to-use guidance and no mention of the alternatives (read_session for a single session, search_history for content search). Usage must be inferred from the tool name and schema.

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