Skip to main content
Glama

get_claude_session

Inspect a local Claude Code session by ID to view recent messages and Remote Control URL.

Instructions

Inspect a local native Claude Code session log by id. Returns recent user/assistant text and any Remote Control URL recorded in the log.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo/root
sessionIdYes
maxMessagesNo
Behavior3/5

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

The description discloses that the tool reads a log and returns text and a URL, implying a read-only operation. However, with no annotations, the agent must infer that it is non-destructive and that no modifications occur. It does not mention error conditions, authentication, or rate limits, but it does specify 'local native' as a scope constraint, adding useful context.

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?

The description is two sentences, front-loaded with the core action and outcome, and contains no redundant information. It is appropriately sized for the tool's simplicity and clearly structured.

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?

The description states the primary output but omits explanations for all parameters and any error behavior. Given the lack of annotations and output schema, it doesn't fully equip an agent to handle edge cases or know the exact meaning of cwd. However, for a read-only log inspection tool, the description is reasonably complete in conveying its main function.

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?

The description maps sessionId via 'by id' and maxMessages via 'recent' text, but it does not explain the cwd parameter at all. With 0% schema description coverage, the description carries the full burden of parameter semantics, and it only partially covers two of the three parameters. The default values in the schema help but are not semantically explained.

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 clearly states the tool inspects a session log by id and returns recent user/assistant text and any Remote Control URL. The verb 'inspect' and the 'by id' qualifier distinguish it from list_claude_sessions, which presumably lists all sessions. However, it doesn't explicitly mention any contrast with sibling 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?

The description implies usage when you have a specific session ID and need its log contents, but it does not explicitly mention when to use this tool over list_claude_sessions or other session-related tools. There is no guidance on exclusions or prerequisites, such as needing a running session or having permission. The 'by id' phrasing hints at singular lookup but doesn't fully clarify when to choose this tool.

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/SNComrade/Rail-Connector-MCP'

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