Skip to main content
Glama

Rename / Move a File

litewrite_rename_file
DestructiveIdempotent

Rename or move a file or folder in a Litewrite project by providing a new name or target path.

Instructions

Rename or move a file/folder in a Litewrite project (POST /api/internal/files/rename).

Args:

  • projectId (string, required): The project id.

  • sourcePath (string, required): Current relative path.

  • newName (string, optional): New name (keeps the same parent).

  • targetPath (string, optional): Full target relative path to move it.

Provide at least one of newName or targetPath.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
newNameNoNew name within the same folder
projectIdYesThe Litewrite project id
sourcePathYesCurrent relative path
targetPathNoFull target relative path

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, readOnlyHint=false and openWorldHint=true, so the safety profile is covered. The description adds the endpoint and the 'keeps the same parent' nuance for rename vs. full-path move, but says nothing about failure modes such as name collisions, a missing sourcePath, or permission requirements.

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 one-line purpose followed by a compact parameter list; nothing is wasted. The arg list partially duplicates the schema, which costs it a point, but it is short and easy to scan.

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 four-parameter mutation tool with a fully described schema and no output schema, the entry covers purpose, endpoint, and the key parameter-selection rule. The main gap is behavioral edge cases (overwrite on collision, error when source is absent), which is minor given annotation coverage.

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 100%, so the baseline is 3, but the description adds a cross-parameter constraint not present in the schema: at least one of newName or targetPath must be supplied. It also clarifies that newName preserves the parent directory while targetPath relocates the file.

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 pair (rename/move) plus the resource (file/folder) and even the backing endpoint (POST /api/internal/files/rename). This is clearly distinguishable from siblings like litewrite_write_file, litewrite_create_file, and litewrite_delete_file.

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 gives a genuine rule for choosing between the two optional parameters ('Provide at least one of newName or targetPath'), which is real usage guidance. However, it offers no tool-level when-to-use context against siblings (e.g., move vs. delete+create, or when to prefer litewrite_write_file) and no exclusions.

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