Skip to main content
Glama

Rename File

file_rename

Rename an existing OneDrive file by providing the file ID and new name, with user confirmation recommended.

Instructions

✏️ Rename a file (requires user confirmation recommended)

Updates the name of an existing OneDrive file.

Args: file_id: The file ID to rename new_name: New name for the file account_id: Microsoft account ID

Returns: Updated file object with new name

Raises: ValueError: If file_id is invalid or new_name is empty

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYes
new_nameYes
account_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

Annotations already indicate mutation (readOnlyHint=false) and non-destructive nature. The description adds a recommendation for user confirmation but does not detail side effects, permission requirements, or behavior on conflict. No contradiction with annotations.

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?

The description is concise and front-loaded with the purpose. The use of an emoji and docstring format is clear, though some lines (e.g., returns/raises) are standard and could be slightly more compact.

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?

Given the presence of an output schema, the description sufficiently covers return values and errors. However, it lacks details on edge cases like name conflicts or whether the operation is reversible, which would improve completeness for a mutation tool.

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 description provides meaningful descriptions for all three parameters (file_id, new_name, account_id) beyond the raw schema types and required flags, and also documents return and error types. With 0% schema description coverage, the description fully compensates.

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 tool renames a file ("Updates the name of an existing OneDrive file") with a specific verb and resource. It distinguishes from sibling tools like file_move and folder_rename by focusing on renaming.

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?

While the description mentions "requires user confirmation recommended," it does not explicitly state when to use this tool versus alternatives like file_move or file_update. No exclusions or context for avoiding misuse are provided.

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/robin-collins/m365-mcp'

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