Skip to main content
Glama
codefuturist

Email MCP Server

by codefuturist

Find email folder

find_email_folder
Read-only

Locate the real mailbox folder containing an email when it appears in a virtual folder such as All Mail or Starred, returning the source folder path needed for moving or deleting it.

Instructions

Find a real mailbox folder an email belongs to. Required before move_email or delete_email when the email was found in a virtual folder (e.g., "All Mail", "Starred"). Returns the first real folder path found, to use as sourceMailbox; on a label-based server a message may also sit in other folders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYesAccount name from list_accounts
emailIdYesEmail ID (UID) from list_emails
sourceMailboxNoMailbox where the email is currently visible (e.g., "All Mail")INBOX

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv0.2.3

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so safety is covered. The description adds genuine behavioral context beyond that: it returns only the FIRST real folder path, that path is meant as sourceMailbox, and on label-based servers the message may live in other folders too. This caveat about incomplete results is valuable.

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 purpose and the precondition, then the return semantics. Every sentence earns its place; slightly dense but no waste.

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?

No output schema exists, and the description compensates by describing what is returned (first real folder path) and its intended use as sourceMailbox, plus the label-server caveat. Nothing essential for correct invocation is missing.

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 description coverage is 100%, so baseline is 3. The description goes beyond the schema by explaining the role of sourceMailbox ('where the email is currently visible' in a virtual folder) and tying the returned value back to that parameter, adding real semantic linkage.

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 and resource ('Find a real mailbox folder an email belongs to') and explicitly contrasts 'real' folders against 'virtual' ones. This is distinguishable from siblings like list_mailboxes and list_labels without opening any schema.

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?

Explicitly names the triggering condition ('when the email was found in a virtual folder') and the dependent siblings ('Required before move_email or delete_email'). An agent knows exactly when to call this instead of acting directly.

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