Skip to main content
Glama

memory_reconcile_apply

Apply batch operations after LLM reconciliation: merge memos, invalidate contradictions, assign quality scores, or promote key insights to directives, with idempotent handling.

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 字、每桶有效 ≤40 条,超限该条返回 error)。

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

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationsYes操作列表(见上)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description fully discloses behavior: each operation type's effect (e.g., merge creates new memo, invalidates old ones; invalidate sets invalid flag; promote enforces red-line constraints), idempotency for repeated invalidate/merge, error handling (unknown op returns error but continues), and side effect of refreshing last_reconcile_at. This is comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (two paragraphs) and well-structured: first sentence states purpose and properties, then bullet-like list details each operation. No redundant text.

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?

Given the tool's complexity (multiple operations with varying parameters, idempotency, error handling, side effects) and the presence of an output schema, the description covers all necessary aspects. It explains every operation, its parameters, error behavior, and side effects.

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?

Schema coverage is 100% but the schema only defines one parameter 'operations' as an array of objects with additionalProperties: true. The description adds detailed semantics for each operation type's fields (op, content, memo_ids, quality_score, reason, scope_path, kind, scope, source_refs), far exceeding baseline. It fully compensates for the schema's minimal definition.

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?

The description clearly states that the tool applies batch operations after LLM judgment confirmation. It lists five specific operation types (merge, invalidate, score, promote, keep/noop), making it distinct from siblings like memory_add or memory_invalidate that handle single operations.

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 implies the tool is used after LLM judgment confirmation (批量执行 LLM 精判确认后的操作). It does not explicitly compare with siblings but the context suggests it follows memory_reconcile_candidates or similar. More explicit when-not-to-use would improve but current clarity is strong.

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