Skip to main content
Glama
0gm-memory

0gm-memory

Official
by 0gfoundation

Save a session transcript

save_session
Idempotent

Adds a session transcript to the project's memory buffer, redacts secrets, and saves only new records for recall of past decisions and context.

Instructions

Add a session transcript (Claude Code or Codex JSONL, or JSONL of {role, content, timestamp}) to this project's memory buffer. Secrets are redacted first. The buffer is written to wallet memory once it passes about 70K tokens; the reply says what was buffered and what was saved. Safe to call twice on one file: only new records are added.

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": {
      "transcript_path": "<transcript_path>"
    },
    "name": "save_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
transcript_pathYesAbsolute path to the JSONL file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that secrets are redacted before storage, that the buffer is only flushed to wallet memory past a ~70K token threshold, and that the reply reports both what was buffered and what was persisted. This is exactly the hidden behavior a caller cannot infer from readOnlyHint/idempotentHint/destructiveHint alone.

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?

Three tight sentences, each carrying distinct information: purpose and formats, redaction and buffer-threshold behavior, then idempotency and response content. Nothing is repeated from the title or schema, and the core action is front-loaded.

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

Completeness5/5

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

For a single-parameter mutation tool with annotations and no output schema, the description covers the ingest format, safety (redaction), persistence semantics (70K threshold flush), idempotency, and reply contents. An agent has everything needed to decide to call it and to interpret the result.

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?

Schema coverage is 100% and the only parameter is documented as an absolute path, so the baseline is 3. The description still adds meaning the schema lacks by defining which file formats the path may point to, which affects whether a caller should attempt the call at all.

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?

States a specific verb and resource ("Add a session transcript ... to this project's memory buffer") and enumerates accepted formats (Claude Code or Codex JSONL, or JSONL of {role, content, timestamp}). The ingest/write nature is clear enough to separate it from sibling query-style tools like ask_memory and memory_status without opening any schema.

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?

Gives clear context for use: ingesting a transcript file into the project's memory buffer, and notes it is safe to call twice on one file, which resolves the main ambiguity an agent would have. It stops short of naming alternatives or stating when not to use it (e.g. when memory_status already shows the file buffered), so it is clear but not fully routed.

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