Skip to main content
Glama
WayneLiu519888

Test Impact Analysis MCP Server

🌐 Language / 语言 / 語言: English | 简体中文 | 繁體中文 | 日本語

我想...

看这里

快速把项目跑起来

🚀 快速开始

了解能做什么

🎯 项目定位

看有哪些工具可用

🛠️ 5 个 MCP 工具

接入外部分析引擎

🔬 分析引擎集成

配置 Claude Code / OpenCode

📥 安装方式

看完整设计蓝图

.claude/plans/ultimate-blueprint-v3.md


📦 包含内容

分类

内容

说明

🛠️ MCP 工具

repo_monitor / repo_clone / impact_analysis / test_recommendation / risk_assessment

5 个工具

🔌 Transport 双模

stdio(本地零配置)/ http(远程 IP 白名单)

双模

🌐 平台适配器

GitHub / Local / Generic REST API

3 种平台

🔬 分析引擎

codebase-memory-mcp(158 语言静态分析,方法级调用链)

1 个引擎

📊 影响分析

glob 规则匹配 + BFS 调用链追踪 + 四级置信度

Phase 2-4

🔒 安全分层

源码层(提交GitHub) ↔ 企业配置层(.gitignore)

双层

从初始 7 个工具合并为 3 个(精简 57%),Phase 2-4 新增 2 个分析工具(5 个)。安全认证从两层(API KEY + IP)精简为一层(IP 白名单)。简单、实用、免维护。


Related MCP server: testing-mcp

🎯 项目定位

┌──────────────────────────────────────────────────────┐
│ Claude Code / OpenCode / Codex (Host)                │
│  ├─ CronCreate → 定时触发 repo_monitor               │
│  ├─ /repo_xxx 斜杠命令 → 快捷操控                    │
│  └─ MCP Client (stdio / http transport)               │
└─────────┬──────────────┬──────────────────────────────┘
          │ stdio (本地)  │ http (远程)
┌─────────▼────────┐ ┌──▼───────────────────────────────┐
│ 直接进程通信      │ │ Express App (port 3100)          │
│ (零配置)          │ │  └─ IP 白名单 → 通过/403         │
│ 直接执行 git clone │ └──────────────────────────────────┘
└──────────────────┘

┌──────────────────────────────────────────────────────┐
│ TIA MCP Server                                       │
│                                                      │
│  ┌─────────────────────────────────────────────┐     │
│  │ 模块 1: Git Monitor                          │     │
│  │ repo_monitor + repo_clone                   │     │
│  │ GitHub / Local / Generic 三平台适配           │     │
│  └─────────────────────────────────────────────┘     │
│  ┌─────────────────────────────────────────────┐     │
│  │ 模块 2: Impact Analysis + 引擎增强            │     │
│  │ impact_analysis + codebase-memory-mcp        │     │
│  │ BFS 调用链逆向追踪 + glob 文件级兜底          │     │
│  └─────────────────────────────────────────────┘     │
│  ┌─────────────────────────────────────────────┐     │
│  │ 模块 3: Test Recommendation                  │     │
│  │ test_recommendation                         │     │
│  │ 推荐分 = 风险权重 × 置信度                    │     │
│  └─────────────────────────────────────────────┘     │
│  ┌─────────────────────────────────────────────┐     │
│  │ 模块 4: Risk Assessment                      │     │
│  │ risk_assessment                             │     │
│  │ 文件+模块+置信度 三维评分 (0-100)             │     │
│  └─────────────────────────────────────────────┘     │
└──────────────────────────────────────────────────────┘

🚀 快速开始

1️⃣ 克隆并安装

git clone git@github.com:WayneLiu519888/Test-Impact-Analysis-MCP.git
cd Test-Impact-Analysis-MCP
npm install          # 自动安装 git hooks

2️⃣ 配置你的仓库

cp examples/monitors.conf.example.json enterprise/monitors.conf.json
vim enterprise/monitors.conf.json   # 填入你要监控的仓库

3️⃣ 配置 MCP 连接

Stdio 本地模式(零配置):

// .claude/settings.local.json
{ "enabledMcpjsonServers": ["test-impact-analysis"] }

HTTP 远程模式(需先配置 IP 白名单):

{
  "mcpServers": {
    "test-impact-analysis": {
      "type": "http",
      "url": "http://your-server:3100/mcp"
    }
  }
}

4️⃣ 开始使用

