Skip to main content
Glama
WayneLiu519888

Test Impact Analysis MCP Server

impact_analysis

Identify test cases affected by code changes using file-to-test mapping rules. Returns a prioritized list of impacted tests for efficient regression testing.

Instructions

分析代码变更对测试用例的影响。基于 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 配置文件→测试映射规则(可选,未配置则自动推断)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo仓库别名(与 module 二选一,不传则分析全部仓库)
moduleNo模块名(与 name 二选一,不传则分析全部仓库)
fromNo起始 SHA(不传则使用当前水位 lastSha)
toNo目标 SHA(不传则使用远程 HEAD)
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.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/WayneLiu519888/Test-Impact-Analysis-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server