Skip to main content
Glama

Search emails

search_emails
Read-onlyIdempotent

Find emails across the leads this person sees, newest first: by words in the subject, the body, the sender's address or the lead's name; theirs or ours; only the ones still waiting for an answer ("who emailed us back and hasn't heard from us"); within days. Each row has the email id for get_email and the lead. For what was said across texts, calls and emails at once, search_what_was_said is better.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_emails"
  }
}

Input Schema

NameRequiredDescriptionDefault
fromNoEmails on or after this day.
limitNoHow many to return, at most 50 (more is cut to 50).
queryNoWords in the subject, body, sender's address or lead name.
cursorNoThe cursor a previous page of this tool gave, to read the next page. Leave it out for the first.
lead_idNoOnly this lead's emails.
throughNoEmails on or before this day.
waitingNoOnly theirs that nobody has answered yet.
directionNoany

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive and closed-world, so safety is covered; the description adds real behavior: result ordering (newest first), permission scoping ("leads this person sees"), and the row payload (email id plus lead). It does not mention the result cap the schema hints at ("more is cut to 50") or any rate/latency behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the verb, scope and ordering, and the sibling routing is pushed to the end where it belongs. The middle semicolon chain ("theirs or ours; only the ones still waiting...; within days") is dense and slightly telegraphic but every clause carries information.

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?

With eight optional parameters and no output schema, the description does the work that matters: it describes the returned row (email id and lead), the sort order, and the visibility scope. Combined with an 88%-documented schema, an agent has enough to call this correctly on the first try.

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

Parameters4/5

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

Schema coverage is 88%, so the baseline is 3, but the description genuinely adds meaning: it maps the query parameter to concrete fields, frames direction as "theirs or ours," and glosses waiting as "who emailed us back and hasn't heard from us," which is clearer than the schema's phrasing. It says nothing extra about from/through/limit/cursor beyond "within days."

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 and resource ("Find emails"), then narrows the scope ("across the leads this person sees, newest first") and the searchable fields (subject, body, sender address, lead name). It also distinguishes itself from two siblings by naming get_email for retrieval and search_what_was_said for cross-channel search.

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?

Gives an explicit alternative with its selecting condition: use search_what_was_said when you need what was said across texts, calls and emails at once. It also signals the follow-up path (email id for get_email), and the "waiting" case is spelled out as a concrete user question rather than left to inference.

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.

Resources