Skip to main content
Glama

get_tests_for_file

Identify test files that exercise a specific source file by analyzing file naming patterns across multiple programming languages without executing tests.

Instructions

Given a source file path, return the test files that exercise it. Static lookup — no test execution. Go: test.go in same directory. Python: test.py / *_test.py in same dir and tests/ sibling. TypeScript/JS: *.test.ts, *.spec.ts etc. Rust: returns source file itself (tests inline). Does not require start_lsp.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It effectively discloses key behavioral traits: it's a static lookup (non-executing), describes language-specific file patterns (Go, Python, TypeScript/JS, Rust), and clarifies no LSP requirement. It doesn't mention error handling or performance, but covers core behavior well.

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 front-loaded with the core purpose, followed by specific details (language rules, LSP note). Every sentence adds value: the first states the purpose, the second clarifies static nature, the third provides language-specific patterns, and the fourth adds an important constraint. No wasted words.

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?

Given the tool's moderate complexity (language-specific logic), no annotations, and no output schema, the description is mostly complete. It explains the parameter, behavior, and language rules well. However, it doesn't describe the return format (e.g., list of file paths) or error cases, leaving some gaps.

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?

The input schema has 0% description coverage and only one parameter (file_path). The description adds significant meaning by explaining what the parameter represents ('source file path') and how it's used to find test files, fully compensating for the schema's lack of documentation.

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: 'Given a source file path, return the test files that exercise it.' It specifies the verb ('return') and resource ('test files'), and distinguishes from siblings by noting it's a 'static lookup — no test execution' (unlike run_tests).

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 provides clear context for when to use it: for static test file lookup without execution. It explicitly states 'Does not require start_lsp,' which helps differentiate from LSP-dependent tools. However, it doesn't explicitly name alternatives or specify when not to use it.

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/blackwell-systems/agent-lsp'

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