Skip to main content
Glama

Hail Communication for AI

Get email stats

get_email_stats
Read-onlyIdempotent

Read workspace email delivery counts, rates and time series.

    Without ``from_`` and ``to``, the range is the last seven days.
    Hourly ranges are limited to eight days; all ranges to 92 days.
    Returns ``from``, ``to``, ``bucket``, ``totals``, ``rates`` and ``series``.
    Rates are null when the sent count is zero.
    Open and click counts cover HTML emails only; plain-text emails lower these rates.
    An upstream failure returns an error.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_email_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnd of the counting window, with a time zone. Omitted: now.
from_NoStart of the counting window, with a time zone. Omitted: seven days before ``to``.
bucketNoTime span each point in ``series`` counts. Hourly points suit short ranges; daily points suit weeks.day
llm_modelNoModel ID of the calling agent. Optional. Recorded for analytics only.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / bucket / description
      Previous value: -"Length of each step in the time series."New value: +"Time span each point in ``series`` counts. Hourly points suit short ranges; daily points suit weeks."
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "Model ID of the calling agent. Optional. Recorded for analytics only.",
      +  "type": "string"
      +}
  2. Changed6 schema fields changed
    • changedInput schema / properties / bucket / description
      Previous value: -"Time series step: ``day`` or ``hour``."New value: +"Length of each step in the time series."
    • addedInput schema / properties / bucket / enum
      Added value: +[
      +  "hour",
      +  "day"
      +]
    • changedInput schema / properties / from_ / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "format": "date-time",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / from_ / description
      Previous value: -"Range start as an ISO 8601 timestamp."New value: +"Start of the counting window, with a time zone. Omitted: seven days before ``to``."
    • changedInput schema / properties / to / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "format": "date-time",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / to / description
      Previous value: -"Range end as an ISO 8601 timestamp."New value: +"End of the counting window, with a time zone. Omitted: now."
  3. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, idempotent), and the description adds real value beyond them: default window behavior, range caps, null rates when sent count is zero, the HTML-only caveat that depresses open/click rates, and an explicit upstream-failure mode. It is slightly weaker by spending a sentence enumerating return keys that the output schema already carries.

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

Conciseness4/5

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

Front-loaded with the purpose, then a tight list of constraints and caveats; each line carries information. The return-field enumeration is mildly redundant given the output schema exists, which keeps it from a 5.

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

Completeness5/5

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

For a read-only stats tool with an output schema and full parameter coverage, the description supplies everything needed to call it correctly: defaults, range limits, bucket implications, and the HTML-only measurement caveat that would otherwise mislead an agent interpreting rates.

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

Parameters3/5

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

Schema description coverage is 100% and each parameter is already well documented in the schema, including defaults for from_/to and the hour-vs-day tradeoff for bucket. The description reinforces the range semantics and adds the hourly eight-day cap, but contributes little new meaning at the parameter level, so the baseline 3 applies.

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?

States a specific verb and resource ('Read workspace email delivery counts, rates and time series') and scopes it to workspace level, which separates it from entity-scoped siblings like get_email or get_email_events. It stops short of naming an alternative when per-message or event-level data is wanted, so a 4 rather than a 5.

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

Usage Guidelines4/5

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

Gives concrete operating context: default window of last seven days when from_/to are omitted, an eight-day cap on hourly ranges and a 92-day cap overall. It does not address when to prefer this over get_email_events or get_email, so it lacks explicit sibling routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources