Skip to main content
Glama
0x8687

Meme MCP Server

by 0x8687

move-to-trash

Move emails to trash by specifying their IDs, helping users manage inbox clutter effectively within the Meme MCP Server environment.

Instructions

Move emails to trash

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailIdsYesArray of email IDs to move to trash

Implementation Reference

  • src/tools.ts:610-646 (registration)
    Full registration of the 'move-to-trash' tool, including schema and inline handler function that delegates to Composio's GMAIL_MOVE_TO_TRASH action.
    server.tool("move-to-trash", "Move emails to trash", { emailIds: z.array(z.string()).describe("Array of email IDs to move to trash"), }, async (args, extra) => { try { const userAddress = "default-user"; const result = await toolset.executeAction({ action: "GMAIL_MOVE_TO_TRASH", entityId: userAddress, params: args }); if (result.successful) { return { content: [{ type: "text", text: `🗑️ Emails moved to trash successfully!\n\nMoved ${args.emailIds.length} email(s) to trash.` }], }; } else { return { content: [{ type: "text", text: `❌ Failed to move emails to trash: ${result.error || 'Unknown error'}` }], }; } } catch (error) { console.error('Error moving emails to trash:', error); return { content: [{ type: "text", text: `Error moving emails to trash: ${error instanceof Error ? error.message : String(error)}` }], }; } });
  • The core handler logic for 'move-to-trash' tool. It executes the 'GMAIL_MOVE_TO_TRASH' action using the VercelAIToolSet 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_MOVE_TO_TRASH", entityId: userAddress, params: args }); if (result.successful) { return { content: [{ type: "text", text: `🗑️ Emails moved to trash successfully!\n\nMoved ${args.emailIds.length} email(s) to trash.` }], }; } else { return { content: [{ type: "text", text: `❌ Failed to move emails to trash: ${result.error || 'Unknown error'}` }], }; } } catch (error) { console.error('Error moving emails to trash:', error); return { content: [{ type: "text", text: `Error moving emails to trash: ${error instanceof Error ? error.message : String(error)}` }], }; } });
  • Zod input schema defining the required 'emailIds' parameter as an array of strings.
    emailIds: z.array(z.string()).describe("Array of email IDs to move to trash"),

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