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

NameRequiredDescriptionDefault
fromNoExact From address, case-insensitive.
afterNoReceived or sent at or after this time: YYYY-MM-DDTHH:mm:ss, optional 1–3 fractional digits, then Z or ±HH:mm.
queryNoWords or quoted phrases that must all appear in the subject or body. Case-insensitive keyword match, not semantic search; up to 16 terms or phrases.
beforeNoReceived or sent before this 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 To, Cc or Bcc address, case-insensitive.
labels_allNoRequire every listed label. An empty array in any label filter adds no condition.
labels_anyNoRequire at least one listed label.
labels_noneNoExclude messages with any listed label.

Output Schema

NameRequiredDescriptionDefault
countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / properties / after / description
      Previous value: -"Inclusive receipt/submission time: YYYY-MM-DDTHH:mm:ss, optional 1–3 fractional digits, then Z or ±HH:mm."New value: +"Received or sent at or after this time: YYYY-MM-DDTHH:mm:ss, optional 1–3 fractional digits, then Z or ±HH:mm."
    • changedInput schema / properties / before / description
      Previous value: -"Exclusive receipt/submission time: YYYY-MM-DDTHH:mm:ss, optional 1–3 fractional digits, then Z or ±HH:mm."New value: +"Received or sent before this time: YYYY-MM-DDTHH:mm:ss, optional 1–3 fractional digits, then Z or ±HH:mm."
    • changedInput schema / properties / from / description
      Previous value: -"Exact email address in From, case-insensitive; not the SMTP envelope sender."New value: +"Exact From address, case-insensitive."
    • changedInput schema / properties / labels_all / description
      Previous value: -"Require every listed label. Filter groups combine with AND; empty arrays impose no condition."New value: +"Require every listed label. An empty array in any label filter adds no condition."
    • changedInput schema / properties / query / description
      Previous value: -"Match all words or quoted phrases in subject/body. Case-insensitive keyword search, not semantic similarity; up to 16 terms/phrases."New value: +"Words or quoted phrases that must all appear in the subject or body. Case-insensitive keyword match, not semantic search; up to 16 terms or phrases."
    • changedInput schema / properties / recipient / description
      Previous value: -"Exact email address in To/Cc/Bcc where available, case-insensitive."New value: +"Exact To, Cc or Bcc address, case-insensitive."
    • changedInput schema / properties / subject / description
      Previous value: -"Literal case-insensitive substring of the subject."New value: +"Literal, case-insensitive substring of the subject."
  2. First observed

TDQS

A3.8/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 and openWorldHint=false, so safety and repeatability are covered. The description adds only filter-parity with list_messages and says nothing about count accuracy, caps, or whether large mailbox counts are truncated or estimated.

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 tight sentence with the counting purpose front-loaded and no filler. Nothing is wasted and nothing needs reordering.

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 an output schema present and 90% parameter coverage, the description needn't explain return values or filter syntax, and the one sentence covers purpose and filter scope adequately. It falls just short of complete because it omits any note on count exactness or upper bounds for a tool whose whole output is a single number.

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 the 10 filter parameters (from, subject, query, labels_*, date bounds) are already well documented in the schema itself. The description's only added semantic is that these filters behave identically to list_messages, which is a modest cross-reference and not parameter-level detail. Baseline 3 is appropriate.

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 (count) and resource (received messages) and immediately distinguishes itself from the sibling list_messages by framing this as the counting counterpart. An agent can tell what it returns without opening the schema or comparing sibling tools.

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?

Referencing 'the same search and filters as list_messages' implies the pairing (use list_messages to fetch, count_messages to tally), but the description never explicitly says when to prefer counting over listing, nor rules out any scenario. Usage is inferable rather than stated.

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