Skip to main content
Glama

Rename a project file

rename_file
Destructive

Rename one existing text or binary file in its current folder, preserving its extension and contents. Use rename_file or move_file only when the user requests a file rename or move. Both support existing text and binary files without reading or copying their contents. Call list_files first and pass the exact path and its revision as baseRevision. rename_file preserves the directory and extension; move_file preserves the filename within the same project. No overwrites, folder moves, cross-project transfers, or binary content changes are allowed. Path changes apply immediately, outside Review changes Keep/Revert. Text references are not automatically updated: check relevant LaTeX and bibliography references (including relative paths inside a moved text file), use guarded edit_file if needed, and report any incomplete reference updates separately. On a missing path or revision conflict, call list_files and confirm the target before retrying once.

Input Schema

NameRequiredDescriptionDefault
pathYesExact current project-relative file path from list_files.
newNameYesFilename only, with the same extension. No folder path.
projectIdYes
baseRevisionYesCurrent file revision from list_files. No read_file call or binary download is needed.

Output Schema

NameRequiredDescriptionDefault
fileYes
statusYes
messageYes
previousPathYes
referencesUpdatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the destructiveHint=true annotation, the description discloses concrete consequences: no overwrites, folder moves or cross-project transfers, immediate path changes outside the Review changes Keep/Revert flow, and that text references (LaTeX, bibliography, relative paths) are not auto-updated and must be fixed with guarded edit_file and reported separately. That is exactly the kind of side-effect detail annotations cannot convey.

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?

Front-loaded with purpose and the sibling distinction, then prerequisites, constraints, and failure handling in a logical order. It is dense but most sentences carry non-obvious operational information; there is mild redundancy between 'preserving its extension and contents' and 'preserves the directory and extension.'

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists and annotations cover the safety profile, so the description only needs to carry workflow, constraints, and side effects — all present, including reference-update fallout and retry protocol. Nothing an agent needs to invoke this correctly is missing.

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?

With 75% schema coverage the baseline is already high, but the description adds real meaning: newName must match the existing extension and contain no folder path, baseRevision comes from list_files and needs no read_file or binary download, and path must be the exact current project-relative path. Only projectId gets no additional treatment.

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?

States a specific verb (rename) and resource (one existing text or binary file in its current folder) with explicit scope limits: directory and extension preserved, contents untouched. It explicitly distinguishes itself from move_file, so an agent can separate the two without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit positive trigger (user requests a rename), a named alternative (move_file) with its differing behavior, and a prerequisite workflow (call list_files first and pass the exact path plus revision). It also prescribes recovery behavior on missing path or revision conflict: call list_files, confirm, retry once.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources