Skip to main content
Glama

search_documents

Find specific documents by keyword when a standard browse search misses them. Use precise terms, acronyms, or file-name fragments; results include relevance scores.

Instructions

ESCALATION tool — never the first step. Use only after browse_documents(sort="relevance", query=...) missed a document you strongly believe exists by precise term, acronym, or file-name fragment. Query must be keywords only — see the query schema describe. Each result has a score (6-10, higher is more relevant). On result: single best match → read it; several equally good → ask user; none → fall back to browse_documents(sort="relevance").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of documents to return (1-50, default 10)
queryYesKeyword query. Pass keyword(s) only — NOT a natural-language sentence. Multiple keywords are AND-matched: every token must appear in the file name or description. Examples: "machine learning safety" ✓; "documents about machine learning safety" ✗ (stop words "documents"/"about" will block matches).
folder_idNoFolder scope (default "root"). Pass a specific folder ID to scope into that folder, or "root" to reference the library root. Combine with `recursive` to control breadth. Mirrors browse_documents — copy any folder_id from a browse/tree response verbatim, never construct one. The default root search ALREADY covers the read-only "shared-with-me" and "following" folders; pass one of those ids (or one of their sub-folder ids) only to narrow the search to shared content.
recursiveNoWhether to include documents from descendant folders. When true (default), searches the entire subtree of folder_id — for "root" that means the whole library, including the read-only "shared-with-me" and "following" folders. Set false to restrict to the direct contents of folder_id: root-level documents for "root", directly-shared documents for the read-only folders.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.2

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and it delivers: keyword-only constraint, a score range of 6-10, and a prescribed action for single, multiple, and no matches. It stops short of describing error behavior or full return shape, but the core runtime behavior is disclosed.

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 front-loaded with the most important operational fact (escalation tool), and every subsequent sentence adds either a constraint, a result expectation, or an action rule. Despite being dense, it is appropriately sized for the complexity.

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 4-parameter tool with no annotations or output schema, the description covers the selection decision, the query format, the result scoring, and the follow-up protocol. The only gap is a fully specified return shape and error/edge-case behavior, but the schema covers parameters and the description covers operational flow.

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?

Schema coverage is 100%, so the baseline is 3. The description's 'keywords only' instruction restates the query schema and adds the escalation context, but does not materially enrich the parameter meanings beyond what the schema already documents.

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 opening line frames the tool as the escalation search path for finding a document that browse_documents missed, and the query/result description makes the verb and resource explicit. It is sharply differentiated from browse_documents by naming that sibling directly.

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?

It explicitly states when to use it ('only after browse_documents(sort="relevance", query=...) missed a document'), when not to use it ('never the first step'), and the fallback if no result is found. This leaves no ambiguity about placement in the search workflow.

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