Skip to main content
Glama
deyikong

SendGrid MCP Server

by deyikong

Get Email Statistics by Country

get_stats_by_country
Read-onlyIdempotent

Retrieve email engagement statistics grouped by country, with metrics for clicks and opens. Filter results by ISO country code, date range, and daily/weekly/monthly aggregation.

Instructions

Retrieve email statistics grouped by country. Only clicks, unique_clicks, opens, and unique_opens metrics are available. Filtering is by country only (no state/province filter exists).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of results to return per page (SendGrid defaults to 500)
offsetNoNumber of results to skip for pagination
countryNoISO 3166-1 alpha-2 country code to filter by
end_dateNoEnd date in YYYY-MM-DD format (defaults to today)
start_dateYesStart date in YYYY-MM-DD format
aggregated_byNoHow to group the statisticsday

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.1.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Number of results to return per page (SendGrid defaults to 500)",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "description": "Number of results to skip for pagination",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • removedInput schema / properties / state
      Removed value: -{
      -  "description": "State or province to filter by",
      -  "type": "string"
      -}
  2. Changed2 schema fields changedv1.0.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds behavioral constraints beyond annotations: the restricted metric set and the absence of a state/province filter. This helps the agent set expectations, though it stops short of describing the exact response shape or pagination behavior, which is acceptable given the schema covers the parameters.

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?

Two sentences with no redundant words. The primary action and grouping dimension are front-loaded, followed by a compact statement of metric availability and filtering constraints. Every sentence contributes value and the description is appropriately sized for a read-only stats tool.

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?

For a six-parameter tool with no output schema, the description covers the essential aspects: purpose, grouping level, supported metrics, and filtering limitation. It does not spell out response structure or pagination defaults, but those are either implied by the grouping description or documented in the schema. The core usage context is complete enough for correct invocation.

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%, so the baseline is 3. The description adds minimal parameter-specific meaning: it confirms the country filter exists and implies date-range grouping, but it does not elaborate on formats, defaults, or how limit/offset interact with the grouping. The schema already carries the heavy lifting for parameter definitions.

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 opens with a specific verb and resource: 'Retrieve email statistics grouped by country.' It clarifies that only four metrics are available, immediately distinguishing it from sibling stats tools by its grouping dimension. The second sentence reinforces scope with a clear exclusion ('no state/province filter exists'), leaving no ambiguity about what the tool does.

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?

The description provides clear context by stating the grouping is by country and explicitly naming which metrics are available. It also warns that filtering is only by country, which implies the tool is unsuitable for sub-national breakdowns. While it does not name alternative tools or give explicit when-to-use guidance, the context is sufficient for an agent to select it over sibling stats tools.

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