Skip to main content
Glama

delete_folder

Delete an empty mail folder by its Graph folder ID. Prevents accidental data loss by aborting if the folder contains messages or subfolders.

Instructions

Delete a mail folder. Refuses to delete folders that aren't empty.

Reads the folder first and aborts if totalItemCount > 0 or childFolderCount > 0. This is a small safety net against accidentally nuking a folder with real messages; there is a small race window between the read and the delete, so don't rely on this for adversarial safety.

Args: folder_id: Graph folder id. Required. mailbox: Optional mailbox (email or user id) for shared mailboxes.

Returns: {"deleted": True, "id": }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mailboxNo
folder_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations present, the description carries the full transparency burden and does so well. It discloses that the tool reads the folder first, aborts when totalItemCount or childFolderCount is greater than zero, warns about a race window, and specifies the exact return payload.

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 well-structured: an immediate purpose statement, a safety detail, a concise Args section, and a Returns section. Every sentence earns its place, and there is no redundant filler.

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 that there are no annotations and no output schema, the description is remarkably complete. It explains both parameters, the exact return shape, the safety preconditions, and the failure mode, so an agent can call the tool with clear expectations.

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?

The schema itself has 0% description coverage, so the Args section in the description is essential. It adds useful meaning beyond the raw schema by explaining that folder_id is a Graph folder id and that mailbox is optional, for shared mailboxes, and can be an email or user id.

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 a mail folder.' The follow-up about refusing non-empty folders clarifies the tool's scope and behavior, making it easy to distinguish from sibling tools like delete_message or delete_rule.

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?

The description gives clear context for when the tool applies and explicitly states a key precondition/refusal condition: non-empty folders will not be deleted. It does not explicitly name alternatives, but the resource-specific wording and the empty-folder requirement provide sufficient usage guidance.

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