Skip to main content
Glama

who_depends_on_this

Find all files that import a given module and detect dead import chains via a has_importers flag. Query the import graph structurally to assess dependency impact.

Instructions

Returns all files that import a given module. Each result includes has_importers flag: false means the import chain is transitively dead (nothing depends on that importer). Structural query based on the import graph, not text matching.

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": {
      "file_path": "<file_path>",
      "repo": "<repo>"
    },
    "name": "who_depends_on_this"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name (as shown in list_repos)
file_pathYesRelative file path within the repository (e.g., 'src/main.py')
max_resultsNoMaximum results to return

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.10.2

TDQS

A3.5/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 burden, and it does disclose real behavior — results carry a has_importers flag whose false value signals a transitively dead import chain, and the query is structural rather than textual. It omits other operationally important traits: whether the repo must already be indexed, whether results are truncated at max_results, and ordering/pagination behavior.

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?

Three short sentences with the core action front-loaded and the has_importers semantics explained compactly. There is little waste; the only slight redundancy is restating 'import graph' twice.

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?

For a small read-only query tool with three fully described parameters and no output schema, the description covers what the tool returns and the meaning of the key result flag. Remaining gaps (index prerequisites, truncation) are modest and partly inferable from the max_results parameter.

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

Parameters3/5

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

Schema description coverage is 100%, so repo, file_path, and max_results are already fully documented in the schema. The description adds no parameter-level meaning (e.g., absolute vs relative paths, cross-repo behavior) beyond what the schema provides, so the baseline of 3 applies.

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 verb and resource — 'Returns all files that import a given module' — and adds that the query is structural over the import graph rather than text matching, which separates it from find_text/find_code style siblings. It does not name the near-identical sibling who_depends_on_these (plural/batch variant), so the single-vs-batch choice is left to the agent.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: 'Structural query based on the import graph, not text matching' tells the agent this applies to import-relationship questions, not string search. There is no explicit when-to-use/when-not guidance and no pointer to who_depends_on_these for multiple files or to who_calls_this for call-graph questions.

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