Skip to main content
Glama

search_files

Read-only

Find files and folders anywhere in the drive by partial, case-insensitive name match, returning paginated results with IDs, kinds, sizes, and paths.

Instructions

Find files and folders anywhere in the drive (or inside the credential's folder scope) whose name contains the query, case-insensitive. Returns up to 200 matches per page with id, kind, size and path, plus next_cursor to continue. Matches names only: to search the text inside PDFs, Office files and text files use search_file_contents; to list one folder use list_files. Requires files:read.

Input Schema

NameRequiredDescriptionDefault
queryYessubstring to search for in file and folder names
cursorNocursor returned by the previous call

Output Schema

NameRequiredDescriptionDefault
itemsYes
totalYes
next_cursorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Goes well beyond the readOnlyHint annotation by disclosing the 200-result page cap, the presence of next_cursor for continuation, and the required scope 'files:read'. The returned field list (id, kind, size, path) is slightly redundant with the output schema, which keeps this from a 5.

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 dense sentences with the core behavior front-loaded, followed by result shape and then routing to alternatives. No wording is padding.

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?

Covers scope, match semantics, pagination, permissions and sibling differentiation, and since an output schema exists it does not need to describe return values in depth. Nothing an agent needs to invoke it correctly is missing.

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 meaning by specifying case-insensitive substring matching over names and that the search spans the whole drive or the credential's folder scope. It does not restate cursor semantics, but the schema already documents those.

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 ('Find files and folders'), plus the matching scope ('anywhere in the drive or inside the credential's folder scope') and match rule ('whose name contains the query, case-insensitive'). It also explicitly distinguishes itself from search_file_contents (content search) and list_files (single folder listing), so an agent can pick it without opening a schema.

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?

Names both alternatives and the exact condition that selects each: use search_file_contents for text inside PDFs/Office/text files, use list_files to enumerate a single folder. The 'matches names only' clause is an explicit when-not statement.

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