Skip to main content
Glama
Zifu Memory
by tanbopiao

zifu_hybrid

Combines keyword matching and semantic top-k retrieval into one deduplicated set, then applies reader identity for tiered access. Use it to find relevant memory entries by both exact terms and meaning.

Instructions

混合检索:关键词命中 + 文义 top-k 合并去重。reader 自报身份按分级读取。

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": {
      "query": "<query>"
    },
    "name": "zifu_hybrid"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes
top_kNo
readerNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/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. It does add real behavior beyond the schema by noting deduplication of merged results and a clearance-gated read where the reader self-reports identity, which is valuable access-control context. However, it never states what happens when 'reader' is null, whether results are filtered or denied, or how merged results are ordered.

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 short sentences with the retrieval mechanism front-loaded and the access rule second, which mirrors how an agent would evaluate the call. Every clause carries information, though the terse telegraphic style makes meaning harder to extract than a slightly longer plain sentence would.

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 presence of an output schema removes the need to document return values, and the access-control note covers the most unusual behavioral risk. Still, for a three-parameter tool with zero schema coverage and no annotations, the description leaves the caller guessing about parameter shape, ranking order, and null-reader fallback, which is a meaningful gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across three parameters, so the description must compensate and largely does not. 'top_k' is only echoed by 'top-k' with no indication of default behavior or maximum, and 'query' syntax is unaddressed. The 'reader' parameter gets only the vague phrase 'reader 自报身份按分级读取', which hints at an identity/clearance object without describing its shape or required fields.

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 mechanism: hybrid retrieval that merges keyword hits with semantic top-k results and deduplicates them. That mechanism implicitly separates this tool from the pure keyword and pure semantic siblings. It falls short of a 5 because it never names an alternative outright and the phrasing '文义 top-k' is slightly ambiguous about which ranking signal is used.

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?

The hybrid merge implies the use case 'when you want both lexical and semantic recall', but that is inference rather than guidance. There is no explicit statement of when to prefer this over the keyword-oriented or semantic-oriented siblings, and no cost or latency warning for the combined search.

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