Skip to main content
Glama

Update Memory Metadata

memory-update-metadata

Patch metadata fields like tags, source, domain, or topic on an existing memory by id to correct mis-stamped values without re-ingesting or creating duplicates.

Instructions

Patch metadata-shape fields on an existing memory by id. Use to correct mis-stamped tags/source/domain/topic without re-ingesting (which would either duplicate or rely on similarity dedupe to overwrite). Mode "merge" (default) only updates specified fields; "replace" wipes unset fields to defaults — footgun-y, used sparingly. Rejects mutations of id, createdAt, embedding (re-embedding requires re-ingest with skipDedupe).

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": {
      "id": "<id>",
      "metadata": "<metadata>"
    },
    "name": "memory-update-metadata"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesMemory id to patch.
modeNoDefault merge — patch only specified keys. Replace — clear unspecified metadata fields to defaults.
metadataYesPartial metadata to apply.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it explains merge vs replace semantics, warns that replace 'wipes unset fields to defaults' and is 'footgun-y, used sparingly', and lists rejected mutations (id, createdAt, embedding). It does not cover auth/permission requirements or whether a patch can be rolled back, and there is no output schema to explain the response.

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?

Three sentences, purpose front-loaded, each carrying new information (what, when, mode semantics, immutability). The parenthetical about dedupe is slightly dense but earns its place by justifying the tool's existence; nothing is redundant padding.

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 a nested metadata object (8 subfields), no annotations and no output schema, the description supplies the risky bits an agent needs: mode semantics, replace's defaulting behavior, and the immutable-field rejections. Remaining gaps — return shape and permission requirements — are minor relative to what is covered.

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%, so baseline is 3; the description goes beyond it by flagging the destructive behavioral edge of mode=replace and by stating that id, createdAt and embedding are rejected entirely — an invocation constraint not encoded in the schema. It adds less on the nested metadata fields themselves, which the schema already documents per-property.

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 ('Patch metadata-shape fields on an existing memory by id'), narrowing scope to metadata-shape fields only. It explicitly contrasts with the re-ingest sibling path, so an agent can tell which tool handles a metadata correction versus a content rewrite.

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?

Names the triggering situation (correcting mis-stamped tags/source/domain/topic) and the condition to prefer it over alternatives ('without re-ingesting, which would either duplicate or rely on similarity dedupe'). It also routes the re-embedding case to re-ingest with skipDedupe, giving explicit when-not guidance.

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