Skip to main content
Glama

end_session

Save a structured session handoff with checkpoints, decisions, open loops, and next-session focus to SQLite, enabling the next session to resume exactly where it left off.

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. Workflow: call end_session at the end of every substantive session so the next session can pick up the thread.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNoProject name to scope all records to. Passed through to each stored memory's project field.
warningsNoHazards or risks the next session should be aware of. Each entry is stored as type='warning' with importance 8.
decisionsNoKey decisions made this session and their rationale. Each entry is stored as a separate memory with type='decision' and importance 7.
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.
open_loopsNoUnresolved questions, pending tasks, or threads that need follow-up. Each entry is stored as type='open_loop' with importance 7.
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.
constraintsNoBoundaries that must not be violated — violating these causes trust damage. Each entry is stored as type='constraint' with importance 9 (highest default).
preferencesNoNew user preferences or working style observations learned this session. Each entry is stored as type='preference' with importance 6.
transcript_pathNoFile path to the session transcript, stored on the session record for reference by boot_report.
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.
Behavior5/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. It explicitly discloses multiple behavioral traits: writes to a local SQLite database, stores records with a typed 'type' column, links to session_id, creates a session row with summary/orientation/gap count, includes a warning for unreviewed PreCompact captures, and mentions searchability and boot_report retrieval. This is thorough and non-misleading.

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?

Although the description is moderately long, it is dense and well-structured. It begins with the core purpose, flows into storage details, and concludes with the workflow. Every sentence adds operational information, and there is no redundancy or filler.

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 covers all critical aspects: what gets written, how records are typed and linked, how to retrieve them later, the session row side-effect, and the warning behavior. It also explains the intended workflow. This is a complete description for a complex tool.

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%, so the baseline is 3. The description adds meaningful value beyond the schema by explaining the overall storage model (typed column, session_id linkage), the relationship to boot_report, and the workflow. However, it does not add much per-parameter detail that isn't already in the schema, so a 4 is appropriate.

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 starts with a specific verb and resource: 'Capture a structured session handoff.' It clearly distinguishes from siblings like list_captures or store_memory by focusing on session-end aggregation and persistence. The phrase 'Writes multiple records to the local SQLite database' further specifies scope and behavior.

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 states a clear usage trigger: 'call end_session at the end of every substantive session so the next session can pick up the thread.' It provides clear context but does not explicitly name alternative tools or when not to use it, so it falls short of a 5.

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