Skip to main content
Glama

Get delegated session state

get_session
Read-only

Retrieve the stored state and live OpenCode status of a delegated session to monitor its progress.

Instructions

Return the stored state of a delegated session plus its live OpenCode status when a server is running. Use get_diff to inspect file changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesSession id returned by delegate_task/create_session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

The readOnlyHint annotation already covers the safety profile, and the description adds useful behavioral nuance: the stored session state is always returned, while live OpenCode status is only included when a server is running. This conditional behavior is valuable context beyond the annotation.

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 no filler. The main purpose is front-loaded, and the sibling reference to get_diff earns its place by clarifying tool boundaries.

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 read-only tool with one well-documented parameter, the description provides sufficient invocation context. It could name the fields contained in 'stored state' or describe the no-server behavior more explicitly, but those are minor gaps given the schema and readOnlyHint.

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 100% and the session_id parameter is already well-described as the ID returned by delegate_task/create_session. The description itself adds no further parameter meaning, so the baseline of 3 is appropriate.

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 uses a specific verb ('Return') and names the exact resource: the stored state of a delegated session plus live OpenCode status. It also distinguishes itself from get_diff by telling the agent to use get_diff for file changes, which prevents confusion among siblings.

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

Usage Guidelines4/5

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

It gives clear context for what get_session returns and points to get_diff as the alternative when inspecting file changes. It does not explicitly enumerate when not to use get_session, but the comparison to get_diff provides enough routing guidance.

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