Skip to main content
Glama
ZornZL
by ZornZL

feishu-kb-agent

CI License: MIT

用 DeepSeek(DeepSeek Harness / 任意 MCP 客户端)管理你的个人飞书知识库。 不是「让 AI 随便改文档」,而是把知识库当成一个有规则的系统:写入可审计、重复会被拦、删除必须过人。

一切设计只服务四件事:可检索、可回指、可重建、可增改查。 做不到这四件事的功能,一律不做。


它解决什么问题

飞书知识库有三个硬约束,直接决定了「AI 该怎么操作它」:

约束

后果

本项目的做法

wiki 是严格树,一个节点一个父节点

一条内容不能有两个「家」

树只管存放与权限;分类靠定位头与地图页

平台搜索是黑盒,且不覆盖个人版全部内容

检索不可控

本地 SQLite FTS5 索引(中文二元组 + 标题加权)

docx 没有公开的版本 API

「只追加」无法只靠飞书实现

每次写入前把正文镜像存本地台账,可回滚

所以这个项目不是把四个 API 包一层,而是补上飞书缺的三样东西:索引、规则、审计。

Related MCP server: ai-wiki-mcp

能力

模型通过 MCP 看到 12 个强类型工具:

工具

作用

关键约束

kb_status

连接、索引、待办状态

—

kb_search

全库检索,返回片段与链接

标题权重 ×10,中文二元组

kb_read

实时读取正文与定位头

永远读飞书,不读缓存

kb_outline

目录树

只读,用于「我都记了什么」

kb_create

新建页面

幂等:同内容/同标题不重复建

kb_append

末尾追加

只追加,不改原文;重复段落自动跳过

kb_replace_text

字面替换

唯一会改原文的工具;先存镜像

kb_rename

改标题

旧标题保留为检索别名,链接不变

kb_move

移动节点

node_token 不变,禁止移进自己的子孙

kb_propose_delete

发起删除提案

模型没有删除能力,只能提案

kb_sync

同步索引

增量优先,full 可重建

kb_audit

体检与结构建议

重复页、空页、深度/宽度、目录阈值

人用的命令行补齐了模型不该有的能力:init、doctor、login、delete --confirm、restore、export、eval。

3 分钟跑起来

# 1) 安装(任选其一)
uv tool install git+https://github.com/ZornZL/feishu-kb-agent
# 或
pipx install git+https://github.com/ZornZL/feishu-kb-agent
# 2) 初始化:填飞书自建应用的 App ID / Secret 和知识库入口页链接
feishu-kb init

# 3) 体检:逐项验证权限,失败会直接告诉你去点哪里
feishu-kb doctor

# 4) 建索引
feishu-kb sync

飞书应用怎么建、要开哪些权限、怎么把应用加进知识库:见 飞书配置。

权限通了之后,跑一次真实验收(会创建一页测试页,默认只生成删除提案、不删除):

python scripts/acceptance.py

它依次验证:实时连通 → 同步 → 创建 → 立即可检索 → 追加 → 读回 → 定位头 → 删除提案。

想用「自己的飞书账号」而不是应用身份(更接近“每个人用自己的账号登录”):

feishu-kb init --auth-mode user
feishu-kb login

接进 DeepSeek Harness

在 ~/.dsh/cordis.patch.yml 里加一条(Windows 把 command 换成 feishu-kb-mcp.exe 的绝对路径):

- insert:
    - id: feishu-kb
      name: "@deepseek-ai/dsh-mcp-client"
      config:
        serverName: feishu_kb
        transport: stdio
        command: feishu-kb-mcp
        args: []

重启 Harness,工具会以 mcp__feishu_kb__kb_search 这样的名字出现。完整说明与排错见 DSH 接入。

为什么这样设计

写入只追加,不覆盖

飞书没有版本 API,整篇覆盖等于「把历史删了再写一份」:审计断裂、样式丢失、并发时互相踩。 所以 kb_append 是默认写入方式,kb_replace_text 只用于纠错,且写入前会把原文镜像进本地台账(feishu-kb restore 可回滚)。

删除是人的权力,不是模型的能力

模型 kb_propose_delete → 一次性提案号(24h 过期)
        ↓ 人在本机
feishu-kb delete --confirm <提案号> → 再输入 DELETE → 删除 + 墓碑

工具面里没有 delete,不是靠提示词约束模型,而是能力边界。

目录要「长」出来

