Skip to main content
Glama

searchDocuments

Search Google Docs, Word, and PDF files by name or content, with filters for file type, modification date, and result limit to find targeted documents quickly.

Instructions

Searches for documents by name, content, or both. Finds Google Docs, Word (.docx), and PDF files. Use listDocuments for browsing and this tool for targeted queries.

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": "searchDocuments"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesSearch term to find in document names or content.
fileTypeNoFilter by file type: all document types, Google Docs only, Word (.docx) only, or PDF only.all
searchInNoWhere to search: document names, content, or both.both
maxResultsNoMaximum number of results to return.
modifiedAfterNoOnly return documents modified after this date (ISO 8601 format, e.g., "2024-01-01").

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.0.0-rc.1

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden of behavioral disclosure. It does convey the supported file scope and the search modes, and "Searches" implies a non-mutating read, but it says nothing about permissions needed, whether content search is depth-limited, how results are ordered, or what happens when matches exceed maxResults.

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?

Three short sentences, each with a distinct job: what it searches, what it covers, and where the sibling boundary lies. The routing guidance is placed last rather than first, which is a minor front-loading miss, but there is no filler.

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?

Five parameters with full schema coverage and a clear scope statement make this callable without further reading. The remaining gap is return behavior: there is no output schema, so the description is the only place an agent could learn the shape or ordering of results, and it stays silent on that.

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 every parameter already has documented semantics and two carry enums. The description's "by name, content, or both" and the file-type list simply restate the searchIn and fileType enum values rather than adding syntax, defaults, or behavioral nuance. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource ("Searches for documents"), names the searchable dimensions (name, content, or both), and enumerates the supported file types. It also explicitly routes browsing traffic elsewhere via "Use listDocuments for browsing." It does not, however, distinguish itself from the sibling searchFileContents, which an agent could easily confuse with a content-search tool.

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?

"Use listDocuments for browsing and this tool for targeted queries" is an explicit when-to-use statement paired with a named alternative. What it lacks is any exclusion or guidance for the other plausible overlap, searchFileContents, and no mention of prerequisites or rate expectations.

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

Deploy Server

Other Tools