Skip to main content
Glama

pentest-kb MCP Server

MCP-сервер базы знаний по пентесту. Предоставляет инструменты поиска, добавления, перечисления и другие на основе MCP (Model Context Protocol) для накопления и повторного использования практического опыта тестирования на проникновение.

Какую проблему решает этот проект

Болевые точки:

  • Опыт пентеста разбросан по заметкам, чатам и личной памяти; его сложно искать и повторно использовать. При столкновении с однотипными задачами (например, обход WAF, обход 403) часто приходится искать заново.

  • Агент по умолчанию не имеет доступа к личной базе знаний; отвечая на вопросы по пентесту, он опирается только на общие знания, не имея поддержки практического опыта, и легко даёт поверхностные рекомендации.

  • Опыт невозможно накапливать и применять в разных сценариях; знания, накопленные человеком или командой, сложно систематизировать.

Что решает этот проект:

  • Единообразно накапливает опыт пентеста в базе данных PostgreSQL (Supabase) и хранит его в структурированном виде.

  • Подключает базу знаний к агенту через протокол MCP, позволяя агенту напрямую искать (search_experience), добавлять (add_experience) и получать список (list_all_experiences) записей.

  • Поиск основан на ранжировании по релевантности BM25 (китайская сегментация слов jieba), что точнее простого нечёткого сопоставления.

  • Позволяет агенту в реальных сценариях отвечать на основе личной базы знаний, а не только на общих знаниях.

Related MCP server: AgentBase

Функции

  • search_experience(keyword, tags_filter): ищет в базе знаний на основе ранжирования по релевантности BM25 (только утверждённые записи), поддерживает китайскую сегментацию слов, возвращает Top-10; tags_filter позволяет точно фильтровать по тегам сценария (например, ["WAF绕过"]).

  • add_experience(title, detail, scenario_tags, tool_code, tool_type, status): добавляет запись. status='draft' сохраняет её как черновик, ожидающий утверждения (по умолчанию), status='approved' добавляет напрямую в базу; перед записью автоматически выполняется проверка обезличивания (обнаруживает реальные IP-адреса, домены, учётные данные, AccessKey облачных провайдеров, JWT, закрытые ключи, номера телефонов; при совпадении запись отклоняется).

  • list_all_experiences(limit, offset): постранично выводит заголовки всех утверждённых записей в базе знаний (по умолчанию 50 записей на страницу, максимум 200).

  • find_similar(title, detail): проверка на дубликаты; ищет уже сохранённые записи, похожие на заданное содержимое.

  • get_experience(experience_id): получает полное содержимое записи по id (заголовок, детали, теги, код инструмента, статус и т.д.).

  • update_experience(experience_id, title, detail, scenario_tags, tool_code, tool_type, status): обновляет поля записи (обновляются только переданные поля, остальные остаются без изменений; перед изменением автоматически выполняется проверка обезличивания).

  • list_pending_experiences(): выводит черновики, ожидающие утверждения, и подсказывает для каждого черновика возможные дубликаты уже сохранённых записей.

  • approve_experience(experience_id, merge_with_id): утверждает черновик; если указан merge_with_id, объединяет его с указанной записью (дополняет детали, объединяет теги, заполняет информацию об инструменте) и затем удаляет черновик.

  • reject_experience(experience_id): отклоняет черновик (мягкое удаление: запись сохраняется со статусом rejected, её можно восстановить).

  • delete_experience(experience_id): мягко удаляет утверждённую запись (статус становится deleted, запись не участвует в поиске, её можно восстановить).

  • restore_experience(experience_id): восстанавливает мягко удалённые записи (отклонённый черновик → draft, удалённая запись → approved).

  • list_deleted_experiences(): выводит все мягко удалённые записи (корзину) для восстановления или полной очистки.

  • purge_experiences(days): физически удаляет записи, находящиеся в мягком удалении дольше указанного числа дней (по умолчанию 30 дней, восстановление невозможно, действуйте осторожно).

Накопление опыта и утверждение

