Skip to main content
Glama

opencode_session_get

Read-onlyIdempotent

Retrieve details of a specific OpenCode session by ID. Provide the session ID and optional project directory to get session information for debugging or tracking autonomous coding tasks.

Instructions

Get details of a specific session by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSession ID
directoryNoAbsolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
textYes
isErrorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

B3.2/5.0
Behavior2/5

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

The annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior, but the description adds no behavioral context beyond the schema and name. It does not mention response behavior, error cases, or how the optional directory affects the request.

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?

The description is a single, front-loaded sentence with no wasted words. It communicates the core operation efficiently.

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?

For a straightforward get-by-ID operation, the description combined with the annotations, input schema, and output schema is mostly complete. It lacks sibling differentiation guidance, but the core call context is adequately covered.

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 the parameters are already well documented. The description reinforces the 'by ID' semantics but does not add meaning beyond the schema for the optional directory parameter.

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 uses a clear verb ('Get') and identifies the resource ('details of a specific session by ID'), which distinguishes it from listing all sessions. It is clear enough, though it does not explicitly differentiate itself from sibling tools like opencode_session_status or opencode_session_children.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives such as opencode_session_list, opencode_session_status, or opencode_session_children. The description implies a read-by-ID use case but provides no explicit context or exclusions.

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

Deploy Server

Other Tools