Skip to main content
Glama
0x8687

Meme MCP Server

by 0x8687

get-gmail-settings

Retrieve Gmail configuration settings for integration with meme generation workflows in the Meme MCP Server.

Instructions

Get Gmail settings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline handler function for the 'get-gmail-settings' MCP tool. It uses the VercelAIToolSet (Composio integration) to execute the 'GMAIL_GET_SETTINGS' action, retrieves the settings, and formats them as a JSON string in the tool response. Includes error handling and success/failure responses.
    server.tool("get-gmail-settings", "Get Gmail settings", {}, async (args, extra) => {
        try {
            const userAddress = "default-user";
            
            const result = await toolset.executeAction({
                action: "GMAIL_GET_SETTINGS",
                entityId: userAddress,
                params: {}
            });
            
            if (result.successful) {
                const settings = result.data?.response_data as any;
                return {
                    content: [{ 
                        type: "text", 
                        text: `⚙️ Gmail Settings:\n\n${JSON.stringify(settings, null, 2)}` 
                    }],
                };
            } else {
                return {
                    content: [{ 
                        type: "text", 
                        text: `❌ Failed to get Gmail settings: ${result.error || 'Unknown error'}` 
                    }],
                };
            }
        } catch (error) {
            console.error('Error getting Gmail settings:', error);
            return {
                content: [{ 
                    type: "text", 
                    text: `Error getting Gmail settings: ${error instanceof Error ? error.message : String(error)}` 
                }],
            };
        }
    });
  • src/tools.ts:648-683 (registration)
    Registration of the 'get-gmail-settings' tool using server.tool() within the registerTools function. Uses an empty schema object ({}) indicating no input parameters are required.
    server.tool("get-gmail-settings", "Get Gmail settings", {}, async (args, extra) => {
        try {
            const userAddress = "default-user";
            
            const result = await toolset.executeAction({
                action: "GMAIL_GET_SETTINGS",
                entityId: userAddress,
                params: {}
            });
            
            if (result.successful) {
                const settings = result.data?.response_data as any;
                return {
                    content: [{ 
                        type: "text", 
                        text: `⚙️ Gmail Settings:\n\n${JSON.stringify(settings, null, 2)}` 
                    }],
                };
            } else {
                return {
                    content: [{ 
                        type: "text", 
                        text: `❌ Failed to get Gmail settings: ${result.error || 'Unknown error'}` 
                    }],
                };
            }
        } catch (error) {
            console.error('Error getting Gmail settings:', error);
            return {
                content: [{ 
                    type: "text", 
                    text: `Error getting Gmail settings: ${error instanceof Error ? error.message : String(error)}` 
                }],
            };
        }
    });
  • Empty schema ({}) for the 'get-gmail-settings' tool, specifying no input validation or parameters.
    server.tool("get-gmail-settings", "Get Gmail settings", {}, async (args, extra) => {

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