Skip to main content
Glama

get_email_count

Retrieve the total number of messages in your Gmail account and count of emails in your inbox. Use this tool to monitor email volume and manage your inbox effectively.

Instructions

    Get the count of emails in the user's inbox.
    
    This tool retrieves the total number of messages in the user's Gmail account
    and the number of messages in the inbox.
    
    Prerequisites:
    - The user must be authenticated. Check auth://status resource first.
    - If not authenticated, guide the user through the authentication process.
    
    Returns:
        Dict[str, Any]: The email count information including:
            - email: The user's email address
            - total_messages: Total number of messages in the account
            - inbox_messages: Number of messages in the inbox
            - next_page_token: Token for pagination (if applicable)
            
    Example usage:
    1. First check authentication: access auth://status resource
    2. If authenticated, call get_email_count()
    3. If not authenticated, guide user to authenticate first
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/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 effectively describes authentication requirements, return format (dictionary with specific fields), and pagination behavior ('next_page_token'). However, it doesn't mention rate limits, error conditions, or whether the operation is read-only (though implied by 'get').

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

Conciseness3/5

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

The description is well-structured with clear sections (purpose, prerequisites, returns, example) but contains some redundancy. The example usage largely repeats information from prerequisites, and the returns section could be more concise. Most sentences earn their place, but there's room for tighter editing.

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

Completeness4/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is quite complete. It covers purpose, prerequisites, return format, and usage examples. The main gap is the lack of explicit mention that this is a read-only operation (though implied), and no information about potential errors or rate limits.

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 zero parameters with 100% schema description coverage, so the baseline is 4. The description appropriately doesn't discuss parameters since none exist, focusing instead on prerequisites and return values. No additional parameter information is needed or provided.

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

Purpose5/5

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

The description clearly states the tool's purpose with specific verbs ('get', 'retrieves') and resources ('count of emails', 'total number of messages', 'number of messages in the inbox'). It distinguishes this tool from siblings like 'list_emails' (which likely returns message details) and 'get_email' (which retrieves specific messages) by focusing exclusively on counts.

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

Usage Guidelines5/5

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

The description provides explicit usage guidance with prerequisites ('user must be authenticated'), specific alternative actions ('check auth://status resource first', 'guide the user through authentication'), and a step-by-step example. It clearly distinguishes when to use this tool versus authentication-related siblings like 'check_auth_status' and 'authenticate'.

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/bastienchabal/gmail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server