Skip to main content
Glama

sessions_list

Read-onlyIdempotent

List and filter OpenCode sessions on a single server; use cross-server search for multi-server queries.

Instructions

List sessions on one server. Use this for a single server, including filtered listings; sessions_search is for searches across servers. Omit the server argument when exactly one server is available.

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

Input Schema

NameRequiredDescriptionDefault
limitNoMax sessions to return.
orderNoSort order by updated time.
cursorNoPagination cursor from previous page.
searchNoSubstring to match in title or id.
serverNoServer id. Omit when exactly one server is available.
projectNoFilter by project id.
subpathNoFilter by subpath.
archivedNoInclude archived sessions.
directoryNoFilter by working directory.
parent_idNoFilter by parent session id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and openWorldHint=false, so the operation's safety and idempotency profile is covered by structured data. The description adds the single-server scoping rule, but says nothing about pagination behavior, the 100-item cap, or result ordering beyond what the schema declares. Adequate but thin on behavior beyond annotations.

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?

Three short sentences, front-loaded with the core purpose and followed by routing guidance, with no filler. The repetition of the server-omission rule (also in the schema) slightly reduces density but does not obscure the message.

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?

A ten-parameter read tool with no output schema is well served by a description that pins down scope and the sibling alternative, while the schema documents every filter and pagination control. Only minor gaps remain — no note on default page size or what a returned session record contains, though the absence of an output schema makes the latter forgivable.

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 all ten parameters including limit, order, cursor, archived and the filter fields are already documented in the schema. The description only echoes the server-omission rule, which the schema also states for that parameter. Baseline 3 applies when the schema does the semantic 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 and resource pair ('List sessions') plus an explicit scope ('on one server'), and immediately distinguishes itself from the sibling sessions_search by naming it. An agent can select between the two listing tools without opening either 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?

Gives explicit when-to-use ('single server, including filtered listings'), an explicit alternative ('sessions_search is for searches across servers'), and a prerequisite rule ('omit the server argument when exactly one server is available'). Both routing decision and edge case are covered.

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