Skip to main content
Glama
0x8687

Meme MCP Server

by 0x8687

mark-as-read

Automatically mark specific emails as read by providing their IDs. This tool simplifies email management, helping users prioritize and organize their inbox efficiently.

Instructions

Mark emails as read

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailIdsYesArray of email IDs to mark as read

Implementation Reference

  • The handler function that implements the core logic of the 'mark-as-read' tool. It uses the Composio toolset to execute the 'GMAIL_MARK_AS_READ' action with the provided emailIds and returns formatted success or error messages.
    }, 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)}` }], }; } });
  • Zod schema defining the input parameters for the 'mark-as-read' tool, specifically an array of email ID strings.
    emailIds: z.array(z.string()).describe("Array of email IDs to mark as read"),
  • src/tools.ts:534-570 (registration)
    The server.tool registration call for the 'mark-as-read' tool, specifying name, description, input schema, and the handler function.
    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)}` }], }; } });

Other Tools

Related 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