Чтобы автоматическое накопление не создавало громоздкого контента и не приводило к утечке конфиденциальной информации, используется процесс «полуавтоматическое накопление + обязательное обезличивание + ручное утверждение»:

实战结束 → Agent 生成经验草稿(status='draft',结构化 + 限长 + 脱敏)
        → 草稿进入待审批状态(不直接入库,不参与检索)
        → 用户审批(list_pending 查看 → approve / reject / merge)
        → 通过后才正式入库(status='approved')

Барьер обезличивания: add_experience перед записью автоматически обнаруживает реальные IP-адреса, домены, email, учётные данные (включая китайские слова «密码/口令/密钥/账号»), AccessKey облачных провайдеров (AWS/Aliyun/Tencent), JWT, блоки закрытых ключей, номера телефонов; при совпадении запись отклоняется и требует замены на заполнители (например, <目标URL>, <目标域名>). Частные, loopback, link-local и другие специальные IP-адреса, а также домены из белого списка (например, example.com) разрешено сохранять.

Барьер проверки дубликатов: при утверждении list_pending_experiences автоматически подсказывает для каждого черновика возможные дубликаты уже сохранённых записей; пользователь может выбрать: пропустить, объединить или всё же добавить.

Прямое добавление vs утверждение черновика: add_experience поддерживает status='approved' для прямого добавления в базу, но только в сценариях ручного подтверждения пользователем; AI-рабочий процесс (см. SKILL.md) во всех случаях требует создавать черновик draft и проходить утверждение, прямое добавление в базу запрещено.

Зависимости

  • Python 3.10+

  • mcp (MCP Python SDK)

  • psycopg2 (драйвер PostgreSQL)

  • jieba (китайская сегментация слов; при запуске автоматически загружает отраслевой словарь pentest_dict.txt из корневого каталога)

  • rank_bm25 (алгоритм поиска BM25)

  • база данных PostgreSQL (например, Supabase)

Установка зависимостей:

pip install -r requirements.txt

Список зависимостей приведён в requirements.txt (диапазоны версий зафиксированы; обратите внимание: mcp должен быть версии 2.x).

Инициализация базы данных

В PostgreSQL (например, Supabase) выполните schema.sql из корневого каталога репозитория (идемпотентный, можно выполнять повторно):

# 方式一:Supabase 控制台 → SQL Editor → 粘贴 schema.sql 内容执行
# 方式二:命令行(需已配置 psql)
psql "$PENTEST_KB_DB_CONNECTION_STRING" -f schema.sql

Структура таблиц приведена ниже (schema.sql — единственный поддерживаемый источник; README больше не дублирует SQL):

Поле

Тип

Описание

id

uuid PK

Первичный ключ, по умолчанию gen_random_uuid()

created_at

timestamptz

Время создания

title

text

Заголовок записи

scenario_tags

jsonb

Массив тегов сценария, например ["WAF绕过","SQL注入"]

experience_detail

text

Детали записи

tool_code

text

Код эксплойта/инструмента

tool_type

text

Тип инструмента, например sqlmap, burp

status

text

approved (утверждено) / draft (черновик на утверждении) / rejected (отклонено, мягко удалено) / deleted (мягко удалено)

deleted_at

timestamptz

Время мягкого удаления (записывается для rejected/deleted, используется для очистки по сроку хранения)

Опционально: колонка для семантического поиска (в текущем коде не используется, зарезервировано) Чтобы подключить векторный семантический поиск, раскомментируйте код в конце schema.sql и выполните его (предварительно нужно включить расширение pgvector).

Конфигурация

Данные для подключения к базе данных передаются через переменные окружения; не зашивайте учётные данные в код:

Переменная окружения

Описание

PENTEST_KB_DB_HOST

Адрес хоста базы данных

PENTEST_KB_DB_PORT

Порт (по умолчанию 5432)

PENTEST_KB_DB_NAME

Имя базы данных (по умолчанию postgres)

PENTEST_KB_DB_USER

Имя пользователя базы данных

