Skip to main content
Glama

session_get

Read-onlyIdempotent

Retrieve a specific OpenCode session by ID from a configured server to inspect its state; omit the server argument when only one server is available.

Instructions

Get a session by ID from one server. Omit the server argument when exactly one server is available.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session_id": "<session_id>"
    },
    "name": "session_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
serverNoServer id. Omit when exactly one server is available.
session_idYesSession id on that server.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the safety profile is fully covered without the description. The description adds one useful operational constraint (the single-server omission rule) but discloses nothing about error behavior when a session_id is unknown or does not belong to the named server.

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 short sentences with the primary action first and the conditional guidance second; nothing is wasted and nothing is buried.

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 two-parameter, read-only lookup with full schema coverage and annotations carrying the safety semantics, this is nearly complete. The only shortfall is not covering what happens when the session is absent or the server cannot be resolved.

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 description's note about omitting server merely restates the schema's own parameter description. With no extra meaning added beyond the schema (e.g., id format, cross-server ambiguity), the baseline of 3 is correct.

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 ("Get a session by ID") plus the scope qualifier "from one server," which is enough to separate it from list-type siblings like sessions_list. It does not, however, distinguish it from closer siblings such as session_status or session_diff, so it stops short of a 5.

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?

The second sentence gives a concrete condition for omitting the server argument, which is real usage guidance. It says nothing about when to prefer this tool over session_status, session_messages, or sessions_search, so the when-to-use vs alternatives question is left to inference.

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