Skip to main content
Glama
Zifu Memory
by tanbopiao

zifu_inject

Injects a deterministic, budget-capped context payload into an agent session; pass a query to rank stored facts by relevance within a fixed character budget that can be recomputed exactly.

Instructions

契约3:硬预算装配上下文(字符预算,确定性结果,可复算)。query 提供时按文义相关性排序。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "zifu_inject"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNo
budgetNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden, and it does add real behavior: the budget is a hard character budget, the result is deterministic and recomputable, and ordering changes when a query is given. What it omits is whether 'inject' mutates any session state or context window, and what happens when the assembled content exceeds or falls far short of the budget.

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?

Two compact sentences that front-load the budget/determinism guarantee and then the query-dependent ordering. The only weak spot is the '契约3' prefix, which consumes space without transferring meaning to an agent unfamiliar with the contract numbering.

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 return-value documentation is not required, and with only two optional parameters the surface is small. Still, the definition does not say what content is assembled, whether injection has side effects, or how it differs from adjacent tools, leaving gaps an agent must guess at.

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 both parameters — and it does partially: 'budget' is identified as a character budget and 'query' as the relevance-ordering input. It stops short of specifying budget units/range/default behavior or what a null query implies for ordering beyond the stated conditional.

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

Purpose3/5

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

The description states a concrete action — assembling context under a hard character budget with deterministic, recomputable output — which is more specific than the opaque name 'inject'. However, the leading '契约3' (Contract 3) label references an external document an agent may not have, and nothing distinguishes it from siblings like zifu_hybrid or zifu_search that likely also assemble context.

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

Usage Guidelines2/5

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

The only conditional guidance is that when a query is supplied, results are ordered by textual relevance. There is no statement of when to use this versus the many sibling retrieval/assembly tools, no prerequisites, and no exclusions.

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