PENTEST_KB_DB_PASSWORD

Пароль базы данных

PENTEST_KB_DB_MAXCONN

Максимальное число соединений в пуле (опционально, по умолчанию 10)

Конфигурация MCP-клиента

Зарегистрируйте сервер в MCP-клиенте, руководствуясь mcp.example.json:

{
  "mcpServers": {
    "pentest-kb": {
      "command": "python",
      "args": ["/absolute/path/to/pentest_kb_mcp.py"],
      "env": {
        "PENTEST_KB_DB_HOST": "your-supabase-host.pooler.supabase.com",
        "PENTEST_KB_DB_PORT": "5432",
        "PENTEST_KB_DB_NAME": "postgres",
        "PENTEST_KB_DB_USER": "postgres.your-project-ref",
        "PENTEST_KB_DB_PASSWORD": "your-database-password"
      }
    }
  }
}

Использование

Вызывайте инструменты в MCP-клиенте, например:

搜索:search_experience(keyword="WAF绕过")   # BM25 相关性排序
搜索+标签过滤:search_experience(keyword="绕过", tags_filter=["WAF绕过"])   # 只看 WAF 相关
新增(直接入库,仅手动操作):add_experience(title="Nginx 403 绕过", detail="...", scenario_tags=["WAF绕过"], tool_type="burp", status="approved")
新增草稿:add_experience(title="...", detail="...")   # 默认 status='draft',待审批
查重:find_similar(title="...", detail="...")
查看单条:get_experience(experience_id="...")
修改:update_experience(experience_id="...", detail="...")   # 只更新传入字段
查看草稿:list_pending_experiences()
审批:approve_experience(experience_id="...")   # 或 merge_with_id 合并
拒绝:reject_experience(experience_id="...")   # 软删除,可恢复
删除:delete_experience(experience_id="...")   # 软删除已审批经验
恢复:restore_experience(experience_id="...")
回收站:list_deleted_experiences()
清理:purge_experiences(days=30)   # 物理删除超期软删记录
列出:list_all_experiences(limit=50, offset=0)   # 分页

Оформление в виде Skill

Упаковано в виде пользовательского Skill; файл находится в корневом каталоге проекта SKILL.md и организован по процессу выполнения в шесть этапов:

  • Этап 1: Определение намерения

  • Этап 2: Приоритетный сбор информации

  • Этап 3: Запуск поиска по базе знаний

  • Этап 4: Цитирование результатов и ответ

  • Этап 5: Правила выполнения и исключений

  • Этап 6: Накопление опыта

Поместите SKILL.md в каталог пользовательских Skill, и он будет загружен.

Примечания по безопасности

  • Учётные данные базы данных передаются только через переменные окружения; в репозитории нет никакой реальной информации для подключения.

  • Регулярно меняйте пароль базы данных и избегайте использования слабых паролей.

Available Tools

13 tools
add_experienceB

往经验库中新增一条渗透测试经验。 参数: title: 经验标题,如 'Nginx 403 绕过' detail: 详细描述,包括漏洞类型、利用过程、关键payload等 scenario_tags: 场景标签列表(可选),如 ['WAF绕过', 'SQL注入'] tool_code: 利用/工具代码(可选) tool_type: 工具类型(可选),如 'sqlmap'、'burp' status: 'draft'(存为待审批草稿,默认)或 'approved'(直接入库)

NameRequiredDescriptionDefault
titleYes
detailYes
statusNodraft
tool_codeNo
tool_typeNo
scenario_tagsNo

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior3/5

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

没有注释,因此描述承担全部责任。它确实披露了一个真实的行为特征:status='draft' 会存储为待审批草稿,而 'approved' 直接入库,这暗示了审批工作流。但未提及权限、去重处理或非标输入会发生什么。

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?

前置一句话说明目的,然后是紧凑的参数列表。没有冗余,编辑得干净利落,尽管格式为简单的列表语法而非行文说明。

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?

