Skip to main content
Glama

memory_reconcile_apply

Apply confirmed memory reconciliation operations in batch—merge, invalidate, score, or promote memos with idempotent, error-isolated execution. Each operation is dispatched by type, and failures in one entry don't block the rest.

Instructions

按需整理·应用:批量执行 LLM 精判确认后的操作(确定性,幂等)。

每条操作是一个 dict,按 op 字段分派(未知/缺字段返回 error,不阻断其余):

  • merge:{op:"merge", content:合并后新内容, memo_ids:[被并各条], memo_type?:"summary", scope_path?} —— 建新 memo,把被并各条置 invalid、 invalidated_by 指向新条(Zep 失效语义不删除)。

  • invalidate:{op:"invalidate", memo_ids:[...]} —— 逐条失效(矛盾/被推翻)。

  • score:{op:"score", memo_id, quality_score:1-10, reason} —— 补质量分, reason 入 meta。

  • promote:{op:"promote", content, kind:constraint/design/directive/preference, scope?:"project"/global/user, source_refs?:[源 memo id]} —— 蒸馏提升为方向层 条目;红线照常生效(单条 ≤400 字 + 桶字符配额 global 1200 / project 1500 / user 300,超限该条返回 error 带用量;安全扫描同样生效)。

  • keep / noop:不动(可省略)。

幂等:对已失效条目重复 invalidate/merge 返回 noop 不报错。应用后自动刷新 项目 last_reconcile_at(量阈软提示的基线)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationsYes操作列表,每条一个 dict,按 op 字段分派为 merge / invalidate / score / promote / keep(各字段见工具说明)。 一次可混装多种 op;单条出错只返回该条 error,不阻断其余。

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With zero annotations provided, the description carries the full burden and does so thoroughly. It discloses: unknown/missing op fields return error without blocking others, invalidate/merge on already-invalid items returns noop (idempotency), Zep invalidation semantics (doesn't delete), red-line quota limits (400字 per item, 1200/1500/300 budget by scope), and auto-refresh of last_reconcile_at after application. This is exceptionally detailed behavioral disclosure.

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?

The description is dense and well-structured with clear op-type headers, but is somewhat long. It front-loads the core purpose and dispatches mechanism, then enumerates each op type. Every sentence carries information; there is no filler. It could be slightly tightened but is reasonably efficient given the complexity it must convey.

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?

This is a complex multi-op tool with five operation types, idempotency semantics, quota red-lines, and side effects (last_reconcile_at refresh). An output schema exists, so return values need not be described. Given the absence of annotations and the complexity, the description is remarkably complete — covering failure isolation, idempotency, quota limits, invalidation semantics, and state refresh.

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?

The single 'operations' parameter is described at 100% schema coverage, so baseline is 3. The description adds substantial value by documenting every op sub-field (merge, invalidate, score, promote, keep) with their exact structures and constraints, which the schema only glosses over as 'additionalProperties: true'. Since the actual sub-structure is only fully documented in the description, it genuinely compensates beyond the minimal baseline.

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?

The title 'memory_reconcile_apply' and description clearly state this batch-executes LLM-confirmed memory operations with deterministic, idempotent behavior. It distinguishes itself from siblings like memory_reconcile_candidates (which would generate candidates) and memory_invalidate (single-op) by being the batch-apply executor. However, the connection to 'LLM精判确认后' presumes a pipeline context not fully explicit.

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

Usage Guidelines4/5

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

The description specifies when to use this tool (after LLM confirmation, batch executing operations) and details each op type with clear semantics. It notes idempotent behavior and the edge case of red-line quota enforcement for promote. However, it doesn't explicitly name alternatives or state 'do not use when X', relying on implied pipeline context rather than explicit exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CronusL-1141/AI-company'

If you have feedback or need assistance with the MCP directory API, please join our Discord server