Skip to main content
Glama

record_session

Persist an entire chat history in one call: append all turns to the session and local JSON ledger, then warm the cache for immediate next load.

Instructions

Persist an ENTIRE chat history in one call.

turns is a list of {"user": "...", "assistant": "..."} dicts in chronological order — pass every exchange you have. Each turn is appended to the session (never overwriting prior turns), mirrored to the local JSON ledger, and the chat cache is warmed at the end so the next load is an immediate cached hit.

Prefer this over a flurry of record_turn calls when you have the full conversation in context (e.g. when the user asks you to save the whole chat).

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": {
      "session_id": "<session_id>"
    },
    "name": "record_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
turnsNo
session_idYes
project_rootNo
user_peer_idNo
assistant_peer_idNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses append-only semantics ("never overwriting prior turns"), side effects (mirroring to the local JSON ledger, cache warming at the end) and the loading benefit. It omits what happens if session_id does not already exist, whether the session is auto-created, and any permission or size constraints on large histories.

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 with the payoff in the first clause, then the turn format, then the alternative-tool routing. Every sentence carries information an agent needs and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values need no explanation, and the write semantics are well covered. However, for a 5-parameter tool at 0% schema description coverage, omitting what session_id, project_root and the peer IDs do leaves an agent guessing about session creation and peer attribution.

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

Parameters2/5

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

Schema description coverage is 0% across 5 parameters, so the description must compensate and largely does not. It only defines the shape of `turns` ({"user", "assistant"} in chronological order, pass every exchange); session_id, project_root, user_peer_id and assistant_peer_id get no explanation at all, including the required session_id.

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?

"Persist an ENTIRE chat history in one call" gives a specific verb and resource, and the body clarifies the batch/append scope. It is clearly distinguishable from record_turn, which is named explicitly.

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 states when to prefer this tool ("when you have the full conversation in context, e.g. when the user asks you to save the whole chat") and names the alternative it replaces (a flurry of record_turn calls). It lacks an explicit when-not case or a cost/threshold caveat, but the guidance is concrete enough to route correctly.

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