不按学科建目录,只按用途建;同类页面 ≥5 才建议建,长期 <3 页建议并。 kb_audit 会按阈值给建议,而不是自动搬树——结构调整必须有人拍板。

完整规则判定(哪些吸收、哪些剔除、为什么):规则取舍。 CRUD 的完整契约与失败模式:CRUD 设计。

文档

文档

内容

飞书配置

建应用、开权限、发布版本、把应用加进知识库

DSH 接入

MCP 配置、验证、排错

规则取舍

两份参考文档里哪些规则吸收、哪些剔除

CRUD 设计

增删改查的契约、幂等、失败模式

架构

分层、数据流、不变量、选型理由

演进

知识库变大后,先改什么、后加什么

分享给别人用

这是一人一库的工具,不是多人共用一个知识库的 SaaS:

  • 每个人 clone 后填自己的飞书应用凭据与知识库链接;

  • 配置与索引只存在本机 ~/.feishu-kb/,不进 Git;

  • 用 user 模式时,权限就是这个人自己的,不需要把应用加成知识库成员;

  • 不做中央服务器,也就没有「谁的密钥放在服务端」的问题。

项目结构

feishu_kb/
  config.py      配置解析(env / .env / ~/.feishu-kb)
  client.py      飞书 HTTP 客户端(令牌缓存、重试、错误翻译)
  wiki.py        知识空间节点:树、建、改名、移动、删
  docx.py        文档块 ↔ Markdown
  rules.py       定位头、命名、查重、目录阈值
  store.py       SQLite 索引 + 修订台账 + 删除提案
  service.py     业务操作(供 MCP 与 CLI 共用)
  auth.py        飞书账号 OAuth(user_access_token)
  mcp_server.py  MCP stdio 服务器
  cli.py         命令行
tests/           单元测试 + 假飞书端到端 + MCP 握手
docs/            飞书配置、DSH 接入、规则取舍、CRUD 设计

已知限制

  • 只索引与编辑 docx;表格、思维导图、多维表格只能给链接。

  • 图片/附件不进索引(飞书 docx 的 image 块没有可检索文本)。

  • 中文检索用二元组,不做同义词扩展;专有名词全称/缩写要各写一次。

  • 单机单进程假设:没有多人并发写同一页的冲突合并。

  • 飞书接口限流约 100 次/分钟,首次全量同步大库会慢。

Roadmap

  • 引用回指:回答时返回 (node_token, block_id, 片段),支持点击定位

  • 关系提议队列:supports / contradicts / refines 先提案后落库

  • kb_audit 的趋势报告(周环比)

  • 图片 OCR 与图注生成

  • 可选的本地向量召回(SQLite 扩展,零服务)

License

MIT

Available Tools

12 tools
kb_appendA

在页面末尾追加内容(不改写原文),自动加时间与原因戳,并记录修订前镜像。

Args: node_token: 目标页面。 markdown: 要追加的 Markdown。 reason: 为什么追加(会写进页面与审计台账)。

NameRequiredDescriptionDefault
reasonNo
markdownYes
node_tokenYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that timestamps and reason stamps are auto-inserted and that a pre-revision mirror is recorded (audit side effect), and that existing text is preserved. It omits permission requirements and whether appends are idempotent, but the key side effects are surfaced.

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 behavioral contract is front-loaded in the first sentence, with parameters documented compactly below. The Args block is slightly verbose but every line carries information; nothing is redundant with the schema titles.

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?

For a 3-parameter mutation tool with no annotations, the description covers the side effects (timestamp/reason stamp, revision mirror) that an agent needs before writing. An output schema exists, so return values needn't be explained; only permission/auth context is arguably missing.

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 coverage is 0%, so the description must compensate, and it does: each of the three parameters is given meaning beyond its schema title — node_token as the target page, markdown as the content to append, and reason as the rationale written into both the page and the audit ledger. It doesn't note that reason is optional (default empty), which keeps it from a 5.

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?

States a specific verb and resource ('在页面末尾追加内容') plus a scope constraint ('不改写原文') that implicitly separates it from kb_replace_text. It doesn't name the sibling tool explicitly, so a 4 rather than a 5.

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?

Usage is implied by 'append without rewriting the original', which tells the agent this is for additive edits rather than replacements. However, no alternatives are named (e.g., kb_replace_text for rewriting) and no when-not conditions or prerequisites are given.

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

kb_auditB

