Skip to main content
Glama

move

Relocate Python symbols or modules and update imports project-wide. Use LSP coordinates to target; dry-run preview, apply to write.

Instructions

Move a Python symbol or module and update imports project-wide. Three targets, one tool: a global function/class/variable at a Position moves to another module (pass destination: that module's file path); a method at a Position moves to the class held by an attribute of self (pass destination_attribute, and optionally new_name); a whole module or package moves into a package when you omit line/character entirely (pass destination: the package directory). Coordinates are 0-based LSP line/character (UTF-16 units), exactly as your LSP returns them — locate the symbol with the LSP first. Defaults to a Dry Run preview; set apply=true to write. Prefer a clean git tree before applying, since git is the reversal mechanism. Moved resources report old_path; new files report created.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
lineNo
rootNo
applyNo
new_nameNo
characterNo
destinationNo
expected_symbolNo
destination_attributeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description takes full responsibility for disclosing behavior. It reveals that the tool defaults to a dry-run preview, requires apply=true to write, uses git as the reversal mechanism, and reports moved resources as old_path and new files as created. It also explains the coordinate system (0-based LSP line/character in UTF-16). This is far beyond what most tool descriptions provide and gives the agent a clear model of side effects and safety.

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 long but every sentence carries distinct, necessary information: purpose, three usage modes, coordinate details, dry-run behavior, and output reporting. It is front-loaded with the main purpose and follows a logical, structured flow. No filler or redundant phrasing; it earns its length.

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?

For a tool with 9 parameters, three modes, and no annotations, the description delivers a robust operational picture. It explains the coordinate system, destination selection, dry-run/apply semantics, and output behavior. The gaps are the unexplained expected_symbol and root parameters, which could cause misconfiguration, but the overall usage is well covered. The existence of an output schema partially mitigates the need to describe return values, so a 4 is appropriate.

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 compensate. It does so admirably for most parameters: destination, destination_attribute, new_name, line, character, and apply are all semantically explained via the three scenarios. However, expected_symbol and root are left unexplained, and file is only implied. Given the complexity, this is a strong but not complete compensation, so a 4 is fitting.

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 opens with a specific, unambiguous statement: 'Move a Python symbol or module and update imports project-wide.' It then enumerates three distinct targets (global symbol, method, module/package), distinguishing this tool from siblings like rename or extract_method. The verb 'move' plus the resource types and the import-update behavior make the purpose crystal clear.

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 provides explicit when-to-use guidance for all three modes: pass destination for global symbols, destination_attribute for methods, and omit line/character for module moves. It also advises using an LSP to locate the symbol first and to ensure a clean git tree before applying. However, it does not explicitly mention alternatives or when not to use this tool (e.g., 'use rename for simple renames'), so it stops short of the full 5.

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/andrewesweet/ropey'

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