Skip to main content
Glama
0x8687

Meme MCP Server

by 0x8687

create-label

Generate and manage Gmail labels by specifying name, label list visibility, and message list visibility using this tool from the Meme MCP Server.

Instructions

Create a new Gmail label

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelListVisibilityNoVisibility of the label in the label list
messageListVisibilityNoVisibility of the label in the message list
nameYesThe name of the label to create

Implementation Reference

  • The handler function that implements the core logic of the 'create-label' tool by executing the Composio 'GMAIL_CREATE_LABEL' action via the VercelAIToolSet.
    }, async (args, extra) => { try { const userAddress = "default-user"; const result = await toolset.executeAction({ action: "GMAIL_CREATE_LABEL", entityId: userAddress, params: args }); if (result.successful) { return { content: [{ type: "text", text: `✅ Label created successfully!\n\nLabel: ${args.name}\nID: ${(result.data?.response_data as any)?.id}` }], }; } else { return { content: [{ type: "text", text: `❌ Failed to create label: ${result.error || 'Unknown error'}` }], }; } } catch (error) { console.error('Error creating label:', error); return { content: [{ type: "text", text: `Error creating label: ${error instanceof Error ? error.message : String(error)}` }], }; } });
  • Zod input schema for the 'create-label' tool defining parameters: name (required string), labelListVisibility and messageListVisibility (optional strings).
    name: z.string().describe("The name of the label to create"), labelListVisibility: z.string().optional().describe("Visibility of the label in the label list"), messageListVisibility: z.string().optional().describe("Visibility of the label in the message list"),
  • src/tools.ts:403-441 (registration)
    Registration of the 'create-label' MCP tool on the server, including schema and inline handler.
    server.tool("create-label", "Create a new Gmail label", { name: z.string().describe("The name of the label to create"), labelListVisibility: z.string().optional().describe("Visibility of the label in the label list"), messageListVisibility: z.string().optional().describe("Visibility of the label in the message list"), }, async (args, extra) => { try { const userAddress = "default-user"; const result = await toolset.executeAction({ action: "GMAIL_CREATE_LABEL", entityId: userAddress, params: args }); if (result.successful) { return { content: [{ type: "text", text: `✅ Label created successfully!\n\nLabel: ${args.name}\nID: ${(result.data?.response_data as any)?.id}` }], }; } else { return { content: [{ type: "text", text: `❌ Failed to create label: ${result.error || 'Unknown error'}` }], }; } } catch (error) { console.error('Error creating label:', error); return { content: [{ type: "text", text: `Error creating label: ${error instanceof Error ? error.message : String(error)}` }], }; } });

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