Skip to main content
Glama
Claude Code × OpenCode

Claude Code × OpenCode

by AXLdev123

List sessions

oc_sessions

Lists OpenCode sessions newest first; filter by directory, text, parent, or archived status to find the session you need.

Instructions

List OpenCode sessions (most recent first), filtered by directory, text or parent.

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

Input Schema

NameRequiredDescriptionDefault
limitNo
searchNo
archivedNo
directoryNo
parent_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It helpfully discloses sort order (most recent first), but says nothing about pagination behavior, the default treatment of archived sessions, or permissions — real gaps for a listing tool with a limit parameter.

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 with no filler; the ordering detail is placed where an agent will read it first. Slight cost: it is so terse that the omitted parameters get no room at all.

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

Completeness2/5

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

With 5 undocumented parameters, no annotations, and no output schema, an agent cannot tell what the default limit is, whether archived sessions are included by default, or what a returned session looks like. For a filterable list tool this leaves meaningful holes.

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% across 5 parameters, so the definition must compensate. It covers three of them loosely (directory, 'text' for search, 'parent' for parent_id) but never mentions limit or archived, and gives no format hints for any of them.

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 OpenCode sessions') plus ordering ('most recent first'), and enumerates the filter axes. It does not explicitly distinguish itself from the singular sibling oc_session, but the plural 'list' framing makes the collection-vs-single distinction reasonably inferable.

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 implied by the filters mentioned ('filtered by directory, text or parent'), which hints at discovery/browsing scenarios. There is no explicit when-to-use, when-not-to-use, or alternative named for retrieving a single session.

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