Skip to main content
Glama

get_imports

Read-onlyIdempotent

List a codebase's imports with module, names, and line numbers, optionally filtered by file or project, to trace dependencies without scanning raw text.

Instructions

List imports (module, names, line).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNoProject name/path (default: active).
compressNoCompact rows (default true).
file_pathNoFilter to file (omit=all).
max_resultsNoDefault 100. 0=unlimited. Truncated results carry a trailing `_truncated` marker with total count.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.0.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world behavior, so the safety profile is covered. The description adds nothing beyond that — truncation handling and defaults live in the schema, not the description — making this adequate but not value-adding.

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?

A single short sentence with zero waste and the key output fields front-loaded. It is efficient, though the extreme terseness leaves no room for the context that would make it more useful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With four optional params, no output schema, and annotations covering safety, the definition is minimally complete — the schema supplies defaults and filtering behavior. It stops short of explaining scope (whole project vs. file) or how results interact with truncation, leaving some inference to the agent.

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 project, compress, file_path and max_results are all documented in the schema itself (including the truncation marker and default semantics). The description contributes no additional parameter meaning, which is the expected baseline when the schema does the work.

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 (List) and resource (imports) and even names the returned fields (module, names, line), so an agent knows exactly what comes back. It does not, however, differentiate itself from plausible siblings such as get_file_dependencies or find_import_cycles.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no mention of prerequisites, and no reference to alternative tools that also expose import information. The only routing signal is the file_path 'omit=all' note buried in the schema.

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