Skip to main content
Glama
PortPro-Technologies-Inc

MCP Python Interpreter

list_directory

Retrieve all Python files within a specified directory or its subdirectories using the MCP Python Interpreter. Input the directory path to generate a list of relevant files.

Instructions

List all Python files in a directory or subdirectory.

Args:
    directory_path: Path to directory (relative to working directory or absolute, empty for working directory)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directory_pathNo
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the action (listing files) and parameter usage, but does not address important behaviors such as error handling (e.g., what happens if the path is invalid), output format (e.g., list structure), or permissions needed. This leaves significant gaps for an agent to understand how the tool behaves beyond basic functionality.

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?

The description is appropriately sized and front-loaded, with the main purpose stated first and parameter details following in a clear, bullet-like format. Every sentence adds value, though it could be slightly more structured (e.g., separating usage notes).

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?

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description covers the core purpose and parameters well. However, it lacks details on behavioral aspects like error handling or output format, which are important for completeness even in simple tools. It is adequate but has clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds substantial meaning beyond the input schema, which has 0% description coverage. It explains the parameter 'directory_path' in detail, including its purpose, how to specify paths (relative or absolute), and default behavior (empty for working directory). This fully compensates for the lack of schema documentation.

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's purpose with a specific verb ('List') and resource ('Python files in a directory or subdirectory'), distinguishing it from siblings like list_installed_packages or read_file. It precisely defines what is being listed and where.

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 description implies usage by specifying 'Python files' and directory paths, but does not explicitly state when to use this tool versus alternatives like list_installed_packages or run_python_file. It provides basic context but lacks explicit guidance on exclusions or comparisons with sibling tools.

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/PortPro-Technologies-Inc/mcp-python-interpreter'

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