Skip to main content
Glama
0x8687

Meme MCP Server

by 0x8687

mark-as-read

Mark emails as read by providing email IDs to clear unread notifications and organize your inbox.

Instructions

Mark emails as read

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailIdsYesArray of email IDs to mark as read

Implementation Reference

  • src/tools.ts:534-570 (registration)
    Full registration of the 'mark-as-read' MCP tool, including schema, description, and inline handler that delegates to Composio's GMAIL_MARK_AS_READ action to mark specified Gmail email IDs as read.
    server.tool("mark-as-read", "Mark emails as read", {
        emailIds: z.array(z.string()).describe("Array of email IDs to mark as read"),
    }, async (args, extra) => {
        try {
            const userAddress = "default-user";
            
            const result = await toolset.executeAction({
                action: "GMAIL_MARK_AS_READ",
                entityId: userAddress,
                params: args
            });
            
            if (result.successful) {
                return {
                    content: [{ 
                        type: "text", 
                        text: `✅ Emails marked as read successfully!\n\nMarked ${args.emailIds.length} email(s) as read.` 
                    }],
                };
            } else {
                return {
                    content: [{ 
                        type: "text", 
                        text: `❌ Failed to mark emails as read: ${result.error || 'Unknown error'}` 
                    }],
                };
            }
        } catch (error) {
            console.error('Error marking emails as read:', error);
            return {
                content: [{ 
                    type: "text", 
                    text: `Error marking emails as read: ${error instanceof Error ? error.message : String(error)}` 
                }],
            };
        }
    });
  • The handler function that implements the core logic of the 'mark-as-read' tool by calling Composio's executeAction with 'GMAIL_MARK_AS_READ' and handling the response.
    }, async (args, extra) => {
        try {
            const userAddress = "default-user";
            
            const result = await toolset.executeAction({
                action: "GMAIL_MARK_AS_READ",
                entityId: userAddress,
                params: args
            });
            
            if (result.successful) {
                return {
                    content: [{ 
                        type: "text", 
                        text: `✅ Emails marked as read successfully!\n\nMarked ${args.emailIds.length} email(s) as read.` 
                    }],
                };
            } else {
                return {
                    content: [{ 
                        type: "text", 
                        text: `❌ Failed to mark emails as read: ${result.error || 'Unknown error'}` 
                    }],
                };
            }
        } catch (error) {
            console.error('Error marking emails as read:', error);
            return {
                content: [{ 
                    type: "text", 
                    text: `Error marking emails as read: ${error instanceof Error ? error.message : String(error)}` 
                }],
            };
        }
    });
  • Input schema for the 'mark-as-read' tool defining the required 'emailIds' parameter as an array of strings.
    emailIds: z.array(z.string()).describe("Array of email IDs to mark as read"),
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. While 'mark as read' implies a mutation operation, the description doesn't specify whether this requires specific permissions, if changes are reversible, what happens if email IDs are invalid, or any rate limits. It provides minimal behavioral context beyond the basic action.

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 with just three words that directly convey the core functionality. Every word earns its place, and there's no unnecessary information or 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?

For a mutation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what happens after marking emails as read, whether the operation is synchronous, what errors might occur, or any side effects. The minimal description leaves too many behavioral 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?

Schema description coverage is 100%, with the single parameter 'emailIds' clearly documented in the schema. The description doesn't add any parameter information beyond what's already in the schema, so it meets the baseline score 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 read') and the resource ('emails'), making the purpose immediately understandable. However, it doesn't differentiate from the sibling 'mark-as-unread' tool, which performs the opposite operation on the same resource type.

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 is provided about when to use this tool versus alternatives. The description doesn't mention prerequisites (like needing connected Gmail), when not to use it, or how it differs from similar tools like 'mark-as-unread'.

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