Skip to main content
Glama
Data-Wise

himalaya-mcp

by Data-Wise

search_emails

Search emails using filter syntax for subject, sender, body, date, and flags. Combine conditions with and/or, negate with not, and sort results with order by.

Instructions

Search emails using himalaya filter syntax. Combine conditions with and/or (REQUIRED between every condition pair — omitting them causes parse errors). Negate any condition with not. Multi-word values need backslash-escaped spaces. Bare words default to subject-only search. Sort results with order by <date|from|to|subject> <asc|desc>. Conditions: subject, from, to, body, date (exact match), before, after, flag. Flag values: Seen, Flagged, Answered, Deleted, Draft.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query. Use `and`/`or` between every condition pair (e.g. 'from alice and after 2026-07-01'; NOT 'from alice after 2026-07-01'). Negate with `not` (e.g. 'not from spammer', 'not body spam'). Multi-word values: backslash-escape spaces ('subject quarterly\ report'). Bare words default to subject search; use 'body <word>' for body text. Sort with 'order by date desc', 'order by subject asc', etc. Full example: 'subject invoice and after 2026-01-01 order by date desc'.
folderNoFolder to search in (default: INBOX)
accountNoAccount name (uses default if omitted)
Behavior4/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It explains mandatory `and`/`or` placement leading to parse errors, default subject-only search, backslash escaping for spaces, and sorting options. It also enumerates filterable conditions and flag values, providing substantial operational insight. It stops short of disclosing pagination or result limits, but the disclosed behaviors are thorough.

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?

The description is verbose but every sentence contributes necessary syntax detail: condition combination, negation, escaping, defaults, sorting, and condition list. It is front-loaded with a clear opening, but the density could overwhelm readers. Still, it avoids fluff and is efficiently structured for the complexity it covers.

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 complexity of the query language, the description is remarkably complete: it covers all condition types, flag values, sorting, negations, escaping, and the required `and`/`or` structure. There is no output schema, so the description could ideally mention return format, but for a search tool the output is implicitly a list of emails. The tool's operational surface is extensively documented.

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 100% with detailed parameter descriptions, including a comprehensive `query` parameter example. The tool description adds the full list of conditions and flag values, which are not fully enumerated in the schema. This goes beyond the schema, offering additional taxonomic clarity. The baseline of 3 is exceeded due to this extra semantic detail.

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 begins with a specific verb and resource ('Search emails') and immediately introduces the `himalaya filter syntax`, clearly distinguishing this from sibling tools like `list_emails` or `read_email`. It conveys both the action and the specialized query language, leaving no ambiguity about the tool's function.

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?

The description makes it evident that this tool is for searching with a specific filter syntax, implied by extensive guidance on building queries. However, it does not explicitly state when to prefer this over alternatives (e.g., `list_emails`) or mention any exclusions. The context is clear but lacks explicit 'when not to use' guidance.

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/Data-Wise/himalaya-mcp'

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