存在输出架构,因此无需解释返回值。描述涵盖了目的、所有参数及审批工作流。主要缺口是缺少使用指南,说明何时新建记录与更新现有记录,这对于创建工具来说是合理的遗漏。

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?

架构描述覆盖率为 0%,因此描述必须弥补。它确实为全部六个参数提供了含义和示例(例如 title 'Nginx 403 绕过'、scenario_tags ['WAF绕过','SQL注入']),并明确了 status 的枚举值。tool_code 和 tool_type 的描述较为简短,但足够。

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?

明确说明具体动词+资源:将一条渗透测试经验添加到经验库。与 list_/search_/update_ 等同级工具明确区分。但是,仅凭类型名称没有明确排除或与 update_experience 进行对比。

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?

没有说明何时选择此工具而不是 update_experience 或 approve_experience 等替代工具。仅隐含表示这是创建路径。完全没有前提条件或排除条件。

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

approve_experienceB

审批通过一条待审批草稿。 参数: experience_id: 草稿的 id merge_with_id: 可选。提供时,将草稿内容合并进指定记录(详情追加、标签合并、工具信息补全),然后删除草稿

NameRequiredDescriptionDefault
experience_idYes
merge_with_idNo

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.4/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. It usefully discloses that merge_with_id appends details, merges tags, completes tool info, and then deletes the draft. However, it omits permission requirements and what happens to the draft when merge_with_id is not provided.

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 compact and front-loaded: purpose first, then parameters. Every sentence adds information without redundancy.

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?

Given no annotations and a mutation/approval tool, the description should explain more about auth requirements and the non-merge approval outcome. It covers the merge path well, and an output schema exists, but key behavioral gaps remain.

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. It documents both parameters: experience_id as the draft id, and merge_with_id as optional with detailed merge-and-delete semantics. The coverage is good, though experience_id is described only minimally.

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: approving a pending draft. It clearly identifies the action but does not explicitly differentiate itself from siblings such as reject_experience or update_experience.

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?

There is no explicit guidance on when to approve versus reject or update, nor when to use merge_with_id versus leaving it unset. The merge behavior is described, but no conditions or alternatives are given.

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

delete_experienceA

软删除一条已审批经验(状态置为 deleted,不参与检索,可恢复)。 参数: experience_id: 经验的 id

NameRequiredDescriptionDefault
experience_idYes

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 does well: it discloses the mechanism (status change, not physical deletion), the side effect (excluded from retrieval), and reversibility. It omits permission/authorization requirements and whether the operation is idempotent or errors on unknown/already-deleted ids.

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?

Very short and front-loaded, with the behavioral substance in the first clause. The parameter line is redundant with the schema but minimally costs space.

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 values need not be described, and the description covers the key mutation semantics (soft delete, retrieval exclusion, recoverability) and the '已审批' scope. It stops short of stating who may delete or how non-approved experiences are handled.

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 the single parameter, and the description only restates the parameter name ('经验的 id' vs. title 'Experience Id'), adding no format, constraint, or sourcing guidance. It fails to compensate for the coverage gap, though the field is largely self-evident.

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 the crucial qualifier 'soft delete' (软删除) with the resulting state (status set to deleted). The 'soft' qualifier implicitly distinguishes it from purge_experiences (hard delete) and restore_experience, though neither 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?

Usage is implied: soft-delete an approved experience while keeping it recoverable, with the recovery hint pointing toward restore_experience. However, no alternative is named and no when-not-to-use guidance (e.g., use purge_experiences for permanent removal) is given.

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

find_similarA

查重:查找与给定标题/详情相似的已入库经验,用于避免重复录入。 参数: title: 待查重的标题 detail: 待查重的详情(可选)

NameRequiredDescriptionDefault
titleYes
detailNo

Output Schema

NameRequiredDescription
resultYes

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 carries the burden. It conveys that this is a lookup over already-stored experiences (implying a safe read), but does not explicitly state read-only behavior, permissions, or result limits. An output schema exists, so return format need not be described.

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?

