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)}` 
                }],
            };
        }
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Check') but doesn't reveal any behavioral traits such as whether it requires authentication, what the output format might be (e.g., boolean, detailed status), or if it has side effects (e.g., logging, rate limits). This leaves significant gaps for an agent to understand how to invoke it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste—'Check Gmail connection status' is front-loaded and directly conveys the core purpose without unnecessary words. Every part of the sentence earns its place by specifying the action and target.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (a diagnostic tool with no parameters) and the absence of both annotations and an output schema, the description is incomplete. It doesn't explain what 'connection status' means or what the tool returns, leaving the agent uncertain about the outcome. For a tool that likely provides critical system information, more context is needed to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and the schema description coverage is 100% (since there are no parameters to describe). The description doesn't need to add parameter semantics, so it meets the baseline of 4 for tools with no parameters, as it doesn't have to compensate for any schema gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Check') and resource ('Gmail connection status'), making the purpose immediately understandable. It distinguishes this from siblings like 'connect-gmail' (which likely establishes a connection) and 'get-gmail-settings' (which retrieves configuration). However, it doesn't specify what 'connection status' entails (e.g., authentication validity, API availability), keeping it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't clarify if this should be used before attempting other Gmail operations, or if it's redundant when 'connect-gmail' is available. The description implies a diagnostic use but lacks explicit context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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