Skip to main content
Glama

search_documents

Read-only

Busca en el CONTENIDO de todos los documentos del workspace usando full-text search en cascada.

Usar cuando:
- El usuario quiere encontrar un documento que habla sobre cierto tema pero no recuerda el nombre
- "¿dónde está el documento sobre X?", "buscá en mis docs algo relacionado con Y"
- Necesitas saber en qué documentos se menciona una persona, proyecto o concepto

Estrategia de búsqueda (en cascada, de más a menos estricta):
1. FTS con websearch_to_tsquery: mejor para frases naturales y multi-palabra
2. Prefix matching: para palabras parciales o términos técnicos
3. ILIKE fallback: garantiza resultados aunque sea por similitud simple

Retorna: document_id, name (título del documento), snippet (extracto con la coincidencia en contexto).
Para leer el documento completo: usar get_document(document_id).
Para navegar la estructura de documentos: usar get_documents.

Input Schema

NameRequiredDescriptionDefault
limitNoMáximo resultados (default: 20)
queryYesTexto a buscar en el contenido de los documentos (mínimo 2 caracteres, soporta frases)
workspace_idNoUUID del workspace, o su nombre tal como lo dice el usuario ('Acme', 'el personal'). Omitir = TODOS los workspaces de la persona, en una sola llamada

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds genuine value beyond that by disclosing the internal cascade strategy (websearch_to_tsquery, prefix matching, ILIKE fallback) and the returned fields (document_id, name, snippet), which is more than the annotations provide.

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?

It is front-loaded with the core purpose and organized into use-cases, strategy, return, and next-steps blocks, so each section earns its place. It is slightly long, but the structure keeps the actionable information discoverable.

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 no output schema, the description compensates by naming the returned fields and pointing to get_document for the full content. Combined with usage triggers, alternatives, and search behavior, an agent has everything needed to invoke it correctly.

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 description coverage is 100%, so query, limit, and workspace_id (including the 'omit = all workspaces' behavior) are already documented in the schema. The description adds only marginal semantic detail, so the baseline of 3 is appropriate for a schema that does the heavy lifting.

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 states a precise verb+resource+scope: full-text search over the CONTENT of all workspace documents, using a cascading strategy. It also distinguishes itself from siblings by pointing to get_document for full reads and get_documents for structure navigation, so an agent can separate it from the other document tools.

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 gives an explicit 'Usar cuando' block with three concrete user-intent triggers and quoted example requests, then routes the agent to alternatives (get_document, get_documents) for adjacent needs. This is a clear when-to-use-and-what-else map.

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