Skip to main content
Glama
fbossiere

Proton Safe MCP

by fbossiere

Search Proton messages

search_messages
Read-onlyIdempotent

Search a folder for messages by keyword and get the newest matches first, without marking them as read.

Instructions

Search one folder for messages whose text matches a query, newest first. Use it to find messages by keyword; to browse a folder without a query use list_messages, and to read a match use read_message with a UID returned here. It returns the same metadata as list_messages and never a body. The query is escaped into an IMAP TEXT search, so it cannot inject IMAP commands, and matching never marks a message as read.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of matches to return, newest first. Defaults to 20. Excess matches are dropped rather than paged, so narrow the query when the result looks cut short.
queryYesText to look for in message headers and body, matched as a literal case-insensitive substring. IMAP TEXT search has no wildcard, boolean, or regular-expression syntax: metacharacters are escaped and matched literally.
folderNoSingle folder to search, spelled exactly as list_folders reports it. Defaults to INBOX. A search never spans folders: call once per folder to cover several.INBOX

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.3.0
    • addedInput schema / properties / folder / description
      Added value: +"Single folder to search, spelled exactly as list_folders reports it. Defaults to INBOX. A search never spans folders: call once per folder to cover several."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of matches to return, newest first. Defaults to 20. Excess matches are dropped rather than paged, so narrow the query when the result looks cut short."
    • addedInput schema / properties / query / description
      Added value: +"Text to look for in message headers and body, matched as a literal case-insensitive substring. IMAP TEXT search has no wildcard, boolean, or regular-expression syntax: metacharacters are escaped and matched literally."
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

The description discloses that the query is escaped into an IMAP TEXT search preventing injection, that matching never marks a message as read, and that it returns the same metadata as list_messages but never a body. These details go beyond the annotations (readOnlyHint, idempotentHint, destructiveHint) and provide valuable behavioral context for safe usage.

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?

The description is three sentences long, front-loaded with the core purpose, then usage guidance, then behavioral notes. Every sentence adds value and there is no redundancy or filler. It is compact yet comprehensive.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity, the presence of a detailed output schema, and annotations covering safety, the description covers all essential aspects: purpose, usage, behavior, and integration with siblings. It mentions result ordering, no body, no read marking, and query escaping, making it fully sufficient for an agent to invoke correctly.

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?

The input schema already documents all three parameters thoroughly (query, limit, folder) with detailed descriptions covering semantics, defaults, and constraints. The description adds no additional parameter-specific information beyond what the schema provides, so it meets the baseline of 3 for high schema coverage.

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 states a specific verb ('search'), resource ('one folder for messages'), and scope ('whose text matches a query, newest first'). It explicitly differentiates from siblings: list_messages for browsing without a query and read_message for reading a match, leaving no ambiguity about what this tool does.

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 gives explicit when-to-use guidance: 'Use it to find messages by keyword; to browse a folder without a query use list_messages, and to read a match use read_message with a UID returned here.' It also clarifies that a search never spans folders and suggests calling once per folder, as noted in the schema, making the intended usage unmistakable.

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