Skip to main content
Glama

mail_update_folder

Idempotent

Rename an existing iCloud Mail folder while keeping its messages in place. Use when the owner asks to change a folder name, not to create, delete, or move messages.

Instructions

Rename one of the owner's own mail folders; the mail inside stays in it under the new name.

Use when: the owner asks to rename a folder. Not for creating one (use mail_create_folder), removing one (use mail_delete_folder), or moving messages between folders (use mail_move_messages). Parameters:

  • name: an existing folder from mail_list_folders; an exact match is tried first, then a case-insensitive one.

  • new_name: the full new name, trimmed of spaces; it must be non-empty and not already used by another folder, ignoring case.

  • A case-only change of the same folder is allowed. Behavior:

  • Refuses INBOX, Notes and the system folders (anything flagged Sent, Drafts, Trash, Junk, Archive, All or Flagged, and the usual names such as Sent Messages, Deleted Messages and Spam).

  • Refuses a folder that has subfolders.

  • Moves and deletes no mail.

  • Repeating it has no further effect: the old name is gone, so a second call fails with 'There is no folder'. Returns: {renamed: true, from, to} with the exact old and new names. Errors: 'There is no folder' (check mail_list_folders), 'one of the mailbox's own folders', 'has subfolders' (rename or delete those first), 'already exists', or 'new_name is empty'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe folder to rename (exact name from mail_list_folders).
new_nameYesIts new name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "title": "mail_update_folderDictOutput",
      -  "type": "object"
      -}New value: +null
  2. Addedv0.11.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations cover the safety profile (destructiveHint=false, idempotentHint=true), and the description adds substantial context beyond them: which folders are refused (INBOX, Notes, system folders), refusal when subfolders exist, that no mail is moved or deleted, and the exact idempotency behavior ('a second call fails with There is no folder'). The idempotency statement is consistent with idempotentHint=true.

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?

Front-loaded with the one-line purpose, then clearly sectioned into Usage, Parameters, Behavior and Returns/Errors. The length is justified by the number of refusal rules, though a couple of the error strings could be tightened.

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 no output schema, the definition documents the return shape ({renamed, from, to}), the full error vocabulary and the refusal conditions. An agent has everything needed to call it and interpret failure modes.

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?

Schema coverage is 100%, yet the description still adds real semantics: exact-match-then-case-insensitive resolution, trimming of new_name, non-empty requirement, uniqueness check ignoring case, and that a case-only change is permitted.

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?

States a specific verb (rename) and resource (one of the owner's own mail folders), plus the scope constraint that mail inside stays put. Clearly distinguishable from mail_create_folder, mail_delete_folder and mail_move_messages, which are named explicitly.

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?

Explicit 'Use when' clause plus three named alternatives with the conditions that select them (create, delete, move messages). No inference required to route between siblings.

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