Skip to main content
Glama
Soundhannes

IMAP MCP Server

by Soundhannes

get_mailbox_status

Retrieve mailbox status including message count and unseen messages to monitor email account activity and manage inbox organization.

Instructions

Get mailbox status (message count, unseen, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mailboxYesMailbox name

Implementation Reference

  • The core handler implementation for get_mailbox_status, which queries the IMAP client for folder status.
    def get_mailbox_status(self, mailbox: str) -> MailboxStatus:
        """Get mailbox status (message count, unseen, etc.)."""
        self._ensure_connected()
        status = self.client.folder_status(
            mailbox, ["MESSAGES", "RECENT", "UNSEEN", "UIDNEXT", "UIDVALIDITY"]
        )
        return MailboxStatus(
            name=mailbox,
            exists=status.get(b"MESSAGES", 0),
            recent=status.get(b"RECENT", 0),
            unseen=status.get(b"UNSEEN", 0),
            uidnext=status.get(b"UIDNEXT", 0),
            uidvalidity=status.get(b"UIDVALIDITY", 0),
        )
  • The tool registration/dispatch logic for get_mailbox_status within the MCP server.
    elif name == "get_mailbox_status":
        return imap_client.get_mailbox_status(args["mailbox"])
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a 'Get' operation, implying read-only behavior, but doesn't specify whether it requires authentication, has rate limits, returns real-time or cached data, or what format the output takes. The description is minimal and lacks critical operational context for a tool that likely interacts with a mail system.

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 extremely concise at just 7 words, with zero wasted language. It's front-loaded with the core purpose and includes helpful examples of what 'status' includes. Every word earns its place in this minimal but complete statement of function.

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 moderate complexity (retrieving status from a mail system), lack of annotations, and no output schema, the description is insufficiently complete. It doesn't explain what specific status fields are returned, whether authentication is required, if there are any side effects, or how errors are handled. For a tool with no structured behavioral metadata, this description leaves too many operational questions unanswered.

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?

The input schema has 100% description coverage, with the single parameter 'mailbox' clearly documented as 'Mailbox name'. The description adds no additional parameter information beyond what's in the schema. According to scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description.

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 tool's purpose with a specific verb ('Get') and resource ('mailbox status'), and specifies what information is retrieved ('message count, unseen, etc.'). It distinguishes itself from sibling tools like 'get_unread_count' by providing broader status information, though it doesn't explicitly differentiate from 'list_mailboxes' which might provide some overlapping data.

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 when to choose this over 'get_unread_count' for just unread counts, 'list_mailboxes' for mailbox listings, or 'get_total_count' for total messages. There are no prerequisites, exclusions, or context provided for usage decisions.

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