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"),

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