Short, front-loaded with the '查重' purpose, then parameter explanations. No wasted sentences; the structure is a clean purpose-plus-params block.

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 small two-param read-style lookup with an existing output schema, the definition covers purpose and parameters adequately. The main gap is the absence of any explicit behavioral/permission context, which is minor given the read nature.

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. It documents both params — title as the item to check and detail as optional — giving enough meaning to invoke correctly, though it adds little syntactic detail.

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+resource: 'find stored experiences similar to a given title/detail' with a clear dedup framing ('查重'). It is distinguishable from generic search by naming its purpose (avoid duplicate entry), though it does not explicitly name search_experience as the sibling it differs from.

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?

'用于避免重复录入' implies when to use it — before adding an experience — but no explicit when-not or named alternative (e.g., search_experience) is given. Usage is inferable but not spelled out.

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

get_experienceC

按 id 获取一条经验的完整内容(标题、详情、标签、工具代码、状态等)。 参数: experience_id: 经验的 id

NameRequiredDescriptionDefault
experience_idYes

Output Schema

NameRequiredDescription
resultYes

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden, and it discloses nothing beyond the payload fields. It never states that this is a read-only, non-mutating operation, what happens if the id does not exist, or whether authentication is required.

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 lines, front-loaded with the operation and then the parameter, with no filler. The trailing '参数:' block is slightly redundant given the schema but costs little.

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 the tool is a simple single-required-param fetch. However, for a 13-sibling toolset, the absence of any routing guidance leaves the definition only minimally complete.

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% and the single parameter is documented only as '经验的 id', which merely restates the parameter name. No format, expected source of the id, or distinguishing semantics are added, so the description fails to compensate for the schema 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?

States a specific verb+resource ('按 id 获取一条经验') and enumerates the returned fields (标题、详情、标签、工具代码、状态). It is clear what the tool does, but it never distinguishes itself from siblings like search_experience or list_all_experiences, which an agent could otherwise confuse with a retrieval tool.

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?

There is no explicit when-to-use guidance or mention of alternatives. The phrase '按 id 获取' weakly implies the caller must already have an id, but the description never says to prefer this over search_experience when only a query is available, nor does it state any exclusion.

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

list_all_experiencesA

分页列出经验库中所有已审批记录的标题。 参数: limit: 每页条数(默认 50,最大 200) offset: 偏移量(默认 0)

NameRequiredDescriptionDefault
limitNo
offsetNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.5/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 useful traits: the result set is limited to approved records and returns titles rather than full records, plus it is paginated. It says nothing about auth requirements, ordering, or rate limits, so the disclosure is partial.

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?

One front-loaded purpose sentence followed by a compact parameter block; there is no filler. The parameter lines partially duplicate schema defaults, which is the only minor waste.

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 values need no explanation. For a simple two-parameter read-only list with no annotations, the description covers purpose, scope, pagination, and both parameters adequately; only ordering and auth context are absent.

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. It adds the limit maximum (200) beyond the schema default and restates both defaults, but 'offset' is only glossed as '偏移量(默认 0)', which adds nothing over the parameter name.

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 (paginated list of experience-library records) and narrows the scope to approved records and titles only, which implicitly separates it from list_pending_experiences, list_deleted_experiences, and search_experience. It does not name any sibling explicitly, so it stops short 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the agent can infer 'use this to enumerate all approved entries' versus search_experience for filtering, but the description never states when to prefer this over search_experience or the pending/deleted listers. No exclusions 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.

list_deleted_experiencesA

列出所有软删除的记录(被拒绝的草稿 + 被删除的经验),便于恢复或彻底清理。

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/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. It usefully discloses the scope of results (soft-deleted records, two categories), but omits pagination, ordering, result volume, and an explicit read-only confirmation beyond the verb 'list'.

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?

