Skip to main content
Glama

get_file_relations

Show a file's import relationships—what it imports, what imports it, and related tests—using static analysis without indexing to assess impact before code changes.

Instructions

Shows import relationships for a file: what it imports, what imports it,
and related test files. Built from static analysis (no indexing needed).

Args:
    path: File path relative to project root.

Returns:
    Import graph and impact assessment for the file.

Input Schema

NameRequiredDescriptionDefault
pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that results come from static analysis and require no indexing, and it names the categories of relationships returned, but it omits permission requirements, error behavior for missing files, and any limits on graph depth.

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 definition is front-loaded with the core purpose, then provides compact Args and Returns sections. Every sentence contributes useful information with no redundant repetition of schema or title content.

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 single-parameter read tool with an output schema, the description supplies the purpose, source method, parameter meaning, and returned information at an appropriate level of detail. The output schema covers return structure, so the description need not elaborate further.

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 description coverage is 0%, so the description must add meaning for the single required parameter. It does so by specifying that path is a file path relative to the project root, which is more precise than the schema's bare 'Path' title.

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 states a specific verb and resource: it shows import relationships for a file, including what it imports, what imports it, and related test files. This is clearly distinct from general file summaries, but it does not explicitly distinguish itself from siblings like get_symbol_relations or analyze_change_impact.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides no explicit guidance on when to use this tool versus alternatives such as analyze_change_impact, get_dependencies_with_depth, or get_symbol_relations. The note that it is built from static analysis and needs no indexing implies usage context, but there are no exclusions or alternatives named.

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