/repo_status                              # 查看仓库水位
/repo_check module=用户中心                # 检查新提交
/repo_clone full module=用户中心           # 克隆代码
impact_analysis(name="backend")           # 变更影响分析
test_recommendation(name="backend")       # 测试推荐
risk_assessment(name="backend")           # 风险评估

完成! 代码变更自动感知 + 增量代码拉取 + 精准测试影响分析。


🛠️ 5 个 MCP 工具

我想...

使用此工具

说明

查看/检查/重置仓库水位

repo_monitor

三合一:action=status|check|reset,支持 name/module 筛选

克隆代码到本地

repo_clone

全量(mode=full)/ 增量 MR(mode=incremental),按 repoType 自动存储

分析变更对测试的影响

impact_analysis

glob 规则匹配 + 引擎调用链追踪 + 自动推断

推荐测试执行顺序

test_recommendation

推荐分 = 风险权重 × 置信度,生成最小可行测试集

评估变更风险

risk_assessment

文件+模块+置信度三维评分 (0-100),含缓解建议

所有 5 个工具在 stdio 和 HTTP 模式下均可用。


🔬 分析引擎集成

TIA 支持接入外部代码静态分析引擎,提供方法级精确调用链分析能力。首个支持的引擎是 codebase-memory-mcp

codebase-memory-mcp 引擎

单一静态二进制(~36MB),基于 tree-sitter 支持 158 种编程语言,零运行时依赖。

# 安装(PowerShell,3 步)
mkdir D:\0_WayneArchiveFiles\MCP-Servers\codebase-memory-mcp
curl -o "$env:TEMP\cbm.zip" "https://github.com/DeusData/codebase-memory-mcp/releases/latest/download/codebase-memory-mcp-windows-amd64.zip"
Expand-Archive "$env:TEMP\cbm.zip" D:\0_WayneArchiveFiles\MCP-Servers\codebase-memory-mcp
.\codebase-memory-mcp.exe --version    # → codebase-memory-mcp 0.8.1

# 启用引擎
# 编辑 engines.conf.json → "enabled": true

工作流程

impact_analysis 调用
  └─ .java/.ts/.py 等 → codebase-memory-mcp CLI 子进程
      ├─ index_repository    → 索引代码到本地 SQLite
      ├─ get_architecture    → 提取方法/入口点
      ├─ query_graph         → 提取全部 CALLS 调用边
      └─ 翻译为 PanoramaIndex → BFS 调用链逆向遍历
          └─ 合并到 TIA 影响分析报告

✅ 代码分析 100% 本地 | 🔌 引擎不可用时静默降级到 glob 匹配 | 📖 完整配置指导


🌐 跨平台支持

同一套 MCP 工具,三个 AI 编程框架共享。

维度

Claude Code

OpenCode

Codex (OpenAI)

命令目录

.claude/commands/

.opencode/commands/

.codex/skills/

文件格式

.md (frontmatter + 指令)

.md ($NAME 占位符)

SKILL.md (YAML frontmatter)

调用方式

/命令名

Ctrl+K 命令面板

$技能名

MCP 配置

.claude/settings.local.json

.opencode.json

.codex/config.toml


📥 安装方式

Claude Code (stdio)

// .claude/settings.local.json
{ "enabledMcpjsonServers": ["test-impact-analysis"] }

Claude Code (HTTP 远程)

{
  "mcpServers": {
    "test-impact-analysis": {
      "type": "http",
      "url": "http://your-server:3100/mcp"
    }
  }
}
# 服务端启动
MCP_TRANSPORT=http MCP_PORT=3100 npx tsx src/index.ts

OpenCode / Codex

详见项目内 .opencode/commands/.codex/skills/ 目录。


📂 仓库目录

Test-Impact-Analysis-MCP/
│
├── src/
│   ├── index.ts                  # MCP Server 入口 + Transport 双模
│   ├── types.ts / state.ts       # 类型定义 / 配置状态管理
│   ├── security.ts               # IP 白名单
│   ├── paths.ts                  # 路径定位 + 企业配置层
│   ├── platforms/                # Git 平台适配器(GitHub/Local/Generic)
│   ├── tools/                    # MCP 工具模块(schemas + helpers + 3 handler)
│   ├── impact-analysis/          # 影响分析 / 推荐 / 风险评估
│   ├── engines/                  # 分析引擎框架
│   │   └── adapters/             # codebase-memory-mcp 适配器
│   └── tests/                    # 65 个单元测试
│
├── examples/                     # 配置模板(.example.json)
├── docs/                         # 多语言文档
├── .claude/commands/             # Claude Code 斜杠命令
├── .opencode/commands/           # OpenCode 命令
├── .codex/skills/               # Codex 技能
│
├── enterprise/                   # 🔒 企业配置层(.gitignore 排除)
│   ├── monitors.conf.json        #   仓库监控配置
│   ├── server.conf.json          #   IP 白名单配置
│   ├── impact-rules.conf.json    #   影响分析规则
│   └── engines.conf.json         #   引擎配置
│
└── Repository/                   # 🚫 克隆的代码(.gitignore 排除)

