Skip to main content
Glama

Cooper Email

Get mail metrics

cooper_get_metrics
Read-onlyIdempotent

Use this when you need counts of mail over time, current usage, or bounce and complaint rates for this account. Read-only; requires auth and message_read. Inputs: kind (required; events, usage, or rates), inbox_id (optional; inbox id, username, or email), start and end (optional ISO-8601 timestamps; default the last 30 days; used by events and rates), period (optional; hour or day; default day; events only), types (optional comma-separated message.received, message.sent, message.bounced, message.complained; default message.received,message.sent; events only). events returns {object:"metrics", period, data:[{bucket_start, counts}]}. Buckets are UTC. received and sent follow messages.direction inbound and outbound. bounced and complained follow those labels and are zero when the label is absent. usage returns {inbox_count, message_count, thread_count, storage_bytes} and, when the key is not inbox-scoped and inbox_id is omitted, domain_count and workspace_count for this account only. storage_bytes is the UTF-8 size of text plus html plus attachment bytes. It is not the message body. rates returns {sent, bounced, complained, bounce_rate, complaint_rate}. Rates are 0 when sent is 0. A range over 90 days, or a start that is not before end, returns 400 invalid_range. A bad timestamp returns 400 invalid_date. A bad period returns 400 invalid_period. An unknown type returns 400 invalid_type. An unknown kind returns 400 invalid_kind. Another account's inbox, or a different inbox for an inbox-scoped key, returns 404 inbox_not_found. A key without message_read returns 403 permission_denied. A sub-account sees only its own mail, inboxes, domains, and workspaces. Held message bodies are not included.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoISO-8601 end, exclusive. Defaults to now. The span from start to end cannot exceed 90 days.
kindYesevents for time buckets, usage for current totals, or rates for bounce and complaint rates.
startNoISO-8601 start, inclusive. Defaults to 30 days before end. Used by events and rates.
typesNoComma-separated events series: message.received, message.sent, message.bounced, message.complained. Default message.received,message.sent.
periodNoBucket size for events. hour or day. Default day. Ignored for usage and rates.
inbox_idNoInbox id (inb_…), username, or full email address on this account. Omit for the whole account. An inbox-scoped key is limited to its inbox.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover the read-only/idempotent/non-destructive profile, yet the description adds substantial context: auth and message_read requirement, UTC bucketing, sub-account scoping, exclusion of held message bodies, and the exact meaning of storage_bytes. The enumerated 400/403/404 error codes go well beyond what annotations provide.

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-loads purpose and requirements, then fields, then return shapes, then errors. It is dense and long, but nearly every clause carries operational value, especially the return-shape and error sentences that compensate for the missing output schema.

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?

With no output schema, the description fully specifies each kind's return object (events buckets, usage totals, rates fields), explains rate-zero behavior, scoping, and all failure modes. Nothing essential to correct invocation appears missing.

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 the schema already documents defaults, exclusive/inclusive bounds, per-kind applicability, and inbox_id semantics. The description largely restates this (which kinds use start/end/period/types), so the baseline 3 is appropriate even though it is accurate.

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?

States a specific verb+resource (counts of mail over time, current usage, bounce/complaint rates) and enumerates the three kind values up front. An agent can distinguish this from list/search siblings without opening the schema.

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?

Opens with explicit when-to-use framing ('Use this when you need counts of mail over time, current usage, or bounce and complaint rates') and explains which kind maps to each need. It does not name a specific alternative sibling (e.g., cooper_list_events) or state when not to use it, so it stops short of a 5.

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.