Skip to main content
Glama
krystofbe

rope-mcp-server

by krystofbe

convert_module_to_init

Convert a Python module file into a package by moving it to init.py, preserving the import path to allow splitting into multiple files later.

Instructions

Convert a module file into a package by moving it to init.py.

Transforms foo.py into foo/__init__.py. No import changes needed since the import path stays the same!

Example: views/customer_order.py becomes views/customer_order/__init__.py Import from views.customer_order import X stays unchanged.

This is the recommended way to convert a module to a package when you want to later split it into multiple files.

Args: project_path: Root directory of the Python project module_path: Path to module file (relative to project_path), e.g. "app/views/foo.py"

Returns: JSON with success status and new path

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYes
module_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions that no import changes are needed, which is a key trait. However, it does not discuss potential side-effects (e.g., overwriting existing files), permissions required, or error conditions. This leaves some behavioral aspects implicit.

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 well-structured and front-loaded with the core purpose, followed by an example and a usage recommendation. It is concise without being terse, though the 'Args:' section could be integrated more succinctly. Overall, no unnecessary sentences.

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?

Given the tool's simplicity (2 parameters, no annotations, output schema exists), the description covers the purpose, usage context, parameter semantics, and return format. It lacks details on error handling or prerequisites, but these are not critical for this straightforward transformation.

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

Parameters4/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 explain parameters. It provides clear explanations for both 'project_path' and 'module_path' with examples and context (e.g., relative to project_path). This adds significant meaning beyond the schema's type-only definitions.

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 clearly states the action (convert module file to package via moving to __init__.py) and the resource (module file). It provides an example and explains why the import path stays unchanged. However, it does not distinguish itself from the sibling tool 'convert_module_to_package', which could cause confusion.

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

Usage Guidelines4/5

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

The description specifies when to use this tool ('when you want to later split it into multiple files') and states it is the recommended approach. It does not explicitly mention when not to use it or provide comparison to alternatives, but the context given is sufficient for informed selection.

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/krystofbe/rope-mcp-server'

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