A single front-loaded sentence with a parenthetical that defines the ambiguous term 'soft-deleted'. No filler; every clause 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 values need not be explained, and the description clarifies which record categories appear. With no annotations, a brief note on ordering or expected volume would make it fully self-sufficient.

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 there is nothing to document and the baseline is 4. Schema description coverage is 100% for the empty object.

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 (列出/list) and resource (soft-deleted records), and goes further by defining the record composition: rejected drafts plus deleted experiences. This lets an agent distinguish it from list_all_experiences and list_pending_experiences, though 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?

'便于恢复或彻底清理' implies the two downstream workflows (restore vs. purge) but never names restore_experience or purge_experiences, which are the actual alternatives an agent should route to. Usage is inferable rather than stated.

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

list_pending_experiencesA

列出待审批的经验草稿,并提示每条草稿可能重复的已入库记录。

NameRequiredDescriptionDefault

No parameters

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.7/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 behavioral disclosure. It describes the output includes duplicate hints, which adds some transparency, but doesn't cover other behavioral aspects like pagination, permissions, or the exact meaning of '待审批'.

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 a single, well-structured sentence that conveys the essential information without any extraneous words. It is front-loaded with the primary action and resource.

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?

The tool is a simple list operation with no parameters and an output schema exists, so the description doesn't need to explain return values. It adequately covers the purpose and includes an additional note about duplicate hints, but misses usage context relative to siblings.

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 zero parameters and no schema to describe, the description needs no parameter information. The baseline score for 0 parameters is 4, and the description does not detract from that.

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 clearly states a specific verb '列出' (list) and resource '待审批的经验草稿' (pending-experience drafts). It also indicates that the output will include duplicate indicators, but does not explicitly differentiate from sibling tools like list_all_experiences or search_experience.

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 does not state when to use this tool versus alternatives like list_all_experiences or search_experience. The purpose is implied by the name and description, but no explicit usage guidelines or exclusions are provided.

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

purge_experiencesA

彻底删除软删除超过指定天数的记录(物理删除,不可恢复,请谨慎)。 参数: days: 保留天数,软删除超过该天数的记录将被物理删除(默认 30)

NameRequiredDescriptionDefault
daysNo

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.9/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 so well: it states the deletion is physical, irreversible ('不可恢复'), and warns for caution, which is the critical behavioral fact for this tool. It stops short of mentioning permissions, batch limits, or whether an in-progress job blocks execution.

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?

Opens with the destructive, irreversible nature of the operation, then documents the single parameter — the highest-priority information is front-loaded and no sentence is wasted.

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 values need not be explained, and for a one-parameter destructive operation the description covers action, irreversibility, and parameter meaning adequately. It could add authorization or scheduling context but nothing essential is 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 explain the sole parameter, and it does: 'days' is the retention window, records soft-deleted beyond it are purged, and the default is 30. That fully documents the parameter even though the schema title 'Days' alone would not.

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?

Specifies a concrete verb (物理删除/purge) and a precise resource scope: records that have already been soft-deleted past a day threshold. This clearly separates it from delete_experience (soft delete) and restore_experience, though it never names those siblings 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?

Usage is implied by the semantics — clean up stale soft-deleted records — and the warning '请谨慎' hints at a destructive maintenance operation, but there is no explicit when-to-use guidance, prerequisites, or named alternative such as restore_experience for records that should not be purged.

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

reject_experienceA

拒绝一条待审批草稿(软删除:记录保留,状态置为 rejected,可恢复)。 参数: experience_id: 草稿的 id

NameRequiredDescriptionDefault
experience_idYes

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.9/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 behavioral burden and does well: it discloses that this is a soft delete, that the record is retained, that status becomes 'rejected', and that the action is recoverable. It omits permission/auth requirements and any side effects on related data, but the mutation semantics are unusually well disclosed.

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 compact lines, front-loaded with the core action and soft-delete semantics, followed by the parameter note. No filler, though the parameter line restates information that is nearly inferable from the property name.

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 values need not be explained. For a single-parameter mutation, the description supplies the essential facts (soft delete, reversible, status outcome). Missing only preconditions such as the draft needing to be in a pending state, which the description does hint at via '待审批'.

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?

