Skip to main content
Glama

List OpenCode sessions

opencode_session_list
Read-only

List sessions newest first, then filter by directory, search text, archive state, or parent session to locate relevant OpenCode history.

Instructions

List sessions, newest first. Filter by directory, search text, archive state, or parent session.

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

Input Schema

NameRequiredDescriptionDefault
limitNo
cursorNo
searchNo
archivedNo
directoryNo
parentSessionIDNo

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?

readOnlyHint=true already tells the agent this is a safe read, so the description's main contribution is the default sort order (newest first) and the available filter axes. It says nothing about pagination behavior, the 200-item ceiling, or how cursor paging interacts with filters, which are the non-obvious behaviors for a list 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, no filler, with the core action and default ordering front-loaded before the filter list. Every clause maps to a capability the tool actually exposes.

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?

With six parameters at 0% schema coverage and no output schema, an agent still lacks guidance on pagination (limit/cursor) and on what a session record contains. The filter semantics are covered adequately, but for a paginated list endpoint the definition is only minimally sufficient.

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 0%, so the description carries the burden, and it gives semantic context for four of six parameters (directory, search, archived, parentSessionID) — notably clarifying that the boolean concerns archive state and that parentSessionID selects sub-sessions. It leaves limit and cursor wholly unexplained, including the maximum of 200 and how to continue a page.

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 a specific verb and resource ("List sessions") and adds ordering ("newest first"), which cleanly distinguishes it from opencode_session_get and opencode_session_history. It stops short of explicitly naming those siblings as alternatives, but the enumeration scope is unmistakable.

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?

Enumerating the four filter axes implies when a caller would reach for this tool, but there is no explicit when-to-use/when-not guidance and no mention of siblings such as opencode_session_get for single-session retrieval. Usage context is implied rather than stated.

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