Skip to main content
Glama
Zifu Memory
by tanbopiao

zifu_assert

Registers a fact with a source pointer from zifu_write, enforcing unique fact IDs and directing changes through zifu_replace to keep memory verifiable.

Instructions

契约1+2:带来源指针登记事实(指针来自 zifu_write 的返回)。同 ID 重复登记是确定性错误;改口走 zifu_replace。

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": {
      "fact_id": "<fact_id>",
      "statement": "<statement>",
      "entity": "<entity>",
      "pointer": "<pointer>"
    },
    "name": "zifu_assert"
  }
}

Input Schema

NameRequiredDescriptionDefault
entityYes
fact_idYes
pointerYes
statementYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses two important behaviors: pointer provenance from zifu_write, and that duplicate fact_id registration is a deterministic error rather than a silent overwrite. It does not state what happens on successful registration or whether facts are immutable, but the output schema covers the return value.

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 two compact sentences that lead with the core action and end with the replacement path. The opening '契约1+2' label is opaque and does not earn its place, but the rest has no 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?

The definition covers the key failure mode and the revision path, and an output schema exists, so return values need not be described. However, 'entity' and the statement parameter are not explained, and success behavior is unstated. For a four-parameter mutation tool with no annotations, that leaves gaps.

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% across four parameters, so the description must compensate. It explains the pointer's origin and the uniqueness semantics of fact_id, and it implies that 'statement' is the wording to be revised. It leaves 'entity' entirely unexplained, so the compensation is only partial.

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 states a concrete verb and resource: registering a fact, with a source pointer. It also names sibling zifu_replace as the alternative for revising a statement. The leading label '契约1+2' is unexplained jargon that does not help an agent understand the action.

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?

The description states the precondition for the pointer (it comes from zifu_write's return) and explicitly routes statement changes to zifu_replace. It also warns that re-registering the same ID is a deterministic error. This covers when to use, when not to use, and which sibling to use instead.

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