MCP server for knowledge management, hotspot analysis, and AI agent integration with tools for reading/writing knowledge items, searching, linking, and pipeline management
14 tools with mixed quality. Naming is generally verb-based (score_item, enrich_concept, wiki_search) but some are vague (trigger_codegarden_drift, dsh_session). Descriptions exist for all tools but many are technical jargon-heavy and lack LLM-friendly guidance on WHEN to use them. Input schemas are present with types and constraints (enums, min/max), but output schemas are undocumented. Error handling is minimal, most tools return generic 500 errors without recovery guidance. Security: path traversal mitigations visible in enrich_concept and wiki_read, but no audit logging or permission gates documented.
查 wiki_events 事件对应表 — 一条知识是由哪次采集/哪个 agent 产生的。
DSH classify 任务 (含 LLM fallback)。实现: 调用 /api/dsh/task 内部逻辑, task_type='classify'。
查询 DSH 会话状态。
写入 concepts/{name}.md(MCP tool: enrich_concept)。P4-9: concept_name 白名单校验, 拒绝路径穿越 (../ 等)。
推进单个 item 到下一阶段 (kl_state_machine 校验)。等价于 POST /api/kl/pipeline/advance, input 收紧为必填 item_id。
重试错误任务 (可选按 wiki_id 过滤)。
返回漏斗 + 队列 + 错误 + 计数 (与 /api/kl/pipeline/stats 等价)。
Output schemas undocumented. No tool documents what fields are returned or their types. LLMs cannot plan downstream calls or extract required data for chaining.
Descriptions lack LLM-friendly guidance. Many descriptions are technical (e.g., 'DSH classify 任务 (含 LLM fallback)') without explaining WHEN to use the tool or what problem it solves. Descriptions under 50 chars or in non-English.
Error handling is generic. Tools return HTTPException(500) with minimal context. No recovery guidance, no categorization of retryable vs fatal errors, no invalid-value feedback.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 59 | 2026-07-28+ | v2 |
写入 knowledge_links 表(MCP tool: link_items;SQL 下沉 knowledge_service)。
写入 ai_scores 表(MCP tool: score_item)。写路径经 ``ai_write_back.write_score``(SPEC §1 Task19: ai_scores 写路径仅此门面命中)。
评估 project tech_stack(MCP tool: trigger_codegarden_drift)。Phase 13 实现完整的 tech_stack 评估;当前返回 stub(drift_score=0.0)。
从 concepts/graph.json 取概念邻接 (BFS k=depth)。graph.json 不存在或概念缺失时返回空邻接 (不报错, 方便 agent 探索)。
读取 llm-wiki-2.0 单个 .md 文件全文 (含 frontmatter)。路径白名单校验, 只允许 items|concepts|learning|content|summaries 下的 .md 文件, 禁止路径穿越。
FTS5 全文搜索知识条目 chunks (中文 trigram / ASCII unicode61 / LIKE 回退)。SQL 在 chunk_service.wiki_search_chunks (Batch 2 D 下沉); wiki_path 由本层追加 (wiki 命名空间映射)。
agent 持久产物写回 llm-wiki-2.0 — 经 ai_write_back 单一写路径。md 是真相源: 写 items/{item_id}.md 成功后同步 SQLite 索引, 并在 wiki_events 留 kind=agent_write 痕 (db_trace 可反查)。
Vague tool names reduce discoverability. 'trigger_codegarden_drift' does not clearly convey action; 'dsh_session' is opaque without domain context. Names should start with clear verbs (get_, create_, evaluate_).
No audit logging or permission gates visible. Tools like score_item and wiki_write modify state but lack documented access control, audit trails, or scope declarations.