Skip to main content
Glama
0x8687

Meme MCP Server

by 0x8687

mark-as-unread

Mark specific emails as unread by inputting their IDs. Useful for managing email follow-ups or reminders within the Meme MCP Server environment.

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 MCP tool 'mark-as-unread', including Zod schema for emailIds parameter and inline async handler that delegates to VercelAIToolSet.executeAction for 'GMAIL_MARK_AS_UNREAD' action.
    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)}` }], }; } });
  • Input schema using Zod: array of email ID strings.
    emailIds: z.array(z.string()).describe("Array of email IDs to mark as unread"), }, async (args, extra) => {
  • Handler function that executes the tool logic: calls toolset.executeAction with GMAIL_MARK_AS_UNREAD, handles success/error and returns MCP content response.
    }, 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)}` }], }; } });
  • VercelAIToolSet instance (from composio-core) used by the handler to perform the actual Gmail 'mark as unread' action.
    const toolset = new VercelAIToolSet({ apiKey: process.env.COMPOSIO_API_KEY || '4xyic69yfd4610srw8cebg', });
  • src/index.ts:11-11 (registration)
    Calls registerTools(server) which includes registration of the 'mark-as-unread' tool.
    registerTools(server);

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