Skip to main content
Glama

end_session

Finalize a work session after saving TODOs and a checkpoint, creating a clean handoff for the next AI session. Ends the active session to preserve durable context.

Instructions

Finalize the current work session. Call after recording unfinished TODOs and creating a final checkpoint. Previously recorded events are already durable; this operation finalizes the session for clean handoff to the next AI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idNoOptional: specific session ID to end
final_overviewNoOptional final overview/summary
workspace_pathNoWorkspace path to resolve session from

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.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 behavioral burden, and it does well: it explains that previously recorded events are already durable and that the operation finalizes the session for clean handoff. This gives the agent useful side-effect and persistence context, though it does not mention reversibility or required permissions.

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?

Three short sentences with no wasted words. The main action is front-loaded, followed by the call timing and then the important durability guarantee.

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 low-complexity tool with all-optional parameters and a 100%-covered schema, the description gives enough operational context: when to call, what it does, and what the agent can rely on afterward. It could mention what happens if no session is active, but the schema already covers parameter resolution hints.

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 parameters are already documented in the schema. The description adds no additional meaning about session_id, final_overview, or workspace_path, keeping this at the baseline.

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 opens with a specific verb and resource: 'Finalize the current work session.' It also differentiates from sibling tools like start_session and checkpoint_session by clarifying that this operation comes after a final checkpoint and closes the session for handoff.

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?

It explicitly states when to call the tool: 'after recording unfinished TODOs and creating a final checkpoint.' However, it does not mention when not to use it or name alternative tools, so it stops short of full routing guidance.

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