Skip to main content
Glama

Search OneDrive Files

search_files
Read-only

Search OneDrive and SharePoint files by query to locate matching items; use drive listing or item lookup when you need folder counts or sizes.

Instructions

Search OneDrive/SharePoint files. Search results show folders without item counts or sizes, which search does not report; use list_drive_items or get_drive_item for those.

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_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoMaximum results to return (default: 25). Use fetch_all_pages when every match is needed.
queryYesSearch query
fetch_all_pagesNoFetch all pages of results (max 50 pages)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only supply readOnlyHint=true; the description adds a genuinely useful behavioral limitation that annotations cannot express — folder results carry no item counts or sizes, so an agent knows not to expect that data. It stops short of covering result shape or pagination limits, but adds real value beyond the structured fields.

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?

Two sentences, front-loaded with the purpose and followed by the caveat plus the escape hatch. The clause 'which search does not report' is slightly redundant with 'search results show folders without item counts or sizes,' but nothing else is wasted.

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?

A read-only, three-parameter search with a fully documented schema and no output schema has modest disclosure needs, and the description covers the one non-obvious result quirk plus alternatives. Its only gap is not explaining result shape or what happens when fetch_all_pages pushes past the 50-page cap.

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 query, top, and fetch_all_pages are already documented in the schema, including the default of 25 and the pointer to fetch_all_pages. The description adds no parameter meaning beyond that, which is the appropriate baseline given the schema does the work.

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?

States a concrete verb + resource ('Search OneDrive/SharePoint files'), scoping the search to files rather than sites, contacts, or messages. It does not explicitly differentiate itself from the sibling search_site_files, but the resource scope is clear enough to act on.

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?

Gives explicit routing for a real ambiguity: when folder item counts or sizes are needed, use list_drive_items or get_drive_item instead. It lacks broader when-to-use framing (e.g. search vs. browsing a drive), but the named alternative and its condition are actionable.

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