Skip to main content
Glama

End Session

session_end
Destructive

Saves the current session as a checkpoint with summary, state, insights, and optional phase updates so work persists for the next session.

Instructions

[ON SAVE/EXIT — YOU must call this; nothing auto-saves] Use when the user asks to save, checkpoint, summarize, end, retain, or persist the current session. Optionally pass close_phase / open_phase to update the project pipeline narrative spine in the same call.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "summary": "<summary>"
    },
    "name": "session_end"
  }
}

Input Schema

NameRequiredDescriptionDefault
stateNoProject state card, REWRITTEN every save and loaded by the next session_start. Omitted fields carry forward; [] clears a list. Soft caps (overflow truncated with … and listed in state_card.truncated): goal ≤300 chars, open_decisions ≤5×160, blockers ≤5×160, next ≤300 (defaults to trajectory), pointers ≤8×200 (paths/URLs). Hard limits (beyond these the whole save is rejected): goal and next ≤1200 chars; open_decisions and blockers ≤20 items × 640 chars; pointers ≤20 items × 800 chars.
projectNoauto
summaryYesWhat happened this session. Simple session: 2-3 sentences. Multi-phase session: one paragraph per completed phase (e.g. 'Phase 1 — Name: what happened. Phase 2 — Name: what happened. Decisions: X. Blockers: Y.'). Never compress a multi-phase session to 2 sentences — it makes the journal useless.
insightsNoInsights learned this session.
open_phaseNoOpen a new pipeline phase as part of this save (e.g. when a watershed session pivots into the next strategic direction).
trajectoryNoWhere is the work heading next.
close_phaseNoClose the currently active pipeline phase as part of this save. Provide all three reflection fields explicitly — never auto-generated.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.5.3
    • addedInput schema / properties / state
      Added value: +{
      +  "description": "Project state card, REWRITTEN every save and loaded by the next session_start. Omitted fields carry forward; [] clears a list. Soft caps (overflow truncated with … and listed in state_card.truncated): goal ≤300 chars, open_decisions ≤5×160, blockers ≤5×160, next ≤300 (defaults to trajectory), pointers ≤8×200 (paths/URLs). Hard limits (beyond these the whole save is rejected): goal and next ≤1200 chars; open_decisions and blockers ≤20 items × 640 chars; pointers ≤20 items × 800 chars.",
      +  "properties": {
      +    "blockers": {
      +      "items": {
      +        "maxLength": 640,
      +        "type": "string"
      +      },
      +      "maxItems": 20,
      +      "type": "array"
      +    },
      +    "goal": {
      +      "maxLength": 1200,
      +      "type": "string"
      +    },
      +    "next": {
      +      "maxLength": 1200,
      +      "type": "string"
      +    },
      +    "open_decisions": {
      +      "items": {
      +        "maxLength": 640,
      +        "type": "string"
      +      },
      +      "maxItems": 20,
      +      "type": "array"
      +    },
      +    "pointers": {
      +      "items": {
      +        "maxLength": 800,
      +        "type": "string"
      +      },
      +      "maxItems": 20,
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the agent knows this writes state. The description adds real value by flagging that nothing is auto-saved and the call is mandatory, which is the key operational fact. However, with destructiveHint=true it never explains the destructive surface — e.g. that field omission carries forward while empty arrays clear existing data — leaving that detail solely to the schema.

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 sentences, front-loaded with the urgency tag and the trigger list, followed by the optional phase-update affordance. Nothing is padded or restated.

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?

For a 7-parameter, nested-schema, no-output-schema tool, the description covers the core call intent and the optional phase transitions adequately, with the detailed field semantics handled by the schema. It omits any mention of insights/trajectory in the narrative, which is acceptable given 86% schema coverage.

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 86%, so the schema already explains summary, state, insights and the phase objects in depth. The description only adds one semantic note — that close_phase/open_phase update the 'project pipeline narrative spine' — which is helpful but marginal against an already-rich schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific action (persist/end the current session) and the trigger surface ('save, checkpoint, summarize, end, retain, or persist'). The 'nothing auto-saves' framing makes the tool's role unmistakable, though it does not explicitly contrast with the sibling 'remember' (discrete memory writes) or 'session_start'.

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 a clear, broad set of user phrasings that should trigger the call, plus the optional combined use of close_phase/open_phase when a phase boundary coincides with the save. It stops short of stating when NOT to use it or naming an alternative tool for partial/periodic saves.

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

Deploy Server

Other Tools