Skip to main content
Glama

Search (ChatGPT-compatible)

search
Read-onlyIdempotent

Searches all readable mailboxes with one query string and returns documents with ids for fetch. Use Gmail search syntax for Gmail accounts (from:, newer_than:7d, has:attachment); plain words elsewhere. Prefix the query with "account: " to limit it to one mailbox.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds behavior beyond that: it searches across all readable mailboxes, returns document identifiers intended for `fetch`, and interprets queries differently based on account type. It also exposes a scoping mechanism via the account prefix. This is rich behavioral context without contradicting annotations.

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?

Three sentences, each carrying a distinct purpose: main behavior, syntax rules, and scoping. No filler, and the most important fact (cross-mailbox search returning IDs) is front-loaded.

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?

For a single-parameter read-only search tool, the description covers the query format, scoping, and the relationship to `fetch`, and annotations cover safety. It could be slightly more explicit about what type of documents are returned (e.g., messages) or how it differs from search_messages, but that is minor.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema only says 'Search query' for the sole parameter, while the description provides critical semantics: Gmail syntax with concrete examples, fallback to plain words, and the account-prefix syntax. This far exceeds the baseline for a 100%-covered schema.

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 ('Searches'), a clear resource scope ('all readable mailboxes'), and a concrete outcome ('returns documents with ids for `fetch`'). This distinguishes it from siblings like fetch (which consumes those ids) and search_messages (by its cross-mailbox scope). The verb 'Searches' plus resource makes the purpose unambiguous.

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?

Gives direct usage rules for the query parameter: Gmail search syntax for Gmail accounts with examples, plain words for others, and an `account:<id>` prefix to narrow to a single mailbox. It does not explicitly compare against search_messages or state when not to use this tool, so it falls short of full alternative routing. The guidance is still clear enough for correct invocation.

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.