Skip to main content
Glama

Imports and importers of a file

snapshot_neighbors
Read-onlyIdempotent

Trace both directions of a file's import graph against a codebase snapshot: list what it imports and what imports it, with their parts. Read-only.

Instructions

Both directions of the import graph for one path: what it imports and what imports it, resolved against the snapshot and listed with their parts. The question a change asks first. Read-only.

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

Input Schema

NameRequiredDescriptionDefault
pathYesFile path relative to the repository root.
rootNoRepository root. Defaults to the directory this server was started in.
outDirNoSnapshot directory, relative to the root, and it must resolve inside the served repository. Defaults to the project configuration's outDir.

Output Schema

NameRequiredDescriptionDefault
importsNo
importedByNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, and the trailing "Read-only" largely restates that. The description does add real context beyond annotations: results are resolved against the snapshot and listed with their parts, and the openWorldHint=false claim is consistent with snapshot resolution. It still says nothing about behavior for unresolved paths or missing files.

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, front-loaded with the scope and the both-directions qualifier before the framing remark. The only waste is the final "Read-only," which duplicates readOnlyHint, and "The question a change asks first," which is evocative but slightly indirect for a spec.

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?

An output schema exists, so return values need not be described, and annotations carry the safety profile; the description's job is to convey scope, which it does. Minor gaps remain: nothing about behavior on paths with no imports or on unresolvable imports, which matters for a graph-query tool.

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%, with all three parameters (path, root, outDir) documented in the schema itself, including the outDir containment constraint. The description adds only "for one path," which conveys no format or semantics beyond the schema, so the baseline 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 names a precise resource (the import graph for one path) and an explicit scope (both directions: what it imports and what imports it). That scope is specific enough for an agent to distinguish it from single-direction tools, but no sibling such as snapshot_dependents is named, so the differentiation must be inferred.

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?

"The question a change asks first" implies a when-to-use context (impact analysis before editing), which is genuine but stated obliquely. There is no explicit when-not condition and no named alternative for the one-direction case, so the routing guidance is implied rather than stated.

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