Skip to main content
Glama

Recent sessions

recent_sessions
Read-onlyIdempotent

List recent coding-agent sessions in a repository, newest first, with title, status, branch, model, current activity, cost, tokens, and loop alerts to review prior work and decisions.

Instructions

Recent coding-agent sessions (Claude Code, Codex, OpenCode, Gemini and others) in a repository, newest first: title, status, branch, model, what it is doing, cost and tokens, and a loop alert when one is active.

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": "recent_sessions"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoNoA directory inside the repository; defaults to the directory this server was started in (normally the project the agent is working in).
limitNoHow many to return (default 10, at most 50).
all_reposNoEvery repository instead of one.

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, idempotentHint, non-destructive, and closed-world, so the safety profile is covered. The description adds meaningful behaviour beyond that: result ordering (newest first) and the presence of a conditional loop alert field. It says nothing about pagination behaviour, empty results, or how staleness/'recent' is bounded.

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?

A single front-loaded sentence that leads with the resource and scope before enumerating outputs. The trailing field list is dense but each item tells the agent what to expect back, so little is wasted; only the parenthetical provider name list could be trimmed.

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 correctly compensates by enumerating return fields (title, status, branch, model, current activity, cost/tokens, loop alert). Safety and idempotency are covered by annotations and all three parameters are schema-documented, leaving only a minor ambiguity around ordering with all_repos and the meaning window of 'recent'.

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%, so repo, limit, and all_repos are fully documented in structured data, which sets the baseline at 3. The description adds no further parameter meaning — it never mentions all_repos or the limit cap — so the schema carries the full parameter burden.

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?

The description names the resource precisely (coding-agent sessions across Claude Code, Codex, OpenCode, Gemini), scopes it to a repository, and states the ordering (newest first) plus the fields returned. It does not, however, draw any contrast with siblings such as session_summary, next_session_handoff, or cost, so an agent must infer the boundary itself.

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 only implied: the phrase 'what it is doing' and the 'loop alert when one is active' suggest monitoring live activity. There is no explicit when-to-use, when-not-to-use, or pointer to an alternative for cost breakdowns (cost) or loop alerts (loop_alerts), which is the main gap for a tool with this many near-neighbours.

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