🔒 信息安全

┌─────────────────────────────────┐
│ 开源层(提交 GitHub ✅)          │
│ src/ docs/ examples/ README     │
│ 不含企业 URL / 仓库 / 内网 IP    │
├─────────────────────────────────┤
│ 企业层(.gitignore 排除 ❌)      │
│ enterprise/ 整目录               │
│ 仓库地址 / IP 白名单 / 业务模块   │
└─────────────────────────────────┘

两层防护.gitignore 排除 enterprise/ + Pre-commit hook 实时拦截。

HTTP 安全:IP 白名单(精确 IP + CIDR 子网),白名单内可直接连接全部 5 个工具。


❓ FAQ

  • Node.js >= 18 | TypeScript / ESM | Git CLI | tsx 运行时

npm start              # npx tsx src/index.ts
npm run dev            # tsx --watch(热重载)
npx tsc --noEmit       # 类型检查
npm test               # 65 个测试

TIA 运行在企业内网,网络隔离已由企业基础设施保障。IP 白名单作为唯一接入控制——简单、零维护、无密钥管理成本。

不会。 代码分析 100% 本地执行,语义向量模型编译进二进制,无外部 API 调用。启动时仅检查 GitHub Release 版本号(不含代码)。

自动静默降级到 TIA 内置的 glob 文件匹配规则。引擎失败不阻断分析流程。

GitLab / 华为 CodeHub / Gitee / 自建 GitLab / Gogs / Gitea — 通过 URL 模板适配,自动识别响应格式。

  • repo_clone mode=full — 首次拉取全量代码

  • repo_clone mode=incremental — 只拉迭代内的 MR 变更,需要平台支持 MR API


📋 环境要求

依赖

版本

Node.js

>= 18

TypeScript

5.x

tsx

>= 4

@modelcontextprotocol/sdk

>= 1.0

Git

任意


🔧 可用命令

命令

说明

npm start

启动 MCP Server(默认 stdio)

npm run dev

开发热重载(tsx --watch)

npm test

运行 65 个单元测试

npx tsc --noEmit

类型检查

npm run security-check

源码层安全自查


🗺️ 开发路线图

阶段

内容

状态

Phase 1

Git Monitor — 仓库变更感知与代码拉取

Phase 1.5

Transport 双模 + IP 白名单

Phase 1.6

repo_clone 远程模式

Phase 2

Impact Analysis — 代码变更影响分析

Phase 3

Test Recommendation — 智能测试推荐

Phase 4

Risk Assessment — 变更风险量化

Phase 5a

分析引擎框架 + codebase-memory-mcp 接入

Phase 5c

更多分析引擎横向扩展

💡

Phase 6

信息安全分层重构


📄 许可证

MIT — 自由使用,按需修改,欢迎回馈。


Available Tools

6 tools
impact_analysisA

分析代码变更对测试用例的影响。基于 impact-rules.conf.json 中配置的文件→测试映射规则, 自动匹配变更文件对应的测试模块,返回受影响测试用例的优先级排序列表。

使用方式: impact_analysis(name="gh-backend") — 分析从水位到 HEAD 的变更 impact_analysis(name="gh-backend", from="abc", to="def") — 指定 SHA 范围 impact_analysis(module="用户中心") — 按模块分析

前提:

  • 仓库已通过 repo_monitor(action='check') 初始化水位

  • 已编辑 impact-rules.conf.json 配置文件→测试映射规则(可选,未配置则自动推断)

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNo仓库别名(与 module 二选一,不传则分析全部仓库)
moduleNo模块名(与 name 二选一,不传则分析全部仓库)
fromNo起始 SHA(不传则使用当前水位 lastSha)
toNo目标 SHA(不传则使用远程 HEAD)

TDQS

A4.7/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. It discloses that it returns a priority-sorted list of affected test cases and mentions the config file rules. It could be improved by noting any potential side effects, but for a read-only analysis tool, the information is adequate.

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 concise but well-structured with usage examples and prerequisites. Every sentence adds value, and the bullet-point format enhances readability.

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?

