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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools.ts:38-76 (handler)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)}` }], }; } });