Skip to main content
Glama

rename_file

Rename a file or directory to a new name within its current folder. Optionally overwrite existing files or preview the action with a dry run.

Instructions

Rename a file or directory within its current parent directory.

Args: path: Existing file or directory path new_name: New file name only, not a path overwrite: Allow replacing an existing destination dry_run: Return the planned action without renaming

Returns: JSON string with operation details or an error message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
dry_runNo
new_nameYes
overwriteNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description bears the full burden. It explains key behaviors: overwrite allows replacing existing, dry_run returns planned action, and returns JSON with operation details. However, it does not disclose potential errors (e.g., if overwrite is false and destination exists) or permissions needed.

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 a well-structured docstring with Args and Returns sections. The purpose is stated upfront in a single sentence. Every sentence adds value and there is no redundancy or excess.

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?

The description covers all four parameters and the return type (JSON string with operation details or error). An output schema exists, so detailed return structure is not needed. It could mention error scenarios (e.g., file not found) but is sufficient for a rename operation.

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?

The input schema provides only types and defaults (0% coverage). The description adds crucial meaning: path must be existing, new_name is a name not a path, overwrite controls replacement, dry_run suppresses real action. This significantly enhances parameter understanding beyond the schema.

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 verb (rename) and resource (file or directory), and the constraint 'within its current parent directory' distinguishes it from moving or copying. Sibling tools include move_file, copy_file, and trash_file, so this tool's purpose is distinct.

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 context that the rename occurs within the current parent directory and that new_name must be a name only, not a path. It implicitly guides usage by differentiating from move_file (which changes parent). However, it lacks explicit instructions on when to choose this tool over alternatives.

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/altic-dev/altic-mcp'

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