Skip to main content
Glama

list_sessions

Browse and filter recent terminal shell sessions with command counts, time ranges, and tags; paginate or expand rows for directories, duration, executor, and session details.

Instructions

Recent shell sessions with command counts, time ranges and tags. These are terminal sessions, not agent sessions: for work an AI agent did, use find_agent_session (grouped from recorded commands) or list_agent_sessions (captured from the agent's own transcript).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNoFilter by tag name
limitNoMax rows in this page (default: 10)
detailNoAdd directory, duration, executor and session to each row (default: false)
offsetNoRows to skip; pass the response's next_offset to page forward

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the shape of the returned data (counts, time ranges, tags), but says nothing about permissions, read-only nature, rate limits, or result caps beyond what the name implies. Adequate but with clear gaps for a no-annotation tool.

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 sentences, zero waste, with the scoping clarification front-loaded before the sibling alternatives. Every clause earns its place.

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

Completeness4/5

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

With no output schema, the description does describe the return contents and the sibling routing, which is most of what an agent needs. It could go slightly further on pagination behavior or result ordering, but the schema covers offset/limit mechanics.

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 coverage is 100%, so all four parameters (tag, limit, detail, offset) are already documented in the schema. The description adds no syntax or format detail beyond echoing 'tags' and result contents. Baseline 3 is appropriate when the schema does the heavy lifting.

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+resource ('shell sessions') and immediately names what the result rows contain (command counts, time ranges, tags). It also preemptively distinguishes itself from agent-session siblings, so an agent can tell it apart without opening a 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 says these are terminal sessions, not agent sessions, and routes the agent to find_agent_session or list_agent_sessions for agent work. This is exactly the when-to-use/when-not/alternative guidance the dimension rewards.

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