Skip to main content
Glama

record_turn

Append the latest user-assistant exchange to a conversation's history so chat context persists across sessions. Call after every reply using a stable session_id.

Instructions

Persist the most recent (user, assistant) exchange.

Call this after EVERY response you give in a conversation, with the user's question and your reply, so the chat history accumulates across sessions. Each call APPENDS — prior turns are never overwritten. The same exchange is mirrored to a local JSON ledger under .context-broker/ chats/, and the chat cache is warmed automatically so the next load_chat_context is a cached hit.

Use a stable session_id per conversation (e.g. the editor's chat id or the date). Different conversations should use different session_ids. For dumping an entire conversation at once, prefer record_session.

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_turn"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idYes
project_rootNo
user_messageNo
user_peer_idNo
assistant_messageNo
assistant_peer_idNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the load well: it discloses append-only semantics (prior turns are never overwritten), a filesystem side effect (mirrored to a local JSON ledger under .context-broker/chats/), and a cache side effect (chat cache warmed so the next load_chat_context is a cached hit). It does not cover failure behavior, idempotency for repeat submissions, or whether writes require any configuration, which keeps it short of a 5.

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 core instruction is front-loaded in the first two sentences, followed by side effects and then session_id guidance. The cache-warming clause is slightly incidential detail but is genuinely behavioral, so little is wasted.

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?

An output schema exists, so return values need not be explained. The description covers purpose, timing, persistence side effects, and session scoping; the remaining gap is the peer_id and project_root parameters, which are undocumented in both schema and description.

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 0% across six parameters, and the description only explains session_id (stable, per-conversation). It adds no meaning for user_message, assistant_message, user_peer_id, assistant_peer_id, or project_root, three of which default to empty strings and leave their purpose unclear.

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 first sentence gives a specific verb and resource: persist the most recent (user, assistant) exchange. The closing sentence explicitly distinguishes it from the sibling record_session, so an agent can separate single-turn appending from a whole-conversation dump without opening either schema.

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

Usage Guidelines5/5

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

It states exactly when to call it (after EVERY response in a conversation), how to scope it (a stable session_id per conversation, different ids for different conversations), and names the alternative for the bulk case (record_session). Use, exclusion, and alternative are all present.

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