Skip to main content
Glama

get_session_snapshot

Read-onlyIdempotent

Retrieve a compact session snapshot to recover context after compaction. Includes focus files, edited files, key searches, and dead ends for quick 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. Read-only. For full journal use get_session_journal; for cross-session context use get_session_resume. Returns JSON: { focusFiles, editedFiles, keySearches, deadEnds }.

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)
Behavior5/5

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

Beyond annotations (readOnly, idempotent), description adds that it's compact (~200 tokens), read-only, and used for context recovery and by PreCompact hook. No contradictions.

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 concise sentences, front-loaded with purpose, no filler. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, description explicitly lists return fields (focusFiles, editedFiles, keySearches, deadEnds). Provides context of compaction and hook usage, making it complete for understanding.

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%, so description doesn't need to add parameter details. Description does not elaborate on parameters, but schema fully documents them. Baseline 3 applies.

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?

Description clearly states it returns a compact session snapshot for context recovery, listing specific components (focus files, edited files, key searches, dead ends). Verb 'get' with specific resource and scope.

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

Usage Guidelines5/5

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

Explicitly provides when to use alternatives: 'For full journal use get_session_journal; for cross-session context use get_session_resume.' Also mentions it's used by PreCompact hook.

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