Skip to main content
Glama

Fluxmail Cloud

Rename folder

rename_folder
Idempotent

Rename a folder in a mailbox. Give the new name on its own, without the parent path: the folder stays under the same parent and keeps its messages and subfolders. The new name must not be one another folder has. In Gmail, where the folder is a label, the labels nested under it are renamed to match. System folders such as Inbox, Sent and Trash can't be renamed, and neither can a folder the account settings use as one. In an IMAP mailbox, the folder and its subfolders get new IDs, so use the ID in the result or list the folders again. Message IDs normally stay the same. If one stops working, list the folder again.

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": {
      "folder": "<folder>",
      "name": "<name>"
    },
    "name": "rename_folder"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesNew name for the folder itself, without its parent path. For Projects/2025, give 2026 to get Projects/2026.
folderYesID of the folder to rename, as list_folders returns it, or the folder name.
accountIdNoAccount to operate on. Optional when exactly one account is connected.

Output Schema

NameRequiredDescriptionDefault
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare the mutation/idempotency profile; the description goes well beyond that, disclosing preservation of child messages and subfolders, the name-uniqueness constraint, Gmail label-cascade behavior, the prohibition on renaming system folders, and the fact that IMAP folder and subfolder IDs change while message IDs normally do not. This is exactly the operational context an agent needs after a rename.

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 purpose is front-loaded and the rest is dense with non-redundant operational detail. A few sentences could be tightened (the closing note about a failing message ID repeats the earlier advice to re-list folders), but there is little wasted text.

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?

For a mutation tool with an output schema and annotations, the description covers the post-call hazards (stale IMAP ids, need to use the returned ID), platform differences, and failure cases. Nothing an agent needs to invoke it correctly or recover afterwards 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?

Schema coverage is 100%, so the baseline is 3; the description adds a constraint not present in the schema, namely that the new name must be unique among folders, and reinforces that only the leaf name (not the parent path) is accepted. It does not explain accountId semantics, which the schema already covers.

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?

Opens with a specific verb and resource ("Rename a folder in a mailbox") that cannot be confused with create_folder, delete_folder, or move_folder. The scope is further bounded by stating the folder keeps its parent, messages and subfolders.

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 makes the applicable situation clear through constraints rather than explicit routing: it explains that system folders and account-setting folders cannot be renamed, and describes Gmail vs IMAP behavior. It never names a sibling alternative or an explicit when-not-to-use rule, so it stops short of a 5.

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