Skip to main content
Glama

unmark_flagged

Remove flagged status from emails in the Mail MCP Server. This tool clears starred markers from messages to help organize your inbox by unmarking previously flagged items.

Instructions

Unmark email as flagged (remove starred)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderNoFolder containing the email (default: INBOX)INBOX
message_idNoMessage ID (sequence number)
uidNoUnique ID of the message

Implementation Reference

  • Implementation of the unmark_flagged logic.
    def unmark_flagged(self, folder: str, uids: int | list[int]) -> bool:
        """
        Remove flagged/starred status from emails.
    
        Args:
            folder: Folder containing the emails
            uids: Email UID or list of UIDs
    
        Returns:
            True if successful
    
        Raises:
            EmailFlagsError: If operation fails
        """
        return self._store_flags(folder, uids, "-FLAGS", self.FLAG_FLAGGED)
  • Tool definition and registration for unmark_flagged.
    Tool(
        name="unmark_flagged",
        description="Unmark email as flagged (remove starred)",
        inputSchema={
            "type": "object",
            "properties": {
                "folder": {
                    "type": "string",
                    "description": "Folder containing the email (default: INBOX)",
                    "default": "INBOX",
                },
                "message_id": {
                    "type": "string",
                    "description": "Message ID (sequence number)",
                },
Behavior2/5

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

With no annotations provided, the description carries the full burden and only discloses the basic mutation (removing a flag). It lacks critical behavioral details: idempotency (can it unmark already unmarked emails?), error handling, permission requirements, or side effects.

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. The parenthetical '(remove starred)' adds clarifying synonymy without clutter, making it appropriately front-loaded and dense with information.

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?

For a simple 3-parameter state-toggle tool with complete schema coverage and no output schema, the description is sufficient. It could be improved by referencing the sibling 'mark_flagged' tool or noting the return behavior, but the core functionality is adequately covered.

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 description does not mention any parameters, but the input schema has 100% description coverage, establishing a baseline of 3. The schema adequately documents the folder default and the message_id/uid alternatives without needing descriptive elaboration.

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?

The description uses a specific verb ('Unmark') with clear resource ('email') and clarifies the action removes the 'starred' status. It effectively distinguishes from the sibling 'mark_flagged' tool through the contrasting verb and parenthetical clarification.

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 through the verb 'Unmark' (suggesting use when removing a flag), but provides no explicit when-to-use guidance, prerequisites (e.g., email must be flagged), or mention of the inverse operation (mark_flagged).

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/AdJIa/mail-mcp-server'

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