Skip to main content
Glama
0x8687

Meme MCP Server

by 0x8687

check-gmail-connection

Verify Gmail connectivity status to confirm successful integration with the Meme MCP Server for meme generation workflows.

Instructions

Check Gmail connection status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline handler function for the "check-gmail-connection" tool. It checks the Gmail connection status by attempting to execute the GMAIL_GET_PROFILE action using the Composio VercelAIToolSet. If successful, it returns the user's Gmail profile details; otherwise, it reports the connection is not established or an error occurred.
    server.tool("check-gmail-connection", "Check Gmail connection status", {}, async (args, extra) => { try { console.log('args ', args); console.log('extra ', extra); const userAddress = "default-user"; const result = await toolset.executeAction({ action: "GMAIL_GET_PROFILE", entityId: userAddress, params: {} }); if (result.successful) { const profile = result.data?.response_data as any; return { content: [{ type: "text", text: `✅ Your Gmail account is connected!\n\nUser Profile:\n• Email: ${profile.emailAddress}\n• Messages: ${profile.messagesTotal} total\n• Threads: ${profile.threadsTotal} total` }], }; } else { return { content: [{ type: "text", text: "❌ Your Gmail account is not connected! Please use the connect-gmail tool first." }], }; } } catch (error) { console.error('Error checking Gmail connection:', error); return { content: [{ type: "text", text: `Error checking Gmail connection: ${error instanceof Error ? error.message : String(error)}` }], }; } });
  • src/tools.ts:38-76 (registration)
    The registration of the "check-gmail-connection" MCP tool on the server, including empty input schema {} and the inline handler function.
    server.tool("check-gmail-connection", "Check Gmail connection status", {}, async (args, extra) => { try { console.log('args ', args); console.log('extra ', extra); const userAddress = "default-user"; const result = await toolset.executeAction({ action: "GMAIL_GET_PROFILE", entityId: userAddress, params: {} }); if (result.successful) { const profile = result.data?.response_data as any; return { content: [{ type: "text", text: `✅ Your Gmail account is connected!\n\nUser Profile:\n• Email: ${profile.emailAddress}\n• Messages: ${profile.messagesTotal} total\n• Threads: ${profile.threadsTotal} total` }], }; } else { return { content: [{ type: "text", text: "❌ Your Gmail account is not connected! Please use the connect-gmail tool first." }], }; } } catch (error) { console.error('Error checking Gmail connection:', error); return { content: [{ type: "text", text: `Error checking Gmail connection: ${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