体检:重复页、空页、缺失正文、目录过深过宽,以及按阈值给出的结构建议。

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.3/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 behavioral burden. It usefully discloses what is inspected and that it produces structural suggestions based on thresholds, which is behavior beyond the name. However, it does not state that the operation is read-only (no mutation of the KB), whether thresholds are fixed defaults, whether the run is expensive/slow on large KBs, or whether it has any side effects such as caching.

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?

A single sentence, front-loaded with the overall '体检' framing followed by the concrete check list and then the suggestion output. No filler. It is slightly dense with enumerated items but every clause names a distinct check.

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 values need not be explained, and there are no parameters. What remains missing is the behavioral envelope: whether the audit is read-only, whether thresholds are fixed, and how it relates to kb_status for an agent deciding between the two. Adequate but with clear gaps.

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?

The tool takes zero parameters, so the baseline of 4 applies. The description also implicitly explains why there are none by framing the check categories as fixed, though it does not state that thresholds are non-configurable defaults.

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 opens with a clear metaphor ('体检' / health check) and enumerates the concrete checks performed: duplicate pages, empty pages, missing body text, overly deep/wide directory structure. This is specific enough for an agent to know it is a diagnostic/audit operation, distinct from read siblings like kb_read or kb_outline. It stops short of stating the operation in a precise noun+verb form (e.g., 'audit the knowledge base and report structural issues').

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 description does not say when to run an audit versus alternatives such as kb_status (which sounds like a lighter health/state check) or kb_outline. There are no stated preconditions, no exclusions, and no routing to siblings. Use is only implied by the audit vocabulary.

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

kb_createA

新建一页并写入正文。默认幂等:内容或标题与已有页重复时不会创建,而是返回原页。

Args: title: 一句话命题,不要用「杂项」「临时」,不要带两位编号(编号只给一级目录)。 markdown: 正文 Markdown;开头会自动补定位头。 parent_node_token: 父节点 token,留空表示放在入口页下。 type: 类型,笔记/来源/地图/项目/元/目录。 directory: 是否创建目录页(会补「收录判据 / 本目录索引 / 最近更新」三段)。 force: 明确知道要并列第二页时才传 true。

NameRequiredDescriptionDefault
typeNo笔记
forceNo
titleYes
domainNo未分类
sourceNo个人推断
statusNo活跃
markdownNo
maturityNo种子
directoryNo
parent_node_tokenNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.8/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, and it discloses multiple behaviors beyond the schema: idempotent dedupe on title/content, automatic locator header prepending, and the three-section structure injected when directory=true. That is solid, though it omits permission or failure-mode disclosure and says nothing about what the returned page looks like, which the output schema may cover.

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 front-loaded: the core action and idempotency contract come first, then a compact Args block where each line carries a concrete rule. It is appropriately sized for a 10-parameter creation tool, with only minor redundancy in the type enumeration.

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 values need not be explained. However, four metadata parameters (domain, source, status, maturity) with non-obvious defaults are documented nowhere, leaving an agent unable to reason about them. That is a real completeness gap for a tool with 10 parameters and no annotations.

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 10 parameters, so the description must compensate. It meaningfully documents 6 of them—title authoring rules, markdown header behavior, parent_node_token fallback, type values, directory side effects, and the force escape hatch—but leaves domain, source, status, and maturity totally unexplained, which is a substantial gap.

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 specific verb and resource ('新建一页并写入正文'), which clearly identifies the operation as page creation plus body write, and it distinguishes the tool from kb_append and kb_replace_text by implying it acts on new pages. It does not name those siblings explicitly, so it does not reach the level of a 5.

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 clear context: default idempotency so duplicate title or content returns the existing page, and 'force' only when you knowingly want a parallel second page. It does not explicitly route to alternatives, for example to kb_append for adding content to an existing page, so a 4 rather than a 5 is appropriate.

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

kb_moveB

把页面移动到另一个父节点下。node_token 不变,旧链接继续有效。

NameRequiredDescriptionDefault
reasonNo
node_tokenYes
target_parent_node_tokenYes

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.1/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 burden, and it does add real value by stating that node_token is preserved and old links remain valid — a stability guarantee not derivable from the schema. However, for a mutation it omits permission requirements, what happens to children of the moved node, and whether moving under a descendant is rejected.

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?

Two short, front-loaded sentences with zero waste — the action comes first, the invariance guarantee second. Nothing could be removed without losing meaning.

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 values need not be explained. But for an unannotated mutation with three parameters at 0% schema coverage, the description leaves gaps around permissions, failure modes, and the 'reason' field.

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%, so the description must compensate; it only clarifies that node_token is unchanged by the operation, leaving target_parent_node_token and especially the optional 'reason' parameter unexplained. Two of three required parameters have no semantic elaboration.

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?