Given the rich input schema and no output schema, the description provides sufficient context: it explains the return type (priority-sorted list), includes prerequisites, and offers multiple usage patterns, making it complete for an AI agent to correctly invoke the tool.

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

Parameters4/5

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

The input schema covers 100% of parameters, so the baseline is 3. The description adds value by explaining the mutual exclusivity of 'name' and 'module', and through examples, it clarifies optional parameters and default behaviors (watermark, HEAD).

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 clearly states '分析代码变更对测试用例的影响' (analyze impact of code changes on test cases), which is specific and distinguishes from sibling tools like repo_clone, repo_monitor, risk_assessment, test_recommendation, and TIA-init.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The description explicitly provides usage examples with different parameter combinations (name, from-to, module) and lists prerequisites (repo_monitor initialized, config file edited), making it clear when and how to use the tool.

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

repo_cloneA

克隆监控仓库的代码到本地。可用于初始化(首次拉取分支代码)或更新全量代码,也可增量拉取 MR。

定位方式(二选一):

  • name = 克隆单个仓库

  • module = 克隆该模块下的所有仓库(按 repoType 各自归位)

克隆模式(通过 mode 参数控制):

  • mode=full — 全量克隆分支代码(初始化 / 强制覆盖更新)

  • mode=incremental — 增量克隆 MR:sinceDate 拉取日期后合入的 MR / sinceMrId 拉取指定 MR 后合入的 MR

存储路径(由 repoType 决定):

  • frontend → Repository/Frontend repository/{repo-name}/

  • backend → Repository/Backend repository/{repo-name}/

行为模式(自动判断,无需用户干预):

  • stdio transport → 本地模式:MCP Server 直接执行 git clone

  • http transport → 远程模式:返回结构化 git 指令,由客户端在自己本地执行 远程模式下可通过 clientBaseDir 指定客户端本地存储路径

增量模式前提:

  • 仓库必须配置了 repoType

  • 需要平台支持 MR 查询(GitHub / Generic 需 mrApiTemplate)

  • local 平台仅支持 sinceDate 模式

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNo仓库别名(与 module 二选一)
moduleNo模块名(与 name 二选一)
modeYes克隆模式:full(全量)/ incremental(增量 MR)
sinceDateNoISO 日期(如 2026-06-13)。incremental 模式下拉取该日期后合入的 MR
sinceMrIdNo基线 MR/PR ID。incremental 模式下拉取该 MR 后合入的所有 MR(不含自身)
forceNo强制覆盖已存在的目录(默认 false)
clientBaseDirNo客户端代码存储根目录(仅 http transport 有效)。

TDQS

A4.6/5.0
Behavior5/5

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

No annotations provided, so description fully bears the burden. It discloses storage paths by repoType, automatic transport-mode behavior (stdio vs http), force override, and remote-mode return behavior. Prerequisites for incremental mode are also detailed.

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?

Well-structured with sections and bullet points, front-loading the core purpose. While lengthy, the complexity of the tool justifies the length. No redundant sentences.

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?

Given 7 parameters, 1 required, no output schema, and moderate complexity, the description thoroughly covers all aspects: positioning, modes, storage, transport behavior, and prerequisites. Agent can confidently invoke without ambiguity.

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

Parameters4/5

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

Input schema has 100% description coverage, so baseline is 3. The description adds significant semantic context: clarifies the relationship between name/module, elaborates on mode effects, explains sinceDate/sinceMrId, and provides transport-specific clientBaseDir meaning.

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 clearly states it clones monitoring repository code, specifying two positioning methods (name/module) and two cloning modes (full/incremental). It distinguishes from sibling tools like impact_analysis or repo_monitor, which serve different purposes.

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?

Provides explicit guidance on when to use full vs incremental cloning, and how to choose between name and module. Includes prerequisites for incremental mode. Lacks explicit when-not-to-use scenarios, but usage context is well-covered.

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

repo_monitorA

统一仓库监控工具。仓库列表在 monitors.conf.json 中配置(直接编辑即可,无需 MCP 工具)。

三种操作(通过 action 参数选择):

  • status — 查看仓库水位、快照、上次检查时间

  • check — 检查新提交(首次自动初始化水位),驱动水位更新 + seenShas 去重

  • reset — 重置水位到指定 MR/日期。sinceDate 模式自动定位迭代第一个 MR 的 base commit

