Skip to main content
Glama

topology_affected

List affected packages and test counts from changed files or symbols, plus test names in the changed package, so you run only relevant tests instead of the whole suite.

Instructions

After you change code, ask this which tests to run instead of running the whole suite. Given changed files or symbols, it answers with PACKAGES to run — one row each with the test count and why the package is implicated, plus the individual test names in the package the change landed in. Where the workspace's test runner takes a positional path (go, python), each row leads with a ready target to hand straight to run_task(slot:"test"), expressed relative to [tasks.].working_dir so it works from the directory that command runs in. Where the runner scopes by name or by a project-specific flag (rust, typescript, swift, zig), the directory is named and no command is guessed. A package is reached either by containing the change, or by importing a package that does (cross-package import edges). Within a reached package every test is counted, because co-location cannot tell which of them exercise the change: that is the recall bias, and it is deliberate — a missed test is worse than an extra. Results are heuristic; verify before relying. max_results bounds the number of PACKAGES, and the changed package is always listed first so a cap cannot drop it. Returns a clear message when topology is disabled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNoWorkspace-relative file paths to treat as change roots.
symbolsNoSymbol names to treat as change roots.
max_resultsNoMaximum PACKAGES to return. Default 50, which is well above a normal answer — raise it only for a change that fans out very widely. Tests are counted per package rather than listed individually, so this no longer caps test rows; the changed package always sorts first, so a cap cannot drop the package the edit landed in.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv0.17.0
    • changedInput schema / properties / max_results / description
      Previous value: -"Maximum affected nodes to return. Default 50."New value: +"Maximum PACKAGES to return. Default 50, which is well above a normal answer — raise it only for a change that fans out very widely. Tests are counted per package rather than listed individually, so this no longer caps test rows; the changed package always sorts first, so a cap cannot drop the package the edit landed in."
  2. First observedv0.16.6

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden, and it succeeds: it discloses the heuristic nature of results, the deliberate recall bias (counting every test in a reached package), the cross-package import edge rule, language-dependent command formatting, and the behavior when topology is disabled. This is exemplary transparency for a complex tool.

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 long, but it is front-loaded with the core purpose and every subsequent sentence adds necessary operational detail (output shape, path handling, reachability rules, cap behavior). It could be tightened with bullet points, but it avoids fluff and each clause earns its place.

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 tool's complexity, the absence of an output schema, and the absence of annotations, the description is remarkably complete. It covers input expectations, output structure, per-language command behavior, recall bias, heuristics, max_results semantics, ordering guarantees, and failure mode when topology is disabled. An agent has enough information to invoke and interpret the result correctly.

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 the baseline is 3, but the description adds meaningful semantics beyond the schema: files and symbols are "change roots," max_results bounds PACKAGES rather than test rows, and the changed package is always sorted first so a cap cannot drop it. This goes beyond what the schema descriptions already state.

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 opens with a concrete use case: "After you change code, ask this which tests to run instead of running the whole suite." It names a specific resource (affected PACKAGES) and a specific output (packages with test counts, reasons, and individual test names), which clearly distinguishes it from siblings like topology_status, topology_search, and topology_impact.

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 gives clear context for when to use this tool — after code changes, to select tests rather than run everything. It implies the alternative (running the full suite) but does not explicitly name other topology or test-selection tools or state when not to use it, so it stops short of full exclusion guidance.

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

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/plumbkit/plumb'

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