Skip to main content
Glama

kb_export

Export a knowledge base to JSON for backup, migration, or inspection, optionally including vector embeddings, or return the JSON directly when no path is provided.

Instructions

导出知识库为 JSON。

Args: path: 导出文件路径(必须在知识库目录内);留空则直接返回 JSON。 include_embeddings: 是否包含向量数据。

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": "kb_export"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo
include_embeddingsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the full disclosure burden. It adds one useful constraint, that path must be inside the knowledge-base directory, and it distinguishes the two output modes (file vs. inline JSON). It does not say whether an existing file is overwritten, what permissions are needed, how large exports get, or what happens on error. Since there are no safety annotations to lean on, those gaps are material.

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 purpose sentence is front-loaded and precise, and the Args block covers exactly the two parameters with no filler. Nothing restates the name or adds useless prose.

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?

Because an output schema exists, the description needn't explain return values, and both parameters are covered. For a tool that writes a file with zero annotations, however, it should state overwrite/replace behavior and any size or embedding-volume caveats, which it does not.

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?

Schema description coverage is 0%, so the description must compensate, and it does: it explains that an empty path returns JSON directly and that a non-empty path must be within the KB directory, and it explains what include_embeddings controls. Only the format of path (absolute vs. relative) is left ambiguous.

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 gives a specific verb+resource: export the knowledge base as JSON. That is clearly distinct from the read/list siblings (kb_list, kb_get, kb_search). Differentiation is implicit rather than stated (no sibling is named).

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 description implies when to use the tool (dump the KB, either to a file or inline), and the path rule hints at a file-output branch and an inline-return branch. However, it never says when to choose this tool over kb_list, kb_get, or fs_write, and it gives no stated exclusions.

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