Skip to main content
Glama

find_tests_for

Read-onlyIdempotent

Locates tests that cover a code symbol via call-graph reachability and direct references under conventional test paths.

Instructions

The tests of a symbol: those that reach it through the call graph ([dN] = N calls away, even if they never name it) and those that name it, under conventional test paths (tests/, spec/, tests/, test_*, _test., .spec., *Test.cs, *Tests.cs); test_path_pattern replaces them. describe_symbol and impact include the same tests.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "symbol": "<symbol>"
    },
    "name": "find_tests_for"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax results.
sourceNoSource name. Omit when only one source applies.
symbolYesIdentifier to find tests for.
test_path_patternNoRegex for test file paths, replacing the defaults.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.12.0
    • removedInput schema / properties / source / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / source / default
      Removed value: -null
    • addedInput schema / properties / source / type
      Added value: +"string"
    • removedInput schema / properties / test_path_pattern / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / test_path_pattern / default
      Removed value: -null
    • addedInput schema / properties / test_path_pattern / type
      Added value: +"string"
  2. Addedv1.9.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, closed-world behavior, so the bar is lower. The description nonetheless adds real behavior: the [dN] call-distance notation, the taxonomy of results (reaching vs. naming), and the concrete default test-path conventions that make results predictable. It omits edge behavior such as what happens with zero matches or how limit interacts with results.

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 dense but front-loaded sentence with a parenthetical gloss on [dN] and a compact path/pattern list. Every clause carries information, though the parenthetical and the trailing list make it slightly harder to scan than a two-sentence split would be.

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?

For a 4-parameter read-only tool with full schema coverage, no output schema, and annotations covering safety, the description supplies the parts structured data cannot: the meaning of result annotations, the default path heuristics, and the overlap with describe_symbol/impact. Nothing an agent needs to invoke it correctly appears 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 100%, so baseline is 3, but the description earns more: it enumerates the default path conventions that test_path_pattern replaces, which is the only place an agent learns what the default actually matches. The symbol parameter's dual interpretation (reachability vs. literal naming) is also clarified here, not in 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 opens with a specific scope: 'The tests of a symbol', then distinguishes two mechanisms (call-graph reachability and name matching under conventional test paths). It doesn't use an explicit verb like 'find', but the resource and its two result categories are unambiguous and separable from siblings like find_usages.

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?

It explicitly signals overlap with alternatives by noting that 'describe_symbol and impact include the same tests', which tells an agent this tool is the narrow option when only tests are needed. It stops short of an explicit 'use this instead of X when...' rule, so it is clear context without full routing logic.

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