Skip to main content
Glama

Search Files

search_files
Read-onlyIdempotent

Search for files in OneDrive by name or content across all accessible folders. Returns matching files with metadata.

Instructions

📖 Search for files in OneDrive (read-only, safe for unsupervised use)

Searches file names and content across all accessible OneDrive folders. Automatically routes to the appropriate API based on account type:

  • Personal accounts: Uses OneDrive-specific search

  • Work/school accounts: Uses unified search API

Args: query: Search query string (1-512 characters) account_id: Microsoft account ID limit: Maximum results to return (1-500, default: 50) use_cache: Whether to use cache (default: True) force_refresh: Bypass cache and fetch fresh data (default: False)

Returns: List of matching files with metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
account_idYes
limitNo
use_cacheNo
force_refreshNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description adds behavioral context beyond annotations: automatic API routing based on account type, caching behavior (use_cache, force_refresh), and that it searches both file names and content. No contradictions with annotations.

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 well-structured with a header, a brief paragraph, then a parameter list. Every sentence adds value; no redundancy. It is concise yet comprehensive.

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?

Given the output schema exists, the description need not explain return values. It covers input params, caching, routing, and safety. Complete for a search tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema coverage, the description provides detailed parameter descriptions including constraints (1-512 characters, 1-500 limit) and defaults. All 5 parameters are explained meaningfully.

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 clearly states the tool searches for files in OneDrive, specifies it's read-only and safe, and mentions automatic routing by account type. It distinguishes from sibling tools like search_emails or search_contacts.

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?

It explicitly says 'read-only, safe for unsupervised use' and describes automatic routing, giving clear when-to-use guidance. However, it does not explicitly state when not to use it versus alternatives like search_unified.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/robin-collins/m365-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server