Skip to main content
Glama
moton16

Mortis-RAG-MCP

by moton16

kb_import

Restore index cache from a kb_export snapshot after registering the target vault with kb_init. Rejects mismatched embedding models unless force imports text and re-embeds locally.

Instructions

从 kb_export 生成的快照恢复索引缓存(先 kb_init 注册目标目录再调用)。导入后的下一次同步应当 0 次 embedding 调用;快照的向量模型/维度与本机配置不一致时拒绝,除非 force=true(此时只导入文本层并本地重嵌)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo模型/维度不一致时强制导入(仅文本层,向量重算)
snapshotYes必填,快照 zip 文件路径
vault_pathNo可选,已注册知识库的绝对路径;仅注册了一个库时可省略

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full disclosure burden, and it does well: it states the post-import effect (next sync should make 0 embedding calls), the rejection behavior on model/dimension mismatch, and the force=true fallback of importing only the text layer and locally re-embedding. It does not mention whether existing cache data is overwritten or merged, which is a minor gap, but the key behavioral traits are clearly disclosed.

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 two sentences with no filler. It front-loads the core purpose, then packs the prerequisite, expected outcome, and exception behavior into a compact and readable form. Every clause earns its place.

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

Completeness4/5

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

Given no annotations and no output schema, the description supplies the essential context: source of the snapshot, required setup, expected post-import behavior, and the condition under which force is needed. It is complete enough for correct invocation and interpretation. The only minor omission is explicit handling of existing cache data, but that does not block selecting or calling the tool.

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

Parameters4/5

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

Input schema coverage is 100%, so the schema already documents all three parameters. The description adds value by explaining what 'snapshot' should be (an output of kb_export), the prerequisite relationship of vault_path to kb_init, and the semantic consequence of force=true. This goes beyond the schema's field-level descriptions.

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 states a specific action—restoring an index cache from a kb_export-generated snapshot—and clearly differentiates it from sibling tools like kb_export and kb_rebuild. The reference to kb_export as the snapshot source and kb_init as a prerequisite removes ambiguity about what this tool does and how it fits into the workflow.

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 gives explicit usage context: call after registering the target directory with kb_init, and use it to restore cache from a snapshot. It also explains the force=true branch for handling model/dimension mismatches. It does not explicitly name alternatives to avoid, but the prerequisite and behavioral conditions are strong enough for an agent to decide when this tool applies.

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