Skip to main content
Glama
codefuturist

Email MCP Server

by codefuturist

Add label

add_label
Idempotent

Assign a label to a specific email: copies it into a ProtonMail label folder or sets a keyword flag on Gmail and standard IMAP.

Instructions

Add a label to an email. For ProtonMail, this copies the email into the corresponding Labels/ folder. For Gmail and standard IMAP, this sets a keyword flag on the message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYesLabel name to add (e.g., "Important", "Project-X")
accountYesAccount name from list_accounts
emailIdYesEmail ID (UID) from list_emails
mailboxYesMailbox containing the email (must be a real folder)

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/5.0
Behavior4/5

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

Annotations already declare mutation (readOnlyHint=false), idempotency (idempotentHint=true), and non-destructiveness (destructiveHint=false). The description adds valuable provider-specific behavior: ProtonMail copies the message into a Labels/<name> folder, while Gmail and standard IMAP set a keyword flag. It stops short of covering error handling when the label is absent or permission requirements.

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?

Two tight sentences: the first states the action, the second explains provider-dependent side effects. Every sentence is front-loaded and earns its place with no redundancy.

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?

With no output schema and full schema coverage, the description plus annotations are nearly sufficient. It explains the action and provider behavior but omits what happens if the specified label does not exist (error vs. auto-create), which would be useful for a mutation tool.

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 all four parameters are already well documented in the schema itself. The description adds no additional parameter-level meaning, so the baseline 3 applies.

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 'Add' and resource 'label' scoped to 'an email', clearly distinguishing it from sibling tools like create_label, remove_label, and delete_label that operate on the label entity itself rather than applying a label to a message.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage—use this when you want to attach a label to an email—but does not explicitly state when to choose it over alternatives like mark_email, move_email, or create_label, nor does it mention prerequisites such as the label already existing.

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