Skip to main content
Glama
lokeshrana9999

claude-session-manager

session_result

Retrieve a completed headless Claude Code CLI run's final status, cost, turns, diffstat, and answer text by run ID.

Instructions

Final result of a run (bounded): status, cost, turns, worktree diffstat, and the answer text under untrusted.

Input Schema

NameRequiredDescriptionDefault
run_idYes
includeNo
max_charsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does useful work: it discloses that output is bounded and that answer text is wrapped under `untrusted`, a meaningful safety signal. However, it says nothing about whether the call blocks/waits for an unfinished run, what error occurs for an unknown or still-running run_id, or whether retrieval is read-only and side-effect free.

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?

A single compact sentence that front-loads the core purpose and packs the payload inventory into a parenthetical with no filler. Minor cost: terms like 'worktree diffstat' and the `untrusted` wrapper convention are used without any gloss.

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?

An output schema exists, so the description is right not to enumerate return values in detail, and it correctly flags boundedness and the untrusted payload. The remaining gaps — behavior on an in-progress run, run_id format, and the include selector — are substantial for a tool with three undocumented parameters and zero annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it only partially does: '(bounded)' hints at max_chars truncation and the listed return fields loosely map to the `include` options. It never explains run_id semantics, the five `include` enum values (result, structured, denials, diffstat, stderr_tail), their default-null meaning, or the 100–20000 range and 2000 default on max_chars.

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 states precisely what the tool returns: the final result of a run, enumerating status, cost, turns, worktree diffstat, and answer text. It is clearly distinct from session_start/session_send/session_stop by being a retrieval of terminal run output, but it never contrasts itself with session_status or session_tail, so an agent must infer which accessor to use.

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 explicit when-to-use statement. 'Final result' weakly implies a completed run, but the description never says what to call while a run is still going (session_status/session_tail) or what happens if the run hasn't finished, leaving the primary selection decision to inference.

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