Skip to main content
Glama
chandshy
by chandshy

Full-Text Search (Local Index)

fts_search
Read-only

Perform keyword search over locally-indexed mail with BM25 ranking. Supports phrases, boolean operators, prefix matching, and column filters for precise email retrieval.

Instructions

BM25-ranked keyword search over the locally-indexed mail corpus. Supports FTS5 syntax: phrases ("exact phrase"), boolean (foo AND bar, foo OR bar, NOT baz), prefix (proto*), and column filters (subject:invoice from:alice). Faster and smarter than search_emails, but requires the local index to be built — call fts_rebuild if fts_status shows it empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax hits to return (1–200, default 20)
queryYesFTS5 query string
folderNoRestrict results to a single folder
account_idNoOptional account ID to route this call to (multi-account configs). Omit to use the active account. Configured account IDs are listed in the settings UI (Accounts tab).
sinceEpochNoFilter to messages whose date is at or after this Unix-epoch second

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hitsYes
Behavior5/5

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

Beyond readOnlyHint annotation, description adds that it uses BM25 ranking, supports FTS5 syntax, is faster, and requires local index. No contradiction with 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, front-loaded with purpose, then syntax, then usage guidelines. Every sentence adds value without redundancy.

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 output schema present, description covers purpose, usage, syntax, dependencies (index build), and links to related tools. Complete for a search tool with complex syntax.

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?

Schema coverage is 100%, but description adds significant context: explains FTS5 syntax with examples, and elaborates on account_id with routing and configuration info. This goes beyond the schema's brief descriptions.

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 performs BM25-ranked keyword search over the locally-indexed mail corpus, using specific verb and resource. It distinguishes from sibling search_emails by claiming it's faster and smarter, and mentions required index.

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?

Explicitly says when to use (for fast FTS5 search) and when not (index must be built), and directs to call fts_rebuild if index empty. Also contrasts with search_emails.

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/chandshy/mailpouch'

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