Skip to main content
Glama

get_affected_tests_by_branch

Runs git diff from a base branch to HEAD and returns the affected test files, automating the diff step for TypeScript projects.

Instructions

Runs git diff --name-only <base_branch>...HEAD internally and returns affected test files. Use instead of get_affected_tests when you want the server to handle the git diff automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_branchNoBranch to diff against (default: main)main
project_rootYesAbsolute path to the TypeScript project root (must contain tsconfig.json)
Behavior4/5

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

With no annotations, the description carries full burden of behavioral disclosure. It reveals the internal git diff mechanism and that it returns affected test files, providing meaningful context beyond the name. However, it doesn't disclose potential errors, performance characteristics, or side effects, though as a read-only operation this is reasonably transparent.

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

Conciseness5/5

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

The description is two sentences, with the first stating the core operation and the second providing usage guidance. Every word earns its place, and it is immediately clear and front-loaded.

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 simple with two parameters and no output schema. The description explains the internal command, the return type ('affected test files'), and when to use it versus the sibling. It could mention the output format (e.g., list of paths) or error handling, but for a read-only diff tool, it is sufficiently complete.

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 coverage is 100% with both base_branch and project_root described in the schema. The description adds no further parameter-specific semantics, only referencing the diff operation. Baseline 3 is appropriate because the schema already documents the parameters adequately.

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 runs `git diff --name-only <base_branch>...HEAD` and returns affected test files, using a specific verb and resource. It also explicitly distinguishes itself from the sibling tool get_affected_tests, making the purpose unmistakable.

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 says 'Use instead of get_affected_tests when you want the server to handle the git diff automatically,' providing a direct alternative and condition for use. This offers clear guidance on when to select this tool over its sibling.

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/vola-trebla/ast-impact-mapper-mcp'

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