Skip to main content
Glama
googlarz

Proton Mail Bridge MCP

count_messages

Read-only

Preview how many messages match specific search criteria before fetching them. Use filters like sender, date, folder, and read status to count messages without loading data.

Instructions

Count messages matching live IMAP search criteria without fetching message data. Use to preview how many results a search would return before running it. Prefer folder_stats for a simple unread/total count on one folder without filters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoFilter by recipient address.
fromNoSender filter.
labelNoFilter by folder label applied locally.
queryNoFree-text filter.
dateToNoInclusive end date in ISO format.
folderNoFolder to count in. Defaults to INBOX.
isReadNoRead status filter.
subjectNoSubject filter.
dateFromNoInclusive start date in ISO format.
threadIdNoFilter by thread id, applied locally.
isStarredNoStarred status filter.
sizeLargerNoOnly count messages larger than this size in bytes.
sizeSmallerNoOnly count messages smaller than this size in bytes.
senderDomainNoFilter by sender domain, applied locally.
hasAttachmentNoFilter by attachment presence.
Behavior4/5

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

Annotations already declare readOnlyHint=true, indicating no side effects. The description adds transparency by stating it counts without fetching message data, confirming lightweight behavior. No contradictions.

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, extremely concise, front-loaded with key action and purpose. No unnecessary words or repetition.

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?

No output schema, but the description implies a count result. For a simple count tool, it adequately covers what the tool does and when to use it. Could explicitly state return value (number) but not critical.

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% with all 15 parameters documented. The description does not add specific parameter meaning beyond schema descriptions, only stating 'live IMAP search criteria' broadly. 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?

The description clearly states the tool counts messages matching live IMAP search criteria, explicitly noting it does not fetch message data. It explains the purpose (preview count before running a search) and distinguishes from folders_stats.

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?

The description explicitly says when to use (to preview how many results a search would return before running it) and when not to use (prefer folder_stats for simple unread/total count on one folder without filters), providing a clear alternative.

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/googlarz/proton-mail-bridge-client'

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