Skip to main content
Glama

get_tests_for

Read-onlyIdempotent

Find test files and test functions covering a symbol or file using graph-resolved mapping, not just filename patterns.

Instructions

Find test files and test functions that cover a given symbol or file. Use instead of Glob/Grep — understands test-to-source mapping, not just filename conventions. When symbol_id (or fqn) is provided, narrows file-level reachability to test files that actually exercise the symbol — graph-resolved calls (direct_invocation), import + textual reference (import_and_call), or bare textual mention (text_match). Default min_confidence is import_and_call. For project-wide test coverage gaps use get_untested_symbols instead. Read-only. Returns JSON: { tests: [{ test_file, symbol_id, test_name, line, edge_type, confidence }], total, symbol_filtered?, fell_back_to_file_level? }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbol_idYesSymbol ID to find tests for
fqnYesFully qualified name to find tests for
file_pathYesFile path to find tests for
min_confidenceNoMinimum confidence when narrowing by symbol_id/fqn. Default: import_and_call. Ignored in file-level mode.
Behavior5/5

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

Annotations already mark it as read-only and idempotent. The description adds 'Read-only' and details the output JSON structure, confidence levels, fallback behavior ('fell_back_to_file_level?'), and edge types. No contradictions with annotations.

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?

Five well-structured sentences with front-loaded purpose. Each sentence provides distinct value: usage advice, parameter behavior, output format, and alternative tool. No redundant or extraneous information.

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 complexity (4 parameters, multiple modes, output), the description covers purpose, usage, parameter semantics, return format (JSON with fields), and fallback behavior. No output schema exists, so the explanation of return values is appropriate and complete.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds significant meaning: explains that symbol_id/fqn narrow to graph-resolved calls, file_path for file-level reachability, and min_confidence enum values with defaults. Also clarifies that min_confidence is ignored in file-level mode, which is beyond 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: 'Find test files and test functions that cover a given symbol or file.' It uses a specific verb ('find'), identifies the resource ('test files and test functions'), and specifies the scope ('cover a given symbol or file'). It distinguishes from sibling tools like 'get_untested_symbols' and mentions it's better than Glob/Grep.

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?

Explicitly advises to use instead of Glob/Grep, explains when to use symbol_id/fqn vs file_path, describes default min_confidence, and directs to 'get_untested_symbols' for alternative use cases. Provides clear context and exclusions.

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/nikolai-vysotskyi/trace-mcp'

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