States a specific verb and resource ('把页面移动到另一个父节点下' = move a page under another parent node), which is unambiguous. It does not, however, distinguish itself from siblings like kb_rename or kb_outline, so the agent gets no routing help.

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?

No guidance on when to use this versus alternatives (e.g., kb_rename for name changes, kb_create for new pages), and no prerequisites or exclusions. The agent must infer the context of use entirely.

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

kb_outlineA

查看知识库目录树(默认从入口页开始,最多 3 层),用于回答“我都记了什么”。

Args: parent_node_token: 从哪个节点开始,留空表示配置里的入口页。 depth: 展开层数,1–5。

NameRequiredDescriptionDefault
depthNo
parent_node_tokenNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.6/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 burden, and it does disclose the two most important behavioral traits: the default entry point and a depth cap (default 3, range 1–5). It does not state that the operation is read-only in so many words, nor whether large trees are truncated or paginated beyond the depth limit, which matters for a browsing tool on an unknown-sized corpus.

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?

Purpose and scope are front-loaded in the first sentence, followed by a compact per-argument list; there is no filler. The Args block is slightly redundant in formatting but each line adds information.

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?

An output schema exists, so return shape need not be explained, and both parameters are covered semantically. What is left unaddressed is minor but real: read-only nature and any size/truncation limits on the returned tree.

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 coverage is 0% and neither param has a description in the schema, so the description must compensate, and it does: parent_node_token is defined as the starting node with empty meaning the configured entry page (a semantic the bare default "" does not convey), and depth is given the range 1–5 that the schema omits. Only the token format itself remains unspecified.

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?

"查看知识库目录树" states a specific verb and resource, and adds scope (default starts at the entry page, max 3 levels) plus a concrete use case ("answering what have I written down"). It is implicitly distinguishable from kb_search/kb_read as a structural browse rather than a query or single-page read, but no sibling is named explicitly.

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 phrase "用于回答'我都记了什么'" gives an implied usage context, which is more than nothing. However, it never says when to prefer kb_outline over kb_search or kb_read, nor any exclusions or prerequisites, so routing still requires the agent to infer from tool names.

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

kb_propose_deleteA

发起删除提案(AI 不能直接删除)。返回一次性提案号,必须由人在命令行确认。

NameRequiredDescriptionDefault
reasonYes
node_tokenYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and discloses important behavior: AI cannot directly delete, a one-time proposal number is returned, and human confirmation at the command line is required. It still omits details such as proposal expiry, permissions, or what happens after confirmation.

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 short sentences with no wasted words. The purpose and the critical human-confirmation constraint are front-loaded.

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 values do not need to be explained. However, with no annotations and 0% parameter schema coverage, the description should do more to explain the required node_token and reason parameters, even though the core proposal workflow is covered.

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% for both required parameters, and the description does not explain node_token or reason at all. The overall context hints that these relate to a deletion target and justification, but no parameter-level meaning is added beyond the schema titles.

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 specific verb and resource: initiating a deletion proposal. It also clarifies that AI cannot delete directly, which makes the tool's role distinct from direct mutation, but it does not explicitly compare against sibling tools.

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 this tool is used when a deletion is needed but cannot be performed directly, and that human confirmation is required. It does not state when not to use it or name alternative tools, so the guidance remains implied rather than explicit.

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

kb_readA

读取一页的实时正文(Markdown)、定位头、路径、修订摘要与链接。

Args: node_token: 知识库节点 token,通常来自 kb_search / kb_outline 的返回。

NameRequiredDescriptionDefault
node_tokenYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

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

Since no annotations are provided, the description carries the full burden of context. It is transparent about the *structure* of the returned data, listing specific elements like '修订摘要与链接,' which is valuable behavioral context for a retrieval operation.

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 definition is efficient and concise. The purpose is front-loaded, and the description adds value without being verbose or repetitive of the structured schema definition.

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 that an output schema is expected, the description is highly complete, as it specifies the exact nature of the content (Markdown, metadata points) retrieved. The agent has all the necessary information to attempt a correct invocation.

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?

