Skip to main content
Glama

session

Manage session lifecycle: start, end, view history, check active status, clean up stale sessions, or retrieve a boot-time digest of narrative and decisions.

Instructions

Session lifecycle — start, end, history, active check, stale cleanup, and the v0.9.0 boot-time digest.

ACTIONS:

  • "start": Begin a new session. Returns session_id.

  • "end": End a session (needs session_id). Returns stats.

  • "history": View past sessions.

  • "active": Check if there's a running session.

  • "abandon_stale": Clean up orphaned sessions older than abandon_stale_hours.

  • "digest": One-call boot-time briefing (v0.9.0) — narrative chain head, open decisions/conflicts/triggers, top stale memories. Call this at conversation start instead of N separate recalls.

Args: action: "start", "end", "history", "active", "abandon_stale", "digest". session_id: For end. namespace: Memory namespace. client_id: Client identifier. metadata: For start — optional dict. summary: For end — what happened. limit: For history. abandon_stale_hours: For abandon_stale — max age in hours. narrative_namespace: For digest — namespace for the narrative chain. max_decisions / max_conflicts / max_triggers: For digest — surface caps. snippet_chars: For digest — text-snippet length per item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
actionYes
summaryNo
metadataNo
client_idNodefault
namespaceNodefault
session_idNo
max_triggersNo
max_conflictsNo
max_decisionsNo
snippet_charsNo
abandon_stale_hoursNo
narrative_namespaceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior1/5

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

The description includes destructive actions ('end', 'abandon_stale') while annotations set destructiveHint to false, creating a contradiction. The description adds some behavioral context (e.g., parameter usage per action), but the contradiction severely undermines transparency.

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 appropriately sized and front-loaded with a summary line. Bullet points for actions improve readability, though some details could be more terse (e.g., 'surface caps' phrasing).

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?

Given the tool's complexity (13 parameters, multiple sub-actions) and the existence of an output schema, the description covers the main usage scenarios and parameter purpose. It lacks details on defaults, error handling, or prerequisites.

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?

With 0% schema description coverage, the description compensates by mapping parameters to specific actions (e.g., 'session_id: For end'). It provides semantic context beyond the raw schema, though it could more explicitly tie required parameters to each action.

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 clearly states 'Session lifecycle' and enumerates specific actions (start, end, history, etc.), providing a specific verb+resource that distinguishes it from sibling tools like 'category' or 'conflict'.

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 lists actions with brief descriptions, giving clear context for when to use each sub-function. However, it does not explicitly exclude alternatives or provide when-not-to-use guidance, though sibling tools are sufficiently different.

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/yantrikos/yantrikdb-mcp'

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