Skip to main content
Glama
Zifu Memory
by tanbopiao

zifu_write

Writes an experience memory to the append-only store with scope and source controls, then returns the event and source pointer for verifiable recall.

Instructions

写入一条经验记忆。source: internal=体系内部动作(正本完整) / external=外部观测(采样带证据)。 scope 分级: org=人人可读(缺省) / agent=仅该agent / user=仅该user名下 / session=仅该会话。 写入前过紫府闸。返回事件与来源指针(契约1:来源指针先行)。

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": {
      "entity": "<entity>",
      "kind": "<kind>",
      "payload": "<payload>"
    },
    "name": "zifu_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindYes
scopeNoorg
entityYes
sourceNointernal
payloadYes
user_idNo
agent_idNo
session_idNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full disclosure burden, and it does add real behavioral context: a mandatory gate check before the write, a four-level visibility model with documented defaults, and a stated return contract (event plus source pointer). What is still missing is failure behavior (what happens if the gate rejects the write), idempotency/dedup behavior, and permission requirements for agent/user/session scopes.

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 compact and front-loaded: the action first, then the parameter semantics, then the gate prerequisite, then the return contract. Slash-separated enumerations keep the value lists short, and no sentence is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so the return-value sentence is a bonus rather than a necessity. But for an 8-parameter mutation tool with a nested payload object and zero schema coverage, the description leaves important gaps: valid kind values, payload shape expectations, and what '紫府闸' actually checks or how a rejection manifests.

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?

Schema description coverage is 0%, so the description must carry the load, and it does explain the two enumerated-in-prose parameters, source (internal vs external) and scope (org/agent/user/session with org as default), which the schema itself leaves as bare strings. It says nothing about kind, entity, payload, or how user_id/agent_id/session_id relate to the chosen scope, leaving half of the 8 parameters undocumented anywhere.

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 description opens with a concrete verb and resource ('写入一条经验记忆'), which distinguishes it from read-side siblings such as zifu_search, zifu_view, and zifu_events. However, it never names a competing write path such as zifu_replace or zifu_assert, so an agent must infer the boundaries between the write tools.

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?

It explains the meaning of the source and scope values, which implicitly tells the agent what to pass, but it gives no explicit when-to-use/when-not-to-use guidance and no comparison against sibling write tools. The 'pass the zifu gate before writing' line hints at a prerequisite, but its conditions and consequences are not stated.

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