Skip to main content
Glama

Rename File or Folder

rename_drive_item
Destructive

Rename a file or folder in OneDrive or a SharePoint document library while keeping it in its current location.

Instructions

Rename a file or folder in OneDrive or a SharePoint document library, leaving it where it is.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "item_id": "<item_id>",
      "new_name": "<new_name>"
    },
    "name": "rename_drive_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
item_idYesID of the file or folder to rename
drive_idNoSharePoint document library ID from list_site_drives. Omit for your own OneDrive
if_matchNoeTag from get_drive_item or list_drive_items. The change happens only if the item hasn't changed since; otherwise it fails with precondition-failed and nothing changes
new_nameYesNew name, including the file's extension

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.6.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the agent knows this mutates state. The description adds only the in-place qualifier; it does not say what happens if new_name collides with an existing item (overwrite vs. fail), whether permissions beyond edit access are needed, or whether the rename is reversible. The if_match precondition is documented in the schema rather than the description.

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?

A single front-loaded sentence with no filler; the verb, resource, scope, and the in-place constraint all appear before any qualifying detail.

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

Completeness3/5

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

For a simple mutation tool with full schema coverage and no output schema, the description is largely sufficient, but it omits collision behavior on rename and the consequences of the destructiveHint=true annotation. Those are the gaps an agent would most likely need in order to call this correctly.

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

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, including the non-obvious if_match eTag semantics and the extension requirement for new_name, so the schema carries the parameter burden. The description contributes no additional parameter meaning (for example, whether item_id may refer to a folder in a different drive than drive_id), which makes the baseline 3 correct.

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 names a specific verb (rename) and resource (file or folder in OneDrive or a SharePoint document library), and the clause 'leaving it where it is' implicitly separates it from move_drive_item. It stops short of naming a sibling explicitly, so differentiation is by implication rather than declaration.

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?

Usage is implied rather than stated: the 'leaving it where it is' phrasing signals this is the right tool when location should not change, in contrast to move_drive_item or copy_drive_item. There is no explicit when-to-use/when-not-to-use guidance or named alternative.

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

Deploy Server

Other Tools