Skip to main content
Glama

Fluxmail Cloud

Delete folder

delete_folder
DestructiveIdempotent

Delete an empty folder from a mailbox. The folder must have no messages and no subfolders: move or trash its mail and delete its subfolders first. In Gmail, where the folder is a label, remove the label from its messages. System folders such as Inbox, Sent and Trash can't be deleted, and neither can a folder the account settings use as one.

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": "delete_folder"
  }
}

Input Schema

NameRequiredDescriptionDefault
folderYesID of the folder to delete, 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.2/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, idempotentHint=true and openWorldHint=false, so the safety profile is declared. The description goes further by explaining the failure conditions (non-empty folder, protected system folders, account-default folder) and the Gmail label variant, which is real operational context an agent needs before calling.

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?

Three sentences, front-loaded with the action and then the constraints; there is no filler. The emptiness rule is stated once as a rule and once as a remedy, a minor redundancy but it reads as paired guidance rather than padding.

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 destructive, two-parameter operation with an output schema and full annotation coverage, the description supplies exactly the missing piece: the preconditions and platform-specific caveats. An agent can decide to call it, or not, without further lookup.

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 folder identifier/name and optional accountId are already fully documented structurally. The description adds no additional meaning about the parameters beyond what the schema states, which is the expected baseline here.

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 opens with a specific verb and resource ('Delete an empty folder from a mailbox') and immediately scopes the operation with the emptiness constraint. It also distinguishes folders from Gmail labels, which helps separate it from delete_label in the sibling set.

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 explicit preconditions (no messages, no subfolders) and prescribes the preparatory steps ('move or trash its mail and delete its subfolders first'), plus exclusions for system folders and settings-bound folders. It never names an alternative tool such as move_folder or delete_label, so routing is implied rather than explicit.

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