Skip to main content
Glama

session

List, create, switch, and compact an agent's conversation histories, including in-place context compaction into durable checkpoint summaries.

Instructions

Manage multi-session conversation history and in-place context compaction for Agents in the current project. Call with op=, params={...} (use op='help' for full schema):

  • list(agent_id, q?): List an Agent's Hub-scoped conversation sessions (optional keyword q).

  • create(agent_id, title?): Create and activate a new blank conversation session for an idle Agent.

  • switch(agent_id, session_id): Switch an idle Agent's active conversation session.

  • compact(agent_id, focus?, wait?, timeout_sec?): Compact an idle Agent's active session context in-place into a durable checkpoint summary.

  • help(op?): Return single-source parameter specs and examples for session ops.

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": {
      "op": "<op>"
    },
    "name": "session"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYes
paramsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations exist, so the description carries the full behavioral burden. It does disclose that compact rewrites context in-place into a 'durable checkpoint summary' and that creation activates a blank session, which hints at mutation and at the risk of context loss. It says nothing about whether compaction is reversible, what happens to prior messages, permission requirements, or whether switch affects other running work.

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?

Front-loaded summary sentence followed by a scannable per-op bullet list, with the op/params calling convention stated before the bullets. No filler sentences; every line maps to a callable operation or a routing hint.

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 dispatcher tool of moderate complexity, the description covers the op vocabulary, the envelope convention, and per-op arguments; an output schema exists so return shapes need not be explained. The remaining gap is behavioral risk around compact (irreversibility, effect on existing turns) and the absence of any error or idempotency note for the mutating ops.

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 coverage is 0% (the schema is only op plus an opaque params object), so the description is the sole source of parameter meaning and does list each op's parameters with optionality markers (q?, title?, focus?, wait?, timeout_sec?). But the meanings remain thin — 'focus' is undefined, wait/timeout_sec have no units or defaults — and detailed specs are deferred to a second call to op='help'.

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 opening sentence names a specific resource and domain: multi-session conversation history plus in-place context compaction for Agents in the current project. Each of the five ops then gets a concrete verb-plus-object gloss (list sessions, create/activate, switch, compact). It stops short of differentiating itself from the sibling tools (agent, hub, mcp), so an agent must infer the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Preconditions are stated for the mutating ops (create/switch/compact all require an 'idle Agent'), and op='help' is offered for full specs, which is real usage context. However there is no guidance on choosing between ops in ambiguous cases (e.g., start a new session via create vs. compact the existing one), and no when-not or alternative-tool routing.

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