Skip to main content
Glama

Rename or move a folder

rename_folder
Destructive

Rename a folder, or move it under a different parent - in IMAP these are the same operation, because a folder's name is its path. Pass parent to reparent it while keeping its name. THE MESSAGES INSIDE COME WITH IT, and so do any sub-folders: renaming "Projects" also moves "Projects/Q1", and the result lists every child that moved. REFUSES to rename INBOX (on IMAP that empties your inbox into a new folder rather than renaming anything) and refuses to rename Sent, Drafts, Trash, Junk or Archive (mail clients find those by a flag, not by name, and renaming one can leave your sent mail split across two folders). It also refuses a name that is already taken rather than risk merging two folders. Read the refusal and tell the user what it says - each one is protecting something.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe folder to rename, e.g. "Projects" or "Archive/2025".
parentNoMove it under this existing folder, keeping `newName` as the leaf. Use this rather than building the path by hand when you only want to reparent it.
newNameYesIts new name. A "/" makes a hierarchy, so "Archive/Projects" nests it under Archive.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Annotations already mark destructiveHint=true, but the description adds crucial context: it states that all messages inside the folder move with it and subfolders move recursively. It also details refusal behaviors and the rationale (e.g., renaming INBOX would empty it). This goes beyond what the boolean hints alone provide.

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?

Although the description is longer than typical, every sentence carries essential information: the operation, side effects, exceptions, and user-facing instructions. The ALL-CAPS emphasis draws attention to critical details without adding fluff. No redundant or tangential content exists.

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?

The description is complete for an agent: it defines the operation, explains parameter usage, warns about destructive consequences, enumerates refusal cases, and tells the agent how to handle refusals (read and relay to the user). No output schema is present, but the behavior is fully specified, so an agent knows exactly what to expect.

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

Parameters5/5

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

The schema already provides 100% coverage with descriptive texts for all three parameters. The description amplifies this by showing how 'newName' can contain slashes to create hierarchy and how 'parent' is used specifically for reparenting. It also gives concrete examples, making the parameter interactions clear.

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's purpose: renaming or moving a folder, and explicitly notes the IMAP equivalence. It distinguishes itself from sibling tools like create_folder and delete_folder by describing the rename/reparent action. The examples (e.g., 'Projects' to 'Archive/Projects') make the scope unambiguous.

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?

The description provides explicit usage guidance: it explains when to use the 'parent' parameter (to reparent without changing the leaf name), warns against manually building paths, and instructs the agent to read and communicate refusal messages. It also lists specific refusal cases (INBOX, Sent, Drafts, Trash, Junk, Archive) and the reason for each.

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