Skip to main content
Glama

get_session_snapshot

Capture a compact session snapshot to recover context after compaction, preserving focus files, edits, key searches, and dead ends for session orientation.

Instructions

Compact session snapshot (~200 tokens) for context recovery after compaction. Returns focus files (by read count), edited files, key searches, and dead ends. Also used by the PreCompact hook to preserve session orientation automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_filesNoMax focus files to include (default: 10)
max_searchesNoMax key searches to include (default: 5)
max_editsNoMax edited files to include (default: 10)
include_negative_evidenceNoInclude dead-end searches (default: true)
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes the tool's function and output format (~200 tokens, includes specific data types), but lacks details on permissions, rate limits, error handling, or whether it's read-only or has side effects. The mention of automatic use by the PreCompact hook hints at integration behavior, but more explicit traits would improve transparency.

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 highly concise and well-structured in two sentences: the first states the purpose and output components, and the second adds usage context. Every sentence earns its place by providing essential information without redundancy, making it front-loaded and efficient for quick understanding.

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?

Given the tool's moderate complexity (4 parameters, no output schema, no annotations), the description is reasonably complete. It covers the tool's purpose, output format, and usage scenarios. However, without an output schema, it could benefit from more detail on return values (e.g., structure of the snapshot) to fully compensate for the lack of structured output documentation.

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%, so the schema fully documents all four parameters with descriptions and constraints. The description does not add any parameter-specific information beyond what the schema provides, such as explaining how 'max_files' relates to 'focus files' or the significance of 'include_negative_evidence'. Baseline score of 3 is appropriate as the schema handles the heavy lifting.

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 clearly states the tool's purpose: to retrieve a compact session snapshot for context recovery after compaction, listing specific components like focus files, edited files, key searches, and dead ends. It distinguishes from siblings by specifying its unique role in session management and automatic preservation via the PreCompact hook, unlike other tools focused on code analysis, refactoring, or project metrics.

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?

The description explicitly states when to use this tool: for context recovery after compaction and automatically by the PreCompact hook. It provides clear context for its application in session orientation. However, it does not specify when not to use it or name alternatives among the many sibling tools, such as get_session_analytics or get_session_journal, which might offer different session-related data.

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/nikolai-vysotskyi/trace-mcp'

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