With a 0% schema description coverage, the description must compensate entirely. It excels here by explicitly defining the 'node_token' as a Knowledge Base node token and providing context on its expected origin, which significantly enhances understanding.

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 is exceptionally clear, using specific verbs to list all retrieved data points: real-time Markdown body, headers, path, revision summary, and links. This distinct list effectively differentiates it from siblings like kb_search.

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?

Usage is implied rather than explicitly stated. While the description explains the required input source (tokens from kb_search/kb_outline), it does not provide explicit guidance on when to use this tool versus when a purely content-based tool should be used.

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

kb_renameB

修改页面标题(标题即命题)。旧标题会保留为检索别名,链接不变。

NameRequiredDescriptionDefault
reasonNo
new_titleYes
node_tokenYes

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.1/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 burden, and it does disclose two meaningful side effects: the old title is retained as a search alias, and existing links remain intact. That is real value beyond the schema. However, it says nothing about permissions, whether the rename is reversible, or what confirmation looks like for a mutation.

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?

Two compact sentences, front-loaded with the action and followed by the non-obvious consequences. Zero wasted text.

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?

Output schema exists, so return values need no explanation, and the two side-effect facts cover the riskiest behavior. But for a 3-parameter mutation with no annotations and zero schema descriptions, leaving node_token and reason undocumented is a real 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 doesn't. It implies a new title is supplied but never explains node_token (the target identifier) or what the optional 'reason' field is for.

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?

States a specific verb+resource: '修改页面标题' (modify page title), and adds the conceptual framing that the title IS the proposition. It's distinguishable from kb_replace_text or kb_move by focusing on the title alone, but it doesn't explicitly name those siblings.

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?

No when-to-use or when-not guidance. The agent must infer that this is the tool for renaming rather than editing body content, and nothing directs it away from kb_replace_text or kb_move for adjacent edits.

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

kb_replace_textA

把页面中一段字面文字替换掉(保留样式)。用于纠错、更新过期数值、修正措辞。

这是唯一会改写原文的工具,用之前必须 kb_read 确认 search 片段准确。

NameRequiredDescriptionDefault
reasonNo
searchYes
replaceYes
node_tokenYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.9/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 behavioral burden. It usefully discloses that this is a mutating rewrite that preserves formatting and that a read-verify step is mandatory, but says nothing about match scope (first occurrence vs all), behavior when the search string is absent, reversibility, or permission requirements.

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?

Three short sentences, front-loaded with the action, then use cases, then the safety precondition. No filler; the prerequisite is placed last so it reads as a gate right before invocation.

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 values need not be described. But for a destructive rewrite with zero annotations and zero schema coverage, the description is thin: it omits match semantics, failure behavior, and the meaning of node_token, all of which an agent needs before mutating a page.

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 compensate and it only partly does: 'search fragment' implies an exact literal match string and 'replace' the substitute text. node_token (which page/node to target) and the optional reason parameter receive no explanation anywhere, leaving half the parameters undocumented.

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?

States a specific verb and resource: replace a literal span of text inside a page while preserving style. It also distinguishes itself from siblings by declaring it is the only tool that rewrites existing original text, so an agent can route between it and kb_append/kb_create without inspecting schemas.

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?

Gives concrete use cases (fixing typos, updating stale values, correcting wording) plus a hard prerequisite: call kb_read first to confirm the search fragment. It does not explicitly say when NOT to use it (e.g. adding new content should go to kb_append), so the exclusion is implied rather than stated.

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

kb_statusA

查看连接状态、索引规模、上次同步时间与待确认的删除提案。任何不确定时先调用它。

Args: probe: 是否实时访问一次飞书,验证权限是否仍然有效(默认只读本地,不发请求)。

NameRequiredDescriptionDefault
probeNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does meaningful work: it discloses that the default path is purely local with no network request, and that probe triggers a live Feishu call to re-validate permissions. It does not describe failure/error behavior or latency cost of the probe, which is the remaining gap for a no-annotation tool.

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?

Two front-loaded sentences state the payload and the routing rule, then a single arg line. Nothing is redundant and the most decision-relevant clause (when unsure, call this first) is placed early.

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

Completeness5/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 values need no explanation, yet the description still previews the four status categories. Combined with the probe semantics and the default no-request behavior, an agent has everything needed to call it correctly.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate, and it does completely: probe is defined as whether to hit Feishu live to verify permission validity, with the default (false) explicitly explained as local-only with no request. That is more than the bare boolean schema conveys.

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?

States a specific verb and resource (查看连接状态/索引规模/上次同步时间/待确认删除提案) and enumerates exactly what the tool reports. That enumeration cleanly separates it from siblings like kb_search, kb_read, kb_audit, and kb_sync, so an agent can pick it without opening the schema.

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?