One parameter with 0% schema description coverage, so the description must compensate. It explains that experience_id is 'the draft's id', which is a marginal clarification (the schema already names it 'Experience Id'), but adds no format, type, or sourcing detail beyond what the property name implies.

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 verb ('拒绝' = reject) and resource ('待审批草稿' = pending-approval draft) and immediately disambiguates it from hard-delete siblings by declaring it a soft delete with status set to 'rejected'. An agent can distinguish this from approve_experience, delete_experience, and purge_experiences without opening any schema.

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?

Restricting the tool to '待审批草稿' (pending drafts) implies the correct usage context relative to approve_experience, but no sibling is named and no explicit when-not-to-use guidance is given (e.g., 'use delete_experience for permanent removal, restore_experience to undo').

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

restore_experienceB

恢复一条软删除的记录:被拒绝的草稿恢复为 draft,被删除的经验恢复为 approved。 参数: experience_id: 记录的 id

NameRequiredDescriptionDefault
experience_idYes

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 burden, and it does disclose a genuinely useful behavioral trait: the resulting state depends on the record type (rejected → draft, deleted → approved). It still omits permissions, reversibility, and side effects, so it adds real but partial context.

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?

Front-loaded with the action and its outcome, then the parameter list, with no filler. The two-part structure is compact and readable.

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 single-parameter restore tool with an output schema (so return values need no explanation) and no annotations, the description covers the key outcome states adequately. Only auth/permission context is missing.

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 coverage is 0% and the description merely restates the parameter as 'the record's id', which duplicates the schema field's own title 'Experience Id' without adding format, source, or lookup meaning. The agent gains nothing beyond the structured field.

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+resource ('restore a soft-deleted record') and clarifies scope by describing the two cases handled (rejected draft and deleted experience). It implicitly contrasts with the permanent-delete sibling purge_experiences, though it never names an alternative.

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 the phrase 'soft-deleted record' and the two restoration cases, giving the agent enough to know this is the undo path. However, there is no explicit when-to-use/when-not guidance and no mention of purge_experiences or delete_experience as alternatives.

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

search_experienceA

搜索渗透测试经验库(仅已审批记录)。基于 BM25 相关性排序,支持中文分词。 参数: keyword: 搜索关键词,如 'WAF绕过'、'SQL注入'、'403' tags_filter: 场景标签过滤(可选),如 ['WAF绕过'],仅返回包含全部指定标签的记录

NameRequiredDescriptionDefault
keywordYes
tags_filterNo

Output Schema

NameRequiredDescription
resultYes

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 carries the full burden. It does disclose meaningful behavior: results are restricted to approved records and ranked by BM25 with Chinese tokenization. However, it says nothing about result limits, pagination, authentication, or how ranking affects output, leaving key operational traits uncovered.

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?

Front-loaded purpose sentence followed by a compact parameter block; every line carries information. It is well structured, though the parameter list format is slightly redundant with the schema and could be tightened.

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?

With only two parameters, one optional, and an output schema already defining return values, the description covers the core requirements: scope (approved records), ranking basis, and both parameter meanings. The main remaining gap is routing guidance against sibling search/list tools.

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: keyword is explained with concrete examples ('WAF绕过', 'SQL注入', '403') and tags_filter is given clear AND semantics ('仅返回包含全部指定标签的记录'), which the schema does not express. Only the array item type/format remains unstated.

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 (search) and resource (渗透测试经验库 / pen-test experience library) plus an important scope qualifier (only approved records), which separates it from list_pending_experiences and list_deleted_experiences. It does not explicitly name the closest siblings (find_similar, list_all_experiences), so it falls short of full sibling differentiation.

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 the tool is useful (keyword/tag search over approved records) but gives no explicit when-to-use or when-not-to-use guidance relative to alternatives like find_similar or list_all_experiences. Usage must be inferred from the 'search' framing.

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

update_experienceB

