Skip to main content
Glama

Email: Delete folder

email_delete_folder
Destructive

Delete one exact mailbox folder/label. Resolve folder_id first and verify target; destructive. Mailbox folder/label ID: Exact Gmail label, Outlook folder or IMAP folder id. Obtain with: email_list_folders -> folder.id Never pass: human folder name such as Inbox when an ID is required.

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_id": "<folder_id>"
    },
    "name": "email_delete_folder"
  }
}

Input Schema

NameRequiredDescriptionDefault
folder_idYesExact provider folder/label ID from email_list_folders/email_resolve_folder. Human folder names are not IDs. Mailbox folder/label ID: Exact Gmail label, Outlook folder or IMAP folder id. Obtain with: email_list_folders -> folder.id Never pass: human folder name such as Inbox when an ID is required.
account_idNoOptional Nilyo connection ID (unipile_account_id from list_connected_accounts). Omit when the user has one account for this provider. When several exist, Nilyo never guesses: list them (display name, identifier, provider user ID), choose the one the user named or ask, and pass its ID here.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the description's job is to add context beyond that, which it does with "verify target" and the hard constraint against human-readable names. It does not say what happens to messages contained in the deleted folder or whether the deletion is reversible, which is the most important remaining behavioral gap for a destructive call.

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 destructive action and the ID constraint in a short, dense block, with no filler sentences. It repeats the folder_id schema text almost verbatim ("Exact Gmail label, Outlook folder or IMAP folder id"), which is some redundancy, though the telegraphic phrasing keeps it compact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter destructive tool with no output schema, the definition covers the action, the ID sourcing workflow, and the key misuse case. It stops short of describing side effects on contained messages or where the folder goes after deletion, which an agent would need for confident execution.

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, but the description adds procedural meaning to folder_id beyond the schema: resolve it first, use email_list_folders/email_resolve_folder to obtain it, and never substitute a display name. account_id is left entirely to the schema, which already documents the multi-account case.

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?

Uses a specific verb and resource ("Delete one exact mailbox folder/label") and constrains scope with "one exact," which distinguishes it from adjacent folder tools like email_update_folder, email_create_folder or email_get_folder. An agent can tell immediately what this does without opening the schema.

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?

Gives actionable prerequisites: resolve folder_id first, verify the target, and obtain the ID via email_list_folders -> folder.id. It does not explicitly state when not to use it (e.g., that deleting messages inside a folder is a different operation, or to prefer a sibling tool for message removal), so the exclusion guidance is incomplete.

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.