Skip to main content
Glama

mem_session_end

Save an end-of-session recap to give the next session fresh context, capturing goals, accomplishments, and next steps.

Instructions

Save an end-of-session recap so the NEXT session starts with fresh context.

CALL THIS before closing any significant working session. In autopilot mode, the MCP server saves a minimal recap automatically on exit — but calling this manually produces a richer, more useful recap.

HOW IT WORKS: uses topic-upsert — one recap per scope is kept and updated in-place (revision_count increments). get_briefing surfaces the latest recap at the very top of the next session's briefing, before project context.

PARAMETERS: goal — what you were trying to accomplish (1–2 sentences) accomplished — what was actually done (bullet list recommended) discoveries — bugs, surprises, missing knowledge found during this session files_touched — key files read or modified (used as anchor for staleness) next_steps — what should happen in the next session or for a teammate scope — personal (default) | team

RETURNS: { id, scope, action: 'created'|'updated', revision_count }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalYesWhat you were trying to accomplish this session (1–2 sentences)
scopeNoVisibility: personal = private to you, team = shared with the teampersonal
moduleNoModule name (required when scope=module)
next_stepsNoWhat should happen next (for the next session or a teammate)
session_idNoTask session to checkpoint independently of the rolling recap.
discoveriesNoAny bugs, inconsistencies, surprises, or missing knowledge found during this session. Empty if nothing surprising was found.
accomplishedYesWhat was actually done — bullet list recommended
files_touchedNoKey files that were read or modified — used as anchor paths

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.65.0
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Task session to checkpoint independently of the rolling recap.",
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it delivers real behavioral context: topic-upsert semantics, one recap per scope updated in-place, revision_count incrementing, and get_briefing surfacing it at the top. It omits anything about permissions/auth or whether prior recap content is lost on update, but discloses the core mutation behavior well.

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?

Front-loaded with the core intent, then organized under clear headers (CALL THIS, HOW IT WORKS, PARAMETERS, RETURNS). Slightly long and repeats schema parameter docs, but every section carries usable information rather than 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?

For an 8-parameter tool with no output schema, the description is self-sufficient: it lists parameters, states persistence semantics, names the consumer (get_briefing), and even documents the return shape ({ id, scope, action, revision_count }). Nothing an agent needs to call it correctly is missing.

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 already documents all 8 parameters and the baseline is 3. The description restates the parameter list and adds marginal color ('used as anchor for staleness') but also omits the 'module' scope value that the schema enum exposes.

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?

States a specific verb and resource ('Save an end-of-session recap') and immediately frames the outcome ('so the NEXT session starts with fresh context'). The recap/upsert framing makes its role distinct from generic memory-write siblings without needing to list them.

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?

Gives an explicit trigger ('CALL THIS before closing any significant working session') and a useful nuance about autopilot mode saving a minimal recap automatically vs. the richer manual call. No alternative tool is named for the non-recap save path, so it stops short of a full when/when-not/alternatives statement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.