Gives an explicit routing rule: 任何不确定时先调用它 (call this first whenever uncertain), which is a strong default-selection heuristic for a 12-tool family. It stops short of naming alternatives or exclusions (e.g. when to prefer kb_audit for history), so it is clear but not exhaustive.

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

kb_syncA

把飞书知识库同步到本地索引。日常用增量;结构大改或索引怀疑损坏时用 full。

Args: full: 清空本地索引后重建(不影响飞书内容)。 max_nodes: 本次最多同步多少个节点。

NameRequiredDescriptionDefault
fullNo
max_nodesNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.8/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 disclose behavior by itself. It does disclose the critical risk: full sync clears the local index and rebuilds it without affecting Feishu content, which lets an agent judge the destructive scope. It does not mention permissions, whether the operation blocks or runs for a long time, cost, or what incremental sync actually checks.

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?

It is short and front-loaded: the purpose comes first, the mode selection comes second, and the per-argument notes come last. Each line adds information and none is redundant.

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?

An output schema exists, so the return values need not be explained. The two optional parameters are both documented, and the main hazard of full sync is disclosed. Only the distinction between the incremental and full sync semantics is thin (for example, what incremental sync compares or whether it is safe to re-run).

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 supply the meaning of the parameters, and it does: full is explained, and max_nodes is described as the maximum number of nodes synced this time. However, the relationship between the two is unclear (for example, whether full sync ignores max_nodes), and the default of 2000 is not called out in the prose.

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 specific verb and resource: syncing a Feishu knowledge base into a local index. This clearly separates the tool from read-oriented siblings such as kb_search, kb_read, and kb_status. However, it does not explicitly claim that it differs from every sibling.

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?

It explicitly separates the two modes: use incremental sync for routine work, and use full sync when the structure has changed substantially or the index is suspected to be corrupted ("日常用增量;结构大改或索引怀疑损坏时用 full"). However, it gives no guidance on when to sync at all versus first calling kb_status.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 12 tool updatesv0.1.0
    • First observedkb_append
    • First observedkb_audit
    • First observedkb_create
    • First observedkb_move
    • First observedkb_outline
    • First observedkb_propose_delete
    • First observedkb_read
    • First observedkb_rename
    • First observedkb_replace_text
    • First observedkb_search
    • First observedkb_status
    • First observedkb_sync

TDQS

A3.8/5.0

Scored across 12 tools

Disambiguation5/5

Each tool targets a distinct resource+action: search vs read vs outline for retrieval, create/append/replace_text/rename/move for different write operations, plus status, sync, audit, and a guarded delete proposal. The descriptions make the boundaries between the write tools (append at end vs literal text replacement) explicit, so an agent can reliably choose.

Naming Consistency4/5

All tools share a consistent kb_ prefix and snake_case, mostly following a verb_noun pattern (kb_search, kb_read, kb_create, kb_move, kb_propose_delete). Two tools are noun-style (kb_status, kb_outline), a minor deviation from the verb convention but still readable and predictable.

Tool Count5/5

12 tools is well within the ideal 3-15 range and each maps to a clear responsibility: discovery, reading, authoring, restructuring, maintenance, and safe deletion. Nothing appears redundant or bloated for a knowledge-base server.

Completeness4/5

The surface covers the full lifecycle: search/read/outline for retrieval, create/append/replace/rename/move for updates, guarded delete via proposal, plus sync and audit for maintenance. Minor gaps exist, such as no explicit version-history or batch-read operation, but core workflows are fully supported.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for persistent, compounding markdown wikis maintained by LLMs. Enables incremental knowledge base building with interlinked pages, search, and raw source management.
    27 npm
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides structured search, schema-validated writes, and linting for a markdown knowledge base, enabling agents to operate the wiki over a single streamable-HTTP MCP endpoint.
    1
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    A machine-local, agent-writable knowledge base MCP server that lets coding agents autonomously record and retrieve hard-won operational facts, incidents, and corrections as markdown pages in a git repo, with provenance, talk pages, and search.
    4 npm
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables MCP-capable agents to author, query, and maintain a self-hosted wiki through typed tools backed by SQLite, including full-text search, revisions, links, tags, media, and correction work queues. It supports configurable read, author, and admin tool surfaces for creating, updating, deleting, reviving, and section-editing pages.
    1
    MIT