Skip to main content
Glama
Sendmux

Sendmux Email Inbox API + Sending

Official

Count Messages

mailbox_count_messages
Read-onlyIdempotent

Count messages in a mailbox using filters like sender, subject, or date range without retrieving full results.

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

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. Description adds that it counts without listing, which is consistent and adds minimal behavioral context beyond what annotations provide. No contradiction.

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 purpose, then usage guideline. Every sentence is necessary and efficient. No wasted words.

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?

Given high complexity (20 params), schema covers all parameters, output schema exists, and annotations present. Description is sufficient for the tool's simple purpose. Could mention count limitations or performance, but not required for completeness.

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%, so baseline is 3. The description mentions 'matching filters' generally but does not add specific parameter semantics beyond what the schema already provides. Adequate.

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?

Description clearly states it counts messages matching filters and distinguishes from mailbox_list_messages by stating it avoids listing every result. This provides a specific verb and resource, and differentiates from a sibling tool.

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

Usage Guidelines5/5

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

Explicitly says to use this tool for counting and follow with mailbox_list_messages only when examples are needed, providing clear when-to-use and when-not-to-use guidance with an alternative named.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sendmux/sendmux-sdk'

If you have feedback or need assistance with the MCP directory API, please join our Discord server