Skip to main content
Glama
Sendmux Email Inbox API + Sending

Sendmux Email Inbox API + Sending

Official
by qubrics

Count Messages

qubrics_mailbox_count_messages
Read-onlyIdempotent

Count messages matching mailbox filters such as sender, subject, date, folder, or read status without listing every result. Use it to get totals before fetching message examples.

Instructions

Use this to count messages matching mailbox filters without listing every result. Follow with mailbox_list_messages only when examples are needed.

Input Schema

NameRequiredDescriptionDefault
qNoFull-text search query across message fields.
ccNoFilter by CC recipient email address or display name.
toNoFilter by To recipient email address or display name.
bccNoFilter by BCC recipient email address or display name.
bodyNoFilter by message body text.
fromNoFilter by sender email address or display name.
afterNoFilter to messages after this ISO 8601 timestamp.
beforeNoFilter to messages before this ISO 8601 timestamp.
keywordNoRequire this message keyword, such as `$seen`.
subjectNoFilter by subject text.
folder_idNoFilter to messages in this folder ID.
is_unreadNoWhen true, only return unread messages.
thread_idNoFilter to messages in this thread ID.
mailbox_idNoMailbox public ID to target when the credential grants access to more than one mailbox. Omit when the credential is scoped to exactly one mailbox.
header_nameNoHeader name to match with `header_value`.
not_keywordNoExclude messages with this keyword.
header_valueNoHeader value to match with `header_name`.
has_attachmentNoWhen true, only return messages with attachments.
max_size_bytesNoMaximum message size in bytes.
min_size_bytesNoMinimum message size in bytes.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.17

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is fully covered by structured data. The description's only additional behavioral signal is that results are aggregated rather than enumerated, which hints at a cheaper call, but it says nothing about what the count represents (total vs. capped) or any limits.

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, front-loaded with the purpose and immediately followed by the routing rule. No redundant restatement of the name or the schema.

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, the description need not explain the return value, and it correctly focuses on purpose and follow-up. The main gap is that with zero required parameters an empty call silently counts the entire mailbox, and the description never flags that or any scope limit.

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 coverage is 100% across all 20 filter parameters, so the schema already carries the semantics and the description correctly does not repeat them. It adds only the loose phrase 'mailbox filters' and gives no hint about combining filters or the behavior of an empty filter set, 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?

The description gives a specific verb and resource ('count messages matching mailbox filters') and explicitly separates the tool from the list-based alternative by noting it works 'without listing every result'. It stops just short of a full contrast statement (e.g. 'unlike mailbox_list_messages, this returns only a total'), 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?

It names the concrete alternative (mailbox_list_messages) and the exact condition that should trigger a follow-up call: only when examples are needed. That is clear routing guidance, but it gives no inverse guidance about when counting is unnecessary or what to do if the count is zero.

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

Deploy Server

Other Tools