范围定位(二选一,不传则遍历全部):

  • name — 仓库别名

  • module — 模块名(批量操作该模块下所有仓库)

配合 CronCreate 定时监控: /cron "*/15 * * * *" "repo_monitor(action='check')"

敏捷迭代重置: repo_monitor(action="reset", module="订单系统", label="Sprint 25 kickoff", sinceDate="2026-06-13")

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYes操作类型:status(查看状态)/ check(检查新提交)/ reset(重置水位)
nameNo仓库别名(与 module 二选一,不传则遍历全部)
moduleNo模块名(与 name 二选一,不传则遍历全部)
labelNo重置标签(如 'Sprint 25 kickoff'),用于快照回顾
sinceDateNo迭代开始日期(ISO 8601),如 '2026-06-13'。

TDQS

A4.2/5.0
Behavior4/5

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

Given no annotations, the description carries full burden and discloses key behaviors: actions, side effects (check updates watermark and dedups seenShas), and special behavior for reset with sinceDate. It lacks details on error cases, permissions, or performance, but covers the main operational traits.

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 well-structured with sections for actions, scope, and examples. It front-loads the purpose. While it could be slightly more concise, the examples provide clarity that likely aids understanding without excessive verbosity.

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?

The description covers all actions and parameters comprehensively, but lacks information about return values or expected output format. Since there is no output schema, the description could benefit from briefly summarizing what each action returns (e.g., status outputs). This gap limits completeness for a monitoring tool.

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

Parameters4/5

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

Schema coverage is 100%, but the description adds valuable context: explains action enum in prose, clarifies the mutual exclusivity of name and module, and describes label and sinceDate in the context of the reset action. This goes beyond the schema's property descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool as a unified repository monitoring tool with three specific actions (status, check, reset) and distinct scope options. It differentiates from sibling tools like impact_analysis or repo_clone by focusing on monitoring and watermark management.

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 provides explicit usage context for each action and scope (name or module) and includes concrete examples for cron scheduling and agile reset. It does not explicitly state when not to use the tool, but the action descriptions make the appropriate use cases clear.

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

risk_assessmentA

量化代码变更风险,生成风险评分(0-100)与缓解建议。 综合文件变更数量、受影响模块的风险等级分布、置信度三个维度计算。

risk_assessment(name="gh-backend") — 评估从水位到 HEAD 的风险 risk_assessment(module="用户中心") — 按模块评估

评分: files(0-60) + modules(0-40) + confidencePenalty(0-20) = 0-100 等级: 0-30=低风险 | 31-60=中等 | 61-85=高风险 | 86-100=严重

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNo仓库别名
moduleNo模块名
fromNo起始 SHA(不传=当前水位)
toNo目标 SHA(不传=远程 HEAD)

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of disclosure. It explains the scoring formula (files 0-60, modules 0-40, confidence penalty 0-20) and risk level thresholds, providing significant insight into tool behavior beyond parameter definitions. However, it does not mention side effects, authentication needs, or rate limits.

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 concise and well-structured, with a clear opening sentence, usage examples, and a breakdown of scoring calculation. Every sentence adds value, and there is no redundancy or filler.

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

Completeness4/5

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

Given no output schema, the description explains the return values (risk score and risk levels) and mentions mitigation suggestions. It covers the key aspects: purpose, usage, scoring, and risk levels. However, it could elaborate on the structure of mitigation suggestions or provide more detail on when to use different parameters.

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 100%, so parameters are already described. The description adds value by giving concrete usage examples (risk_assessment(name='gh-backend')) and clarifying defaults (from defaults to waterline, to defaults to remote HEAD), which enhances understanding beyond the schema.

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 the tool quantifies code change risk and generates a risk score (0-100) and mitigation suggestions. It includes examples of usage (by repo name or module), but does not explicitly differentiate from sibling tools like impact_analysis or test_recommendation.

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 provides examples of when to use the tool (e.g., assessing from waterline to HEAD or by module) but lacks explicit guidance on when not to use it or comparisons to alternative tools. Usage is implied but not fully contextualized.

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

test_recommendationA

基于代码变更智能推荐测试用例执行顺序。在 Phase 2 影响分析结果上计算推荐分, 按优先级排序测试用例,生成最小可行测试集(覆盖所有高风险模块的最少测试)。

test_recommendation(name="gh-backend") — 分析从水位到 HEAD test_recommendation(module="用户中心") — 按模块分析

