Skip to main content
Glama

mark_flagged

Mark email messages as flagged or starred to highlight important communications for easy identification and follow-up in your email management workflow.

Instructions

Mark email as flagged (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

  • The actual implementation of the mark_flagged tool logic which calls _store_flags.
    def mark_flagged(self, folder: str, uids: int | list[int]) -> bool:
        """
        Mark emails as flagged/starred.
    
        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)
  • The registration of the mark_flagged tool with its schema definition in __main__.py.
        name="mark_flagged",
        description="添加星标",
        inputSchema={
            "type": "object",
            "properties": {
                "folder": {"type": "string", "default": "INBOX"},
                "uid": {"type": "integer", "description": "邮件 UID"},
            },
            "required": ["uid"],
        },
    ),
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Mark' implies a mutation, the description lacks details on idempotency (can you flag an already flagged email?), side effects, or return values.

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

Conciseness4/5

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

The single sentence is efficient and front-loaded with the core action. However, it is minimal to the point of under-specification given the lack of annotations; additional context could be added without sacrificing clarity.

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 tool with 100% schema coverage and simple boolean-like state change, the description is minimally adequate. However, given zero annotations and no output schema, the description should disclose behavioral traits (mutations, idempotency) to be fully complete.

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?

With 100% schema description coverage, the schema fully documents all three parameters including the default folder value and the message identifier options. The description adds no additional parameter context, meeting the baseline expectation when schema coverage is high.

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 (mark as flagged) and clarifies the terminology with '(starred)'. However, it does not explicitly differentiate from the sibling tool 'unmark_flagged' or explain when to use this versus other marking 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?

No guidance provided on when to use this tool versus alternatives like 'unmark_flagged', nor any mention of prerequisites (e.g., email must exist) or when to prefer 'message_id' vs 'uid'.

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