Skip to main content
Glama

opencode_get_session

Read-onlyIdempotent

Get detailed information about a specific opencode session.

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

NameRequiredDescriptionDefault
session_idYesSession ID to retrieve

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.11
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. First observedv0.2.3

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and idempotentHint, so the safety profile is covered. The description adds a return-format sketch and an example call, which is useful since there is no output schema, but 'data': {'session': dict} is unspecified — a caller still doesn't know what fields 'metadata and state' actually contain.

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?

Front-loaded one-line purpose followed by structured Return Format and Examples sections; short and scannable. The 'dict' placeholder in the return format is the only sentence that earns little.

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?

For a simple single-param read tool this is nearly adequate, but with no output schema the return description must carry the load, and 'session': dict leaves the shape of metadata/state opaque. It also doesn't relate the tool to nearby siblings like opencode_get_messages or opencode_session_diff that an agent might want instead.

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% and the single session_id parameter is documented in the schema ('Session ID to retrieve'). The description's example shows the parameter name and a sample value format ('sess_01'), which is marginally additive but does not explain the ID source or format beyond the example.

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 ('Get') and resource ('detailed information about a specific opencode session') and clarifies it returns metadata and state. This clearly distinguishes it from list-style siblings like opencode_list_sessions, though it never names those siblings explicitly.

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 only implied: the required session_id and the word 'specific' suggest fetching one known session rather than enumerating. There is no explicit when-to-use statement, no exclusion, and no mention of opencode_list_sessions or opencode_get_messages as alternatives.

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