推荐分 = 风险权重(h=100/m=50/l=20) × 置信度(0-100) 强烈建议(≥7000) | 建议(≥2000) | 可选(<2000)

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNo仓库别名
moduleNo模块名
fromNo起始 SHA(不传=当前水位)
toNo目标 SHA(不传=远程 HEAD)

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries full burden. It reveals the scoring formula (risk weights × confidence), thresholds, and categorization. It does not explicitly state read-only behavior, but the recommendation nature implies no destructive actions. The behavioral context is 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.

Conciseness5/5

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

The description is concise with no wasted words. It uses an effective structure: main purpose, usage examples, and formula in separate blocks. Every sentence adds information.

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?

The description assumes knowledge of 'Phase 2' without explanation. It describes output as categories and a minimal test set, but does not specify exact output structure (e.g., list of test cases with scores). Given no output schema, more detail on return format is needed.

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 100%, baseline 3. The description adds value by giving concrete examples (e.g., name='gh-backend' for repo alias, module='用户中心' for module analysis) and explaining defaults for from/to (current watermark, remote HEAD). This enriches the schema.

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 clearly states it recommends test execution order based on code changes and Phase 2 impact analysis, generating a minimal viable test set. The examples further clarify usage with name and module, distinguishing it from sibling tools like impact_analysis and risk_assessment.

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 provides explicit usage examples (name vs module) and explains the scoring formula and threshold categories. It implies that Phase 2 analysis should be done first, but does not explicitly state when not to use this tool or directly compare with all siblings.

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

TIA-initA

【首次使用必调】TIA (Test Impact Analysis) 初始化引导工具。

远程 HTTP 客户端在接入 TIA MCP Server 后,必须先调用此工具完成初始化:

  1. 自动签发 API KEY(写入客户端 MCP 配置)

  2. 自动判断客户端 Agent 类型(X-Agent-Type 请求头 > agentType 参数) ClaudeCode → Claude Code 命令文件 CodeX → Codex (OpenAI) 技能文件 OpenCode → OpenCode 命令文件

  3. 自动返回 TIA 命令文件内容,由客户端 LLM 写入本地

调用前提:客户端 IP 已在服务端白名单中。 IP 不在白名单 → 403 + 联系人信息。

可重复调用:已持有效 API KEY 时跳过签发步骤,仅返回命令文件。

ParametersJSON Schema
NameRequiredDescriptionDefault
agentTypeNo客户端 Agent 类型。优先读取 X-Agent-Type 请求头,此参数作为回退。

TDQS

A4.2/5.0
Behavior4/5

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

Discloses key behaviors: auto-issuing API key, agent type detection (header/parameter), idempotency, and error handling (403). No annotations exist, so description carries full burden; it does so fairly well, though side effects on config are not fully detailed.

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?

Concise yet informative, front-loaded with 'must call on first use'. While somewhat dense, it efficiently covers purpose, prerequisites, and behavior without excess words.

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?

Fairly complete for a simple init tool, but lacks output format description (e.g., structure of returned command file) and error details beyond 403. Given no output schema, this is a gap.

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 100% with enum and description. The description adds meaning by mapping agent types to command file generation, providing context beyond the schema.

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 clearly states the tool's purpose as first-time initialization for TIA MCP Server. It details specific actions (issuing API key, determining agent type, returning command file) and distinguishes itself from sibling tools by being the mandatory first step.

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?

Explicitly states it must be called first and describes prerequisites (IP whitelist) and repeatability. Lacks explicit 'when not to use' guidance, but the context strongly implies it's only for initialization before other tools.

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. 6 tool updatesv1.0.0
    • First observedimpact_analysis
    • First observedrepo_clone
    • First observedrepo_monitor
    • First observedrisk_assessment
    • First observedtest_recommendation
    • First observedTIA-init

TDQS

A4.2/5.0

Scored across 6 tools

Disambiguation5/5

All six tools have clearly distinct purposes: impact analysis, repo cloning, repo monitoring, risk assessment, test recommendation, and initialization. No overlap in functionality.

Naming Consistency3/5

Most tools use snake_case (impact_analysis, repo_clone, etc.), but TIA-init introduces a hyphen and different casing, breaking the pattern. Also, verb placement varies: some are noun_verb, some noun_noun.

Tool Count5/5

Six tools cover the workflow of test impact analysis without being excessive or insufficient. Each tool fulfills a necessary role.

Completeness4/5

The tool set covers initialization, monitoring, cloning, analysis, risk assessment, and recommendations. Only minor gaps like configuration management exist, but they are noted as manual edits.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers