Skip to main content
Glama

files_search

Read-onlyIdempotent

Search OneDrive and SharePoint for files by name or content keyword. Get file metadata like ID, name, size, last-modified date, and web URL for quick access.

Instructions

Search the signed-in user's OneDrive and the SharePoint sites they can reach, by filename or content keyword. Returns id, name, drive id, size, last-modified date and web URL. OneDrive and SharePoint document libraries are the same underlying resource, so one search covers both. Requires Files.Read.All.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch keywords to find files and documents
max_resultsNoMaximum files to return
Behavior4/5

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

Annotations already mark the tool as read-only, idempotent, and non-destructive. The description adds valuable behavioral context beyond these hints: it covers both OneDrive and SharePoint in one search, requires Files.Read.All permission, and specifies the return fields (id, name, drive id, size, last-modified date, web URL). No contradiction 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 concise at three sentences, with the primary action front-loaded in the first sentence. Every sentence adds value: scope/method, return fields, and a note about combined coverage plus permission requirement. No redundant or filler content.

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 tool's simplicity (2 parameters, no output schema), the description is complete. It covers the search scope, the input semantics, the permission requirement, and the return fields. Combined with strong annotations and full schema coverage, the tool is fully specified for an AI agent to select and invoke it correctly.

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?

The input schema provides full descriptions for both 'query' and 'max_results', so the baseline is 3. The description adds extra semantics by clarifying that the query can target both filename and content keywords, which enriches the meaning of the 'query' parameter beyond the schema's generic description.

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 action ('Search'), the resource ('signed-in user's OneDrive and the SharePoint sites they can reach'), and the method ('by filename or content keyword'). It also distinguishes itself from sibling file tools by emphasizing that both OneDrive and SharePoint are covered in a single search, which is a specific and differentiating detail.

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?

The description provides clear context for when to use this tool: when searching for files across OneDrive and SharePoint by name or content. It does not explicitly mention alternative tools for other file operations (e.g., files_list_trending or files_get_content), so it lacks explicit exclusions, but the scope and return fields are well-defined.

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/nitin27may/ms-graph-mcp'

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