Skip to main content
Glama

Cherami

Count received emails

count_messages
Read-onlyIdempotent

Count received messages matching the same search and filters as list_messages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromNoExact email address in From, case-insensitive; not the SMTP envelope sender.
afterNoInclusive receipt/submission time: YYYY-MM-DDTHH:mm:ss, optional 1–3 fractional digits, then Z or ±HH:mm.
queryNoMatch all words or quoted phrases in subject/body. Case-insensitive keyword search, not semantic similarity; up to 16 terms/phrases.
beforeNoExclusive receipt/submission time: YYYY-MM-DDTHH:mm:ss, optional 1–3 fractional digits, then Z or ±HH:mm.
subjectNoLiteral case-insensitive substring of the subject.
inbox_idYes
recipientNoExact email address in To/Cc/Bcc where available, case-insensitive.
labels_allNoRequire every listed label. Filter groups combine with AND; empty arrays impose no condition.
labels_anyNoRequire at least one listed label.
labels_noneNoExclude messages with any listed label.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, openWorldHint=false, so the safety profile is fully covered by structured data. The description adds that the counting scope mirrors list_messages, which is useful context, but says nothing about return format, consistency, or cost. No contradiction with annotations.

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?

A single, front-loaded sentence with no wasted words. The most important constraint (it reuses list_messages' search/filter grammar) is stated immediately.

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?

With 10 parameters, an output schema, and full annotations, the description only needs to establish scope and relationship to list_messages, which it does. It could have been slightly more complete by noting that count_messages omits the list's pagination/ordering concerns, but nothing essential is 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 90%, so nearly every parameter is documented in the schema itself, giving a baseline of 3. The description only adds that the same filter semantics as list_messages apply, which is marginal value beyond the schema.

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 (count) and resource (received messages) and explicitly scopes the input shape by referencing list_messages' search/filter semantics. It does not contrast with any sibling count/aggregation tool (there are none), but the purpose is unambiguous.

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

Usage Guidelines3/5

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

The reference to 'the same search and filters as list_messages' implies usage parity, but the description never says when to prefer count_messages over list_messages or any other tool. An agent can infer this is a lightweight count, but there is no explicit when-to-use or when-not-to-use guidance.

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