更新一条经验的字段(只更新传入的字段,未传字段保持不变)。修改前自动做脱敏校验。 参数: experience_id: 经验的 id title: 新标题(可选) detail: 新详情(可选) scenario_tags: 新标签列表(可选) tool_code: 新工具代码(可选) tool_type: 新工具类型(可选) status: 新状态(可选,approved/draft/rejected/deleted)

NameRequiredDescriptionDefault
titleNo
detailNo
statusNo
tool_codeNo
tool_typeNo
experience_idYes
scenario_tagsNo

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. It does disclose two useful behaviors: partial updates (unsent fields unchanged) and an automatic desensitization/validation step before modification. However, it omits permission requirements, whether a status change via this tool clashes with the status-specific siblings, and how soft-deletion/deleted status behaves, leaving meaningful gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening sentence is well front-loaded and dense with semantics, but the parameter list restates the schema property names and mostly repeats the field titles, adding bulk without proportional value. Restructuring to keep the partial-update guarantee and status enum as the headline, then dropping redundant glosses, would be tighter.

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 needn't be explained, and required/optional parameters are covered. Yet for a mutation tool with zero annotations, zero schema coverage, and four transition-based siblings, the description doesn't say when this tool is preferred over approve/reject/delete/restore, nor what the desensitization check does on failure. Adequate but with clear gaps.

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. It partly does: it enumerates every parameter with a Chinese gloss and, crucially, provides the enum values for status (approved/draft/rejected/deleted) that the schema lacks. But several parameters get tautological glosses ('tool_code: 新工具代码', 'title: 新标题') that add no format, length, or validation detail, so coverage remains incomplete.

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 ('更新一条经验'), and clarifies the partial-update semantics ('只更新传入的字段'). It doesn't explicitly name sibling alternatives like add_experience or the approve/reject list, so it falls short of a 5, but the core purpose is unambiguous.

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-to-use guidance. Given the many status-transition siblings (approve_experience, reject_experience, delete_experience, restore_experience), an agent can't tell whether to use this generic updater or the dedicated status tools. The precondition of running a desensitization check is mentioned but not framed as usage guidance.

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. 13 tool updatesv0.1.0
    • First observedadd_experience
    • First observedapprove_experience
    • First observeddelete_experience
    • First observedfind_similar
    • First observedget_experience
    • First observedlist_all_experiences
    • First observedlist_deleted_experiences
    • First observedlist_pending_experiences
    • First observedpurge_experiences
    • First observedreject_experience
    • First observedrestore_experience
    • First observedsearch_experience
    • First observedupdate_experience

TDQS

A3.7/5.0

Scored across 13 tools

Disambiguation4/5

Most tools have clearly distinct purposes: the three list_* tools are scoped by status (all/pending/deleted), and search vs. list vs. find_similar are distinguishable. However, update_experience can also set status to approved/rejected, overlapping with the dedicated approve_experience and reject_experience tools, and the delete/reject/purge triad requires careful reading to tell apart.

Naming Consistency5/5

All 13 tools follow a consistent snake_case verb_noun pattern (list_*, get_*, add_*, update_*, delete_*, restore_*, approve_*, reject_*, search_experience, find_similar, purge_experiences). No convention mixing.

Tool Count5/5

13 tools is well-scoped for a knowledge base with CRUD, search, moderation workflow, dedup, and soft-delete lifecycle. Each tool earns its place with a distinct role.

Completeness5/5

Full lifecycle is covered: create/add, get, update, search, paginated listing, approval/rejection moderation, dedup checking, soft-delete, restore, and physical purge. No obvious dead ends for the stated domain.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides AI agents with persistent knowledge storage, enabling them to store, search, and retrieve text, documents, and files using semantic and keyword search via MCP tools.
    32
    Apache 2.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to persistently store and semantically search shared knowledge via MCP tools.
    2
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to query and manage a document knowledge base via MCP, with RAG-powered search and grounded answers with citations.
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    A knowledge base MCP server that aggregates team knowledge from multiple sources into Postgres. It provides hybrid search (full-text + vector + RRF) via MCP tools, and enables direct recording of decisions, learnings, and pitfalls.
    15
    1
    MIT