Skip to main content
Glama
Soundhannes

IMAP MCP Server

by Soundhannes

move_email

Transfer emails between mailboxes to organize your inbox by moving selected messages to specified folders.

Instructions

Move emails to another mailbox

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidsYesEmail UIDs
destinationYesDestination mailbox
mailboxNoSource mailbox (default: current)

Implementation Reference

  • The actual implementation of the move_email tool which interacts with the IMAP client.
    def move_email(
        self, uids: list[int], destination: str, mailbox: Optional[str] = None
    ) -> bool:
        """Move emails to another mailbox."""
        self._ensure_connected()
        if mailbox:
            self.select_mailbox(mailbox)
        self.client.move(uids, destination)
        return True
  • Tool registration and schema definition for move_email.
    make_tool(
        "move_email",
        "Move emails to another mailbox",
        {
            "uids": {
                "type": "array",
                "items": {"type": "number"},
                "description": "Email UIDs",
            },
            "destination": {"type": "string", "description": "Destination mailbox"},
            "mailbox": {"type": "string", "description": "Source mailbox (default: current)"},
        },
        ["uids", "destination"],
    ),
  • Tool dispatch logic that calls the move_email handler.
    elif name == "move_email":
        return imap_client.move_email(
            uids=args["uids"],
            destination=args["destination"],
            mailbox=args.get("mailbox"),
        )
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the action ('move') but doesn't disclose behavioral traits: it doesn't specify if this is destructive (emails removed from source), permission requirements, error handling (e.g., invalid UIDs), or side effects. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 a single, efficient sentence with zero waste. It's front-loaded with the core action and resource, making it easy to parse. Every word earns its place by conveying the essential purpose without redundancy.

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

Completeness2/5

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

Given the tool's complexity (mutation operation with 3 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like effects on source mailbox, error cases, or return values. For a tool that modifies email state, more context is needed to ensure safe and correct usage.

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 the schema already documents all three parameters (uids, destination, mailbox) with descriptions. The description adds no additional meaning beyond what the schema provides, such as format examples or constraints. Baseline 3 is appropriate when schema does the heavy lifting, but no extra value is added.

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?

The description clearly states the action ('move') and resource ('emails'), specifying the destination ('to another mailbox'). It distinguishes from copy_email by implying relocation rather than duplication, though not explicitly. However, it lacks specific differentiation from other sibling tools like archive_email or select_mailbox, which could involve similar mailbox operations.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing UIDs from fetch_emails), exclusions (e.g., not for archiving), or comparisons to siblings like copy_email (move vs. copy) or archive_email (move to archive vs. general mailbox). Usage is implied but not articulated.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Soundhannes/IMAP-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server