Skip to main content
Glama
importlens-mcp

importlens-mcp

by Matheos13

relevant_files

Find the defining file, dependent call sites, and local dependency signatures for a function or class, giving agents the minimal repo slice needed to reason about that symbol.

Instructions

Find the files that matter for a given symbol (function or class name).

Returns the file(s) that define it, the call sites in dependent files, and signatures of the local modules they depend on. This is the slice of the repo an agent needs to reason about symbol — usually a handful of files instead of the whole tree.

Args: symbol: a top-level function or class name, e.g. "CodeIndex". include_source: if true, also inline the defining files' source. include_full_dependents: if true, list dependent file paths instead of inlining the call sites where the symbol is used. include_full_imports: if true, list local import paths instead of inlining their signatures.

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": "relevant_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
symbolYes
include_sourceNo
include_full_importsNo
include_full_dependentsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the three content categories returned and, importantly, that each include_* flag switches between inlining content and listing paths only. Gaps remain around whether the tool is read-only, whether it errors on an unknown or non-top-level symbol, and whether a stale index affects results.

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?

Front-loaded with the one-line purpose, then the return shape, then the argument reference. The args block is necessary given 0% schema coverage and contains no filler; the example symbol makes the expected input format unambiguous.

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?

Strong for a 4-parameter tool: return content is described even though an output schema exists, and flag semantics are clear. The main omission is the operational precondition (index freshness / relationship to reindex) and failure behavior for symbols that aren't found.

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 description coverage is 0%, so the description must supply all parameter meaning, and it does: symbol is defined with an example ('CodeIndex') and scoped to top-level functions/classes, and each of the three booleans is explained by the concrete output change it causes rather than by restating its name.

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?

A concrete verb and resource ('Find the files that matter for a given symbol') plus an explicit statement of what comes back: defining files, call sites, and dependent-module signatures. It implicitly contrasts itself with whole-tree exploration ('a handful of files instead of the whole tree') but never names a sibling, so an agent must infer the split against file_context and project_map.

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: the 'slice of the repo an agent needs to reason about symbol' framing suggests reaching for this before reading the tree, and the args note constrains input to a top-level function or class name. There is no explicit when-not guidance, no named alternative, and no statement of prerequisites such as whether the index must be built first.

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

Deploy Server

Other Tools