Skip to main content
Glama
ClickHouse Loom

ClickHouse Loom

Official

loom_memory_update

Update an existing saved fact by memory key when it changes or becomes more precise, preserving tags, confidence, and history instead of creating a duplicate.

Instructions

Update a saved fact by memory_key: the operation for "the fact changed or got more specific".

WHEN: a read (loom_memory_get or loom_search) returned this key and the user now states a new value, a correction, or a more precise version of it — 'the deploy day moved to Thursday', 'the budget is actually 40k'. It keeps the row's tags, confidence, expiry, lock and history; loom_memory_set would write a new version blind. Revision policy: if a read this session returned the key of a fact that has now changed or got more precise, update it under that same key with loom_memory_update — never save a second copy and never delete + re-save. A fact about a new subject or scope gets its own memory_key (include the project / scope token in the key). Do NOT use it for a genuinely new fact — call loom_memory_set.

Resolves the key across the namespace; pass agent/user_id/session_id only to narrow when the key is live under several writers (409 AMBIGUOUS_KEY lists them). updated=false with reason=not_found means the key has no live row — save it with loom_memory_set instead. Pass if_match_sha256 from the read for a no-clobber update. Given a memory_id rather than a key, call memory.update_by_id (via loom_op).

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": {
      "memory_key": "<memory_key>"
    },
    "name": "loom_memory_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNo
valueNo
reasonNo
reviveNo
run_idNo
conceptsNo
namespaceNo
char_limitNo
confidenceNo
memory_keyYes
if_match_sha256No

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare a non-read-only, non-idempotent, non-destructive mutation, and the description genuinely adds beyond them: preserved fields (tags, confidence, expiry, lock, history), the 409 AMBIGUOUS_KEY behavior, the updated=false/reason=not_found outcome, and the if_match_sha256 no-clobber option. That is solid context. The remaining gap is that most tunable parameters (tags, revive, confidence, char_limit, concepts) are never described, so an agent does not know how a write interacts with the retained fields versus overridden ones.

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?

Well front-loaded: purpose in the first clause, then WHEN, then revision policy, then error/routing notes. Dense but every section is labeled and scannable. Minor cost from nested quoting and parenthetical jargon ('409 AMBIGUOUS_KEY lists them') that adds length without much extra clarity.

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 mutation tool with no output schema, it covers the decision path, preservation semantics, ambiguity handling, not-found fallback and optimistic concurrency, which is more than most definitions provide. It falls short of 5 because several write-shaping parameters remain unexplained and the body references agent/user_id/session_id arguments absent from the input schema, which could confuse an agent composing the call.

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?

With 11 parameters at 0% schema description coverage, the description carries the full burden; it explains memory_key, if_match_sha256, and the ambiguity-narrowing role of agent/user_id/session_id, and implies value semantics via 'new value, a correction, or a more precise version'. However, namespace, tags, confidence, expiry-adjacent fields, revive, concepts, char_limit, run_id and reason are undocumented, so over half the surface is left opaque. It partially compensates but not fully.

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 ('Update a saved fact by memory_key') and immediately qualifies the semantic: the operation for 'the fact changed or got more specific'. It names the sibling that writes blind (loom_memory_set) and the id-based path (memory.update_by_id), so an agent can distinguish it from loom_memory_set, loom_memory_delete and loom_memory_get 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 Guidelines5/5

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

The WHEN block gives a concrete trigger (a read returned this key and the user states a new value, correction, or more precise version) with worked examples. It also states the negative case ('Do NOT use it for a genuinely new fact — call loom_memory_set') and the revision policy against duplicate copies, plus routing for a memory_id. Alternatives and exclusions are explicit rather than inferred.

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