Skip to main content
Glama
importlens-mcp

importlens-mcp

by Matheos13

file_context

Reads a file's source code with its local dependency paths, so coding agents understand imports without loading the entire project.

Instructions

Return a file's source plus the paths of its local dependencies.

Use this to read one file with awareness of what it pulls in, without loading the whole project.

Args: path: repo-relative path, e.g. "src/importlens_mcp/server.py".

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": {
      "path": "<path>"
    },
    "name": "file_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

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 burden. It does disclose the shape of the result (source plus dependency paths) and implies read-only behavior, but says nothing about missing-file handling, size limits, path validation, or whether dependency paths are transitive or direct.

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?

Two sentences of purpose followed by a brief Arg line with an example — front-loaded and free of padding. The 'Args:' block mirrors docstring convention rather than tool-definition style, but costs little.

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?

A single-parameter read tool with an output schema, so return values need no explanation. The description covers what it returns and why to choose it over a project-wide load; only edge-case behavior is missing, which is minor at this complexity.

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 0% for the single path parameter, and the description compensates by specifying repo-relative format with a concrete example ('src/importlens_mcp/server.py'). That is genuinely useful, but it is the only parameter detail provided, so the value added is modest.

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?

States a specific verb and resource: returns a file's source plus the paths of its local dependencies. The 'without loading the whole project' clause implicitly contrasts it with project-wide tools, but no sibling is named, so the differentiation is suggestive rather than explicit.

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?

Gives a clear usage context: read one file with awareness of what it pulls in, as a lighter alternative to loading the whole project. It stops short of naming an alternative tool or stating exclusions (e.g., binary files, files outside the repo).

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