Skip to main content
Glama
Memory Bridge
by shuimo233

memory_write

Idempotent

Creates or updates a versioned, evidence-backed memory record so assistants keep decisions, preferences, and task state consistent across sessions.

Instructions

Create/update an evidence-backed record (up to 8 KiB JSON).

For a lasting user correction, provide the active record_id and its last observed expected_version, the revised content, and user_correction evidence. Omit key, kind, scope, scope_id, priority, and expires_at to retain those fields. If the intended record or duration is ambiguous, clarify before writing.

For key-based writes, provide key and kind. Use expected_version=0 only for a new key. Scope defaults to project and priority to 50. Task-scoped records require scope_id. Times require a timezone. For a new standing preference about how to answer, use memory_save_communication_preference.

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": {
      "content": "<content>",
      "evidence_ids": "<evidence_ids>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "memory_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyNo
kindNo
scopeNo
contentYes
priorityNo
scope_idNo
record_idNo
expires_atNo
evidence_idsYes
idempotency_keyYes
expected_versionNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already state this is a non-read-only, idempotent, non-destructive write tool. The description adds useful behavior beyond that: 8 KiB limit, retaining fields by omission, expected_version=0 only for new keys, defaults for scope and priority, task scope requiring scope_id, and timezone requirements for times. It does not explain version-conflict behavior or the evidence input contract in detail.

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?

The description is front-loaded with the core operation and then organized by use case. Despite covering multiple write modes, defaults, and an alternative tool, every sentence adds actionable guidance and there is little wasted wording.

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 an 11-parameter write tool with no schema parameter descriptions and an output schema already present, this description is substantially complete on workflows and defaults. The main completeness gaps are the unexplained required idempotency_key, the incomplete evidence_ids contract, and the absence of version-conflict behavior.

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 description coverage is 0%, so the description must carry parameter meaning, and it does explain the two main write paths: record_id plus expected_version for corrections, and key plus kind for key-based writes. It also explains omission-based retention and defaults for scope, scope_id, priority, and expires_at. However, the required idempotency_key is never mentioned, and evidence_ids is only implied by "evidence" rather than described as a required array.

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 names a specific verb and resource: "Create/update an evidence-backed record (up to 8 KiB JSON)." It also distinguishes one sibling explicitly by routing new standing communication preferences to memory_save_communication_preference.

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?

The description gives explicit usage modes: lasting user correction with record_id and expected_version, key-based writes with key and kind, and standing preference writes to a different tool. It also says to clarify ambiguous record or duration cases before writing.

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