Skip to main content
Glama

end_session

Capture a structured session handoff by writing a checkpoint, decisions, open loops, and more to a local database. Ensures the next session resumes smoothly with full context.

Instructions

Capture a structured session handoff. Writes multiple records to the local SQLite database: one checkpoint (required), plus optional decisions, open loops, preferences, constraints, warnings, relational delta, and next session focus. Each record is stored with a typed 'type' column (not content prefixes) and linked to a session record via session_id. Also creates a session row in the sessions table with a summary, orientation score, and gap count. The checkpoint is retrievable by boot_report on the next session start. All records are searchable via search_memory and list_memories. Call this at the end of every substantive session to ensure the next session can pick up the thread.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
checkpointYesWhere we left off — the single most important handoff artifact. Stored as type='checkpoint' with importance 8. This is what boot_report loads as the latest checkpoint on the next session start.
decisionsNoKey decisions made this session and their rationale. Each entry is stored as a separate memory with type='decision' and importance 7.
open_loopsNoUnresolved questions, pending tasks, or threads that need follow-up. Each entry is stored as type='open_loop' with importance 7.
preferencesNoNew user preferences or working style observations learned this session. Each entry is stored as type='preference' with importance 6.
constraintsNoBoundaries that must not be violated — violating these causes trust damage. Each entry is stored as type='constraint' with importance 9 (highest default).
warningsNoHazards or risks the next session should be aware of. Each entry is stored as type='warning' with importance 8.
relational_deltaNoWhat changed in the working relationship this session — trust shifts, tension, repair, tone changes. Stored as type='relational_delta' with importance 8.
next_session_focusNoWhere to resume next session, which may differ from where we stopped. Stored as type='next_session_focus' with importance 7.
projectNoProject name to scope all records to. Passed through to each stored memory's project field.
transcript_pathNoFile path to the session transcript, stored on the session record for reference by boot_report.
session_idNoCurrent session ID. Used to check for unreviewed PreCompact captures. If captures exist for this session that were not read via read_capture, a warning is included in the response.
Behavior5/5

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

With no annotations provided, the description fully bears the burden of transparency. It details each record type, storage mechanism, importance levels, linking to session, and even response behavior regarding unreviewed captures. 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single paragraph that is informative but somewhat lengthy. It is well-structured but could be slightly more concise without losing detail.

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?

Given 11 parameters, no output schema, and no annotations, the description is remarkably complete. It covers the entire workflow, including how checkpoints are retrieved, how records are searchable, and response warnings.

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

Parameters4/5

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

Schema coverage is 100% with thorough descriptions. The tool description adds value by explaining the significance of each parameter type (e.g., importance levels, storage types) and the overall flow, enriching the schema definitions.

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 this tool captures a structured session handoff, listing specific records created. It distinguishes from siblings by mentioning that checkpoints are retrievable by boot_report and records are searchable via search_memory and list_memories.

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 says to call this at the end of every substantive session, providing clear when-to-use guidance. It does not specify when not to use or mention alternatives, but the context is sufficient.

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/Skitchy/rekindle'

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