Skip to main content
Glama

Email: Move or label

email_move_or_label
Destructive

Move/label one exact email. The result is the email after the change: on IMAP its id CHANGES (folder+UID), so reuse result.id for any follow-up. Resolve email_id independently, then resolve every human folder name to folder.id. Never put 'Inbox'/'Archive' strings in folders_ids unless the provider actually returned those strings as IDs. Email provider ID: Exact email ID returned by Nilyo for the connected mailbox. On IMAP (and Exchange over IMAP) the ID encodes folder + UID: it CHANGES when the email is moved or a draft is updated; always reuse the id returned by the last operation. Obtain with: email_list_messages or email_list_folder_messages -> email.id; the id returned by email_move_or_label / email_update_draft after a change Never pass: RFC Message-ID unless a tool explicitly documents it, subject, an email_id captured before a move/update on IMAP. 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": {
      "email_id": "<email_id>",
      "folders_ids": "<folders_ids>"
    },
    "name": "email_move_or_label"
  }
}

Input Schema

NameRequiredDescriptionDefault
email_idYesExact provider email ID from email list/read/resolve. Email provider ID: Exact email ID returned by Nilyo for the connected mailbox. On IMAP (and Exchange over IMAP) the ID encodes folder + UID: it CHANGES when the email is moved or a draft is updated; always reuse the id returned by the last operation. Obtain with: email_list_messages or email_list_folder_messages -> email.id; the id returned by email_move_or_label / email_update_draft after a change Never pass: RFC Message-ID unless a tool explicitly documents it, subject, an email_id captured before a move/update on IMAP.
specificsNo
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.
folders_idsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / email_id / description
      Previous value: -"Exact provider email ID from email list/read/resolve. Email provider ID: Exact email ID returned by Nilyo/Unipile for the connected mailbox. On IMAP (and Exchange over IMAP) the ID encodes folder + UID: it CHANGES when the email is moved or a draft is updated; always reuse the id returned by the last operation. Obtain with: email_list_messages or email_list_folder_messages -> email.id; the id returned by email_move_or_label / email_update_draft after a change Never pass: RFC Message-ID unless a tool explicitly documents it, subject, an email_id captured before a move/update on IMAP."New value: +"Exact provider email ID from email list/read/resolve. Email provider ID: Exact email ID returned by Nilyo for the connected mailbox. On IMAP (and Exchange over IMAP) the ID encodes folder + UID: it CHANGES when the email is moved or a draft is updated; always reuse the id returned by the last operation. Obtain with: email_list_messages or email_list_folder_messages -> email.id; the id returned by email_move_or_label / email_update_draft after a change Never pass: RFC Message-ID unless a tool explicitly documents it, subject, an email_id captured before a move/update on IMAP."
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, readOnlyHint=false and idempotentHint=false, but the description adds the non-obvious reason: on IMAP the id encodes folder+UID and CHANGES after a move, so the returned result.id must be reused. That is genuine behavioral value an agent cannot get from the annotations. It stops short of stating side effects explicitly, e.g. that an IMAP move removes the message from the source folder, or whether the operation is reversible.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The action statement and the IMAP id-change warning are correctly front-loaded, but the second half is verbatim duplication of the input schema's parameter descriptions ("Email provider ID: ... Obtain with: ... Never pass: ..."), which adds bulk without adding information. Roughly half the text would be removable with no loss for an agent that can read the schema.

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

Completeness3/5

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

For a destructive 4-parameter mutation with no output schema, the critical IMAP re-ID behavior and ID-provenance rules are well covered. However, two things an agent needs are missing: what `specifics` is for, and what multiple entries in folders_ids mean (Gmail add-labels vs. an actual move/copy for IMAP). That ambiguity matters for a destructive operation.

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 coverage is 50%, and the description largely re-pastes the schema's own text for email_id and folders_ids rather than adding new meaning. The one increment is the ordering constraint ("resolve email_id independently, then resolve... folder.id") and the caveat that 'Inbox'/'Archive' strings are acceptable only if the provider literally returned them as IDs. The nested `specifics` object is undocumented in both schema and description, which is an unaddressed gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

First sentence gives a specific verb and resource ("Move/label one exact email") and scopes it to a single exact message, which is unambiguous against siblings like email_trash or email_delete_draft. It does not explicitly contrast itself with those siblings (move vs. trash vs. move-to-folder), so it stops short of a 5.

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?

Provides a concrete pre-call workflow: resolve email_id independently, resolve every human folder name to folder.id, and never put 'Inbox'/'Archive' strings in folders_ids. It also names the source tools that yield valid IDs (email_list_messages, email_list_folder_messages, email_list_folders). What it lacks is any explicit exclusion such as "use email_trash to remove a message" or a note on when to prefer email_update_folder.

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.