Skip to main content
Glama

end_session

End the current session with automatic knowledge preservation by saving a summary and optionally exporting recent findings to the library.

Instructions

Gracefully end the current session with automatic knowledge preservation. COMPOSITE TOOL.

AUTOMATIC TRIGGERS - Call this when:

  • User indicates work is done ("done", "finished", "ending session")

  • Research or analysis is complete

  • About to start unrelated work

This combines: session_end (saves summary) + optional artifact export. ALWAYS call this when user indicates work is done to prevent knowledge loss.

WORKFLOW POSITION: Last tool in any research/analysis workflow.

PARAMETERS:

  • session_id: The session to end (track from start_research or session_start)

  • export_to_library: If True, also search for recent findings to persist (default: True)

  • project: Project name for any exported findings (optional)

Returns session end status and export results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNo
session_idYes
export_to_libraryNo
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and does a good job: it discloses that the tool saves a summary, optionally searches for findings to persist, prevents knowledge loss, and returns session end status and export results. It does not discuss reversibility or potential side effects on related data, but the key behaviors are transparent.

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 well-structured and front-loaded with the core purpose, followed by triggers, workflow position, parameters, and return value. There is minor redundancy ('ALWAYS call this when user indicates work is done' partly repeats the first trigger bullet), but overall every section earns its place.

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 composite tool with no output schema and no annotations, the description supplies triggers, workflow position, parameter guidance, and return behavior, which is sufficient for an agent to select and invoke it. It could be more complete with failure modes or a clearer contrast against session_end, but the core context is well covered.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate fully. It does: session_id is tied to start_research or session_start, export_to_library explains its conditional effect and default, and project is described as optional. Each parameter receives semantic meaning beyond the raw 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?

The description clearly states the tool ends the current session with automatic knowledge preservation and calls out that it is a composite tool. It distinguishes itself by combining session_end with artifact export, but does not explicitly contrast with siblings like terminate_session or leave_session.

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?

Provides explicit trigger conditions ('User indicates work is done', 'Research or analysis is complete', 'About to start unrelated work') and workflow position ('Last tool in any research/analysis workflow'). However, it lacks guidance on when to use an alternative such as terminate_session, leave_session, or session_end instead.

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/Vedant9500/OpenLMlib'

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