Skip to main content
Glama
0x8687

Meme MCP Server

by 0x8687

mark-as-unread

Mark emails as unread to return them to your inbox for later review. Use this tool to manage email visibility by specifying email IDs.

Instructions

Mark emails as unread

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailIdsYesArray of email IDs to mark as unread

Implementation Reference

  • src/tools.ts:572-608 (registration)
    Registration of the 'mark-as-unread' MCP tool using server.tool, including description, Zod input schema, and inline async handler function.
    server.tool("mark-as-unread", "Mark emails as unread", {
        emailIds: z.array(z.string()).describe("Array of email IDs to mark as unread"),
    }, async (args, extra) => {
        try {
            const userAddress = "default-user";
            
            const result = await toolset.executeAction({
                action: "GMAIL_MARK_AS_UNREAD",
                entityId: userAddress,
                params: args
            });
            
            if (result.successful) {
                return {
                    content: [{ 
                        type: "text", 
                        text: `✅ Emails marked as unread successfully!\n\nMarked ${args.emailIds.length} email(s) as unread.` 
                    }],
                };
            } else {
                return {
                    content: [{ 
                        type: "text", 
                        text: `❌ Failed to mark emails as unread: ${result.error || 'Unknown error'}` 
                    }],
                };
            }
        } catch (error) {
            console.error('Error marking emails as unread:', error);
            return {
                content: [{ 
                    type: "text", 
                    text: `Error marking emails as unread: ${error instanceof Error ? error.message : String(error)}` 
                }],
            };
        }
    });
  • The core handler function for executing the 'mark-as-unread' tool. It uses VercelAIToolSet's executeAction to perform 'GMAIL_MARK_AS_UNREAD' with the provided emailIds, handles success/error responses, and returns formatted text content.
    }, async (args, extra) => {
        try {
            const userAddress = "default-user";
            
            const result = await toolset.executeAction({
                action: "GMAIL_MARK_AS_UNREAD",
                entityId: userAddress,
                params: args
            });
            
            if (result.successful) {
                return {
                    content: [{ 
                        type: "text", 
                        text: `✅ Emails marked as unread successfully!\n\nMarked ${args.emailIds.length} email(s) as unread.` 
                    }],
                };
            } else {
                return {
                    content: [{ 
                        type: "text", 
                        text: `❌ Failed to mark emails as unread: ${result.error || 'Unknown error'}` 
                    }],
                };
            }
        } catch (error) {
            console.error('Error marking emails as unread:', error);
            return {
                content: [{ 
                    type: "text", 
                    text: `Error marking emails as unread: ${error instanceof Error ? error.message : String(error)}` 
                }],
            };
        }
  • Zod schema defining the input parameters for the tool: an array of string email IDs.
    emailIds: z.array(z.string()).describe("Array of email IDs to mark as unread"),
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. 'Mark emails as unread' implies a mutation operation, but it fails to describe key traits like whether it requires specific permissions, if changes are reversible, potential rate limits, or what happens on success/failure. This leaves significant gaps for an agent to understand the tool's behavior.

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, direct sentence with zero wasted words, making it highly concise and front-loaded. It efficiently communicates the core action without unnecessary elaboration, earning full marks for brevity and clarity.

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 lack of annotations and output schema, the description is incomplete for a mutation tool. It does not address behavioral aspects like error handling, return values, or operational constraints, leaving the agent with insufficient context to use the tool effectively beyond basic parameter input.

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%, with the parameter 'emailIds' fully documented in the schema as 'Array of email IDs to mark as unread'. The description does not add any additional meaning or context beyond this, such as format examples or constraints, so it meets the baseline for high schema coverage without compensating value.

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 'Mark emails as unread' clearly states the verb ('mark') and resource ('emails') with a specific action ('as unread'), making the purpose immediately understandable. However, it does not explicitly differentiate from the sibling tool 'mark-as-read', which is a minor gap in sibling distinction.

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 like 'mark-as-read' or other email management tools in the sibling list. It lacks context about prerequisites, such as needing valid email IDs or when marking as unread is appropriate (e.g., after reading or for follow-up).

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/0x8687/mcp-gmail-v1'

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