explain_module_resolution

[architecture]

Explains how one static import, import-equals require, or re-export specifier resolves from one file.

Why this tool exists

Monorepo package relationships and import graphs are too large to reconstruct reliably from scattered file reads.

How it helps the agent

The model can reason from package, project, dependency, dependent, path, and cycle facts before editing architecture-sensitive code.

Try it locally in the TGlider playground

Parameters

NameTypeRequiredDescription
filePathstringYesWorkspace-relative or absolute file path.
moduleSpecifierstringYesThe exact static import, import-equals require, or re-export specifier to explain.
occurrenceIndexnumberNoOptional zero-based occurrence index when the same specifier appears more than once in the file.

Examples

Explain a path alias or package import

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "explain_module_resolution",
    "arguments": {
      "filePath": "src/app.ts",
      "moduleSpecifier": "@app/shared"
    }
  }
}

Response Notes

Returns source project context, the selected occurrence index and matching import or re-export occurrence, resolved target path and project when available, package-entrypoint evidence, alias keys, ambient-module and baseUrl-only classifications, and unresolved or external resolution notes.

↑/↓ NavigateEnter OpenSpace Expand