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

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