Skip to main content
Glama

Rename folder

rename_folder
Idempotent

Rename a mailbox folder without moving it or losing its messages and subfolders. Provide only the new name; use list_folders first to get the folder ID.

Instructions

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. Call list_folders first to find the folder ID.

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. Addedv0.31.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important behavior: the folder keeps its parent, messages, and subfolders; Gmail nested labels are renamed; IMAP folders and subfolders get new IDs; message IDs usually remain stable. These details materially inform safe invocation and post-call verification.

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?

The description is front-loaded with the purpose and key rule, then proceeds through distinct operational constraints without wasted wording. Each sentence addresses a specific risk or behavior, though the list_folders prerequisite could be moved earlier.

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?

Given the output schema and annotations, the description covers the essential preconditions, provider-specific side effects, restrictions, and recovery guidance. An agent has enough information to invoke this tool correctly without needing to infer missing behavior.

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%, so the parameter meanings are already explicit. The description reinforces the no-parent-path rule for the new name and the folder-ID lookup, but adds little parameter detail beyond what the schema already provides.

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 opening sentence states a specific verb and resource: 'Rename a folder in a mailbox.' The rest of the description distinguishes this operation from siblings such as create_folder, delete_folder, and move_folder by focusing on renaming constraints and provider-specific behavior.

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?

It gives clear prerequisite guidance ('Call list_folders first to find the folder ID') and explicit exclusions for system folders and account-settings folders. It does not name alternative tools for related operations, so it falls short of full when-to-use/when-not/alternatives coverage.

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