Skip to main content
Glama
ClickHouse Loom

ClickHouse Loom

Official

loom_memory_set

Idempotent

Saves a user fact, preference, decision, or current state to shared memory across AI tools, with tags and optional TTL expiry. Call it proactively when the user states something worth remembering.

Instructions

Save a fact to Loom — shared across every AI tool the user runs; native memory is the Claude-only scratchpad.

Call this proactively whenever the user states a personal fact, decision, preference, or current state — even without 'remember' or 'save'. Declarative statements ARE save triggers: 'my X is Y', 'I prefer X over Y', 'we decided X', 'we're at X', 'I deploy on X' — one call per fact.

Don't search before saving. A stated fact is a write; the server dedups. 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).

Other writes: loom_memory_pin guards a fact from later conflicting writes, loom_memory_lock from change or deletion; loom_memory_apply changes many.

Auto-tag scope words: billing → tags=['billing']. For a fact about the primer's repository, add its repo:<id> tag; omit that tag for unrelated facts.

Do NOT save questions, code help, world knowledge, acknowledgements, hypotheticals or your own echoes.

Writes land in ONE namespace (your home); pass namespace=<name> only to write elsewhere. Don't override memory_type (defaults semantic); use tags for classification. Cite the response's namespace and memory_key in your confirmation; conflict_verdict, peers and next say what the store held (dry_run=true checks without writing). value is stored verbatim; never base64 (see advisories).

A fact with a natural lifetime gets one at write time. A deadline, a temporary state ('on call this week'), a rotating value: pass ttl_seconds AND on_expire (tombstone | demote | anonymize) in the SAME call — the expiry sweep applies it. Without on_expire the row stops being current.

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>",
      "value": "<value>"
    },
    "name": "loom_memory_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNo
filesNo
valueYes
pinnedNo
run_idNo
dry_runNo
entitiesNo
proposedNo
valid_atNo
valid_toNo
namespaceNo
on_expireNo
confidenceNo
memory_keyYes
memory_typeNosemantic
sensitivityNo
ttl_secondsNo
clear_expiryNo
expire_reasonNo
if_match_sha256No
source_resource_idNo

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 write (readOnlyHint=false), idempotent, and non-destructive, and the description adds real behavior beyond that: server-side dedup, single home namespace by default, verbatim value storage with no base64, dry_run preview semantics, and the ttl_seconds/on_expire pairing requirement for expiry sweep. It stops short of describing what dedup actually does to a conflicting write or what the response envelope contains in full, so it adds value but leaves behavioral gaps.

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?

Front-loaded with the core action and trigger rule, then grouped into bolded sections (revision policy, other writes, tagging, exclusions, namespace/response, TTL) so an agent can scan to the relevant block. It is dense but the length is largely earned by the 21-parameter surface; a few lines, such as the repo tag aside, are situational enough to slow the main instruction.

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?

No output schema exists, and the description compensates by naming the response fields that matter (namespace, memory_key, conflict_verdict, peers, next, advisories) and by giving the dedup/conflict and expiry models an agent needs to write correctly. The remaining incompleteness is concentrated in the undocumented secondary parameters rather than in the core write path.

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 21 parameters and 0% schema description coverage, the description carries the whole burden, and it meaningfully explains namespace, memory_key (include the project/scope token), tags, memory_type (leave at default semantic), ttl_seconds plus on_expire, dry_run, and value. Roughly a dozen parameters (files, entities, confidence, sensitivity, valid_at, valid_to, if_match_sha256, source_resource_id, clear_expiry, expire_reason, pinned, proposed, run_id) get no explanation anywhere, which is a substantial gap for a 21-param tool.

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 ('Save a fact to Loom'), plus scope: shared across every AI tool vs. the Claude-only native scratchpad. It also distinguishes itself from siblings by naming loom_memory_update, loom_memory_pin, loom_memory_lock, and loom_memory_apply with their distinct roles.

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?

Explicit when-to-use ('declarative statements ARE save triggers', with concrete example phrasings, one call per fact), when-not-to-use (questions, code help, world knowledge, acknowledgements, hypotheticals, echoes), and alternatives (update for revisions, pin/lock for protection, apply for bulk). It even rules out a tempting but wrong behavior: don't search before saving.

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