Skip to main content
Glama
gclluch
by gclluch

list_imports

List all imports in a Python file, providing bound names, module paths, relative levels, and aliases, categorized into stdlib, third-party, and relative.

Instructions

List all imports: bound name, module path, relative level and aliases, grouped into stdlib / third-party / relative.

Args: path: Path to a .py file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It implies a read-only listing operation but does not explicitly state side-effect-free behavior, permission requirements, or error handling. The grouping behavior is disclosed, but safety and edge-case details are absent.

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?

The description is extremely concise and front-loaded. The main sentence states the purpose and the argument is explained in one line. Every word adds value with no repetition or fluff.

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?

The presence of an output schema means return values need not be described. However, the description lacks usage context (e.g., when to choose this over siblings) and does not mention any limitations or exceptional cases. It is minimally adequate for a simple one-parameter tool but leaves gaps.

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%, so the description must compensate. It does explain that 'path' is a path to a .py file, which adds semantic meaning beyond the schema. However, it lacks details on path validation, file existence, or handling of directories.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists imports with specific details (bound name, module path, relative level, aliases) and grouping. This is a specific verb+resource that distinguishes it from sibling tools like list_declarations or list_exports.

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?

The description provides no guidance on when to use this tool versus alternatives. It does not mention exclusions, prerequisites, or context such as 'use this when analyzing Python dependencies'. Only the parameter is described.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gclluch/py-ast-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server