Skip to main content
Glama

Search documents

search_documents
Read-onlyIdempotent

Search your own computer files by exact words or prefixes in names and content, ranked by relevance. Use it first for document questions, then narrow by file type, folder, or modification date.

Instructions

Full-text search over the user's own files on this computer. Finds exact words and word prefixes in file names and content, ranked by relevance. USE THIS FIRST for any question about the user's documents: it is fast. Read-only. Covers only the folders indexed by RootMind that this connection may access, as of the last indexing run (files changed since may be missing). Pass the words to find as query; narrow with file_type, folder or modified_after/modified_before when the question names one. Returns up to limit hits, each with file name, ID, folder, type, modification date, location (page/slide/sheet) when known, a snippet and a suggested read_document window. There is no paging: for more hits raise limit or narrow the filters. With no match it says so; then search again with other words, or use search_fuzzy.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_documents"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of results (1-50, default 10).
queryYesSearch term(s). Matches exact words and prefixes (e.g. 'invoice' also finds 'invoices').
folderNoOptional: only documents in this indexed folder, by its name, case-insensitive (e.g. 'Unterlagen'; get_statistics lists the folders).
file_typeNoOptional: only this file type, as the lowercase extension without a dot (pdf, docx, xlsx, pptx, md, txt, csv, ...).
modified_afterNoOptional: only documents modified on or after this date (YYYY-MM-DD).
modified_beforeNoOptional: only documents modified on or before this date (YYYY-MM-DD).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.10.1
    • changedInput schema / properties / file_type / description
      Previous value: -"Optional: filter by file type, e.g. pdf, docx, xlsx, pptx, md, txt, csv"New value: +"Optional: only this file type, as the lowercase extension without a dot (pdf, docx, xlsx, pptx, md, txt, csv, ...)."
    • changedInput schema / properties / folder / description
      Previous value: -"Optional: only documents in this indexed folder, by its name (e.g. 'Unterlagen'; get_statistics lists the folders)."New value: +"Optional: only documents in this indexed folder, by its name, case-insensitive (e.g. 'Unterlagen'; get_statistics lists the folders)."
  2. Changed3 schema fields changedv2.10.0
    • addedInput schema / properties / folder
      Added value: +{
      +  "description": "Optional: only documents in this indexed folder, by its name (e.g. 'Unterlagen'; get_statistics lists the folders).",
      +  "type": "string"
      +}
    • addedInput schema / properties / modified_after
      Added value: +{
      +  "description": "Optional: only documents modified on or after this date (YYYY-MM-DD).",
      +  "type": "string"
      +}
    • addedInput schema / properties / modified_before
      Added value: +{
      +  "description": "Optional: only documents modified on or before this date (YYYY-MM-DD).",
      +  "type": "string"
      +}
  3. First observedv2.6.1

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint=false, yet the description adds substantive behavior beyond that: index staleness ('files changed since may be missing'), access scoping to permitted folders, absence of paging, and the exact shape of each hit including the suggested read_document window. The only redundancy is restating 'Read-only', which is minor.

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?

Front-loads the highest-value instruction ('USE THIS FIRST') in the first few words, then proceeds through scope, filters, return shape, paging, and fallback in a logical order. Sentences are dense but every one carries operational information; nothing is filler.

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 correctly takes on the burden of describing the return payload (name, ID, folder, type, date, location, snippet, suggested read window). It also covers the two things an agent would otherwise get wrong: stale index coverage and the absence of pagination.

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%, so the baseline is 3; the description still adds value by explaining how to combine parameters ('narrow with file_type, folder or modified_after/modified_before when the question names one') and by stating there is no paging, so raising limit is the way to get more hits. Syntax details (date format, extension rules) are left to the schema.

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 with scope: 'Full-text search over the user's own files on this computer', and clarifies it matches exact words/prefixes in names and content, ranked by relevance. Distinguishes itself implicitly from read_document (search) and search_fuzzy (substring matching) without ambiguity.

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?

Explicit routing: 'USE THIS FIRST for any question about the user's documents: it is fast', plus a failure path ('With no match it says so; then search again with other words, or use search_fuzzy'). It also tells the agent when to apply which filter ('when the question names one'), which is when-to-use guidance at the parameter level.

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