Skip to main content
Glama

opencode_get_session

Read-onlyIdempotent

Retrieve detailed information about a specific opencode session, including its metadata and current state.

Instructions

Get detailed information about a specific opencode session.

Returns its metadata and state.

Return Format

{"success": bool, "message": str, "data": {"session": dict}}

Examples

opencode_get_session(session_id="sess_01")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesSession ID to retrieve

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

Annotations already declare readOnly and idempotent. Description adds the return format and example, but doesn't disclose any additional behavioral context such as error handling or performance. It adds moderate value 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is concise with a clear lead sentence, return format, and example. No redundant content.

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 simple getter with one parameter and an output format provided, the description is adequate. It could include error behavior, but it's not essential.

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 already describes session_id as 'Session ID to retrieve' with 100% coverage. Description adds an example value 'sess_01' but no additional semantics.

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?

The description clearly states 'Get detailed information about a specific opencode session' with a specific verb and resource, and clarifies it returns metadata and state, distinguishing it from list/session tools.

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?

No explicit guidance on when to use this vs alternatives like opencode_list_sessions, but the purpose and example imply it is for retrieving a single session by ID. Lacks exclusionary guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sandraschi/opencode-cli-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server