Skip to main content
Glama

memory_reconcile_apply

Batch-applies confirmed memory reconciliation operations—merge, invalidate, score, or promote entries—idempotently and refreshes the project reconcile timestamp.

Instructions

On-demand organization · apply: batch-execute the operations confirmed by the LLM fine judgment (deterministic, idempotent).

Each operation is a dict, dispatched by its op field (an unknown/missing field returns an error for that entry without blocking the rest):

  • merge: {op:"merge", content: the new merged content, memo_ids: [the entries being merged], memo_type?:"summary", scope_path?} — creates a new memo and sets each merged entry invalid, with invalidated_by pointing at the new entry (Zep invalidation semantics, no deletion).

  • invalidate: {op:"invalidate", memo_ids:[...]} — invalidates entry by entry (contradicted/overturned).

  • score: {op:"score", memo_id, quality_score:1-10, reason} — adds a quality score, with reason going into meta.

  • promote: {op:"promote", content, kind:constraint/design/directive/preference, scope?:"project"/global/user, source_refs?:[source memo ids]} — distills and promotes into a direction-layer entry; the red lines apply as usual (a single entry ≤400 characters + bucket character quotas global 1200 / project 1500 / user 300; over the limit, that entry returns an error with usage; the safety scan likewise applies).

  • keep / noop: no action (may be omitted).

Idempotent: repeating invalidate/merge on an already-invalidated entry returns noop without error. After applying, it automatically refreshes the project's last_reconcile_at (the baseline for the volume-threshold soft hint).

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": {
      "operations": "<operations>"
    },
    "name": "memory_reconcile_apply"
  }
}

Input Schema

NameRequiredDescriptionDefault
operationsYesthe operation list, one dict per entry, dispatched by the op field into merge / invalidate / score / promote / keep (see the tool description for each field). One call may mix multiple ops; a single entry's error returns only that entry's error and does not block the rest.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.11.2

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it declares determinism and idempotency, explains that merge invalidates rather than deletes (Zep invalidation semantics), that repeating invalidate/merge on an already-invalidated entry becomes noop, and that a bad op field errors only that entry without blocking the rest. It also discloses the red-line limits (400 chars per entry, 1200/1500/300 bucket quotas) and the safety scan, plus the side effect of refreshing last_reconcile_at.

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?

Information density is high and the purpose is front-loaded before the per-op breakdown, so an agent can scan op types as a bulleted list. It loses a point for ragged formatting: sentences broken mid-clause by hard wraps, stray markdown bold inside the promote bullet, and quota figures split across lines ('global 1200 / project / 1500 / user 300'), which slightly impairs parsing.

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 one-parameter mutation tool with no annotations and an untyped item schema, the description covers everything needed to call it correctly: op dispatch table, optional vs required fields, error isolation, idempotency, quota red lines, and the post-apply state change. Return values are handled by the existing output schema, so nothing material is left implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema's single operations parameter is an untyped array of objects (additionalProperties:true), so the schema alone tells an agent nothing about entry shape. The description supplies the entire per-op contract — field names, memo_type/scope_path optionals, quality_score range, kind and scope enums for promote, source_refs — which is meaning the schema genuinely lacks.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'batch-execute the operations confirmed by the LLM fine judgment (deterministic, idempotent)' on memory entries. An agent understands this is the apply/write step of a reconcile flow. It stops short of 5 because it never names the sibling that produces those operations (memory_reconcile_candidates) or distinguishes itself from memory_invalidate, leaving the routing to inference from 'confirmed by the LLM fine judgment'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Usage is implied rather than stated: 'on-demand' plus 'operations confirmed by the LLM fine judgment' signals this runs after a candidate/judgment step, and 'keep/noop: no action (may be omitted)' hints at how a batch is composed. There is no explicit when-not-to-use, no named alternative for single-entry invalidation, and no prerequisite statement (e.g. must candidates come from memory_reconcile_candidates first?).

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