Skip to main content
Glama

Search SharePoint Files

search_site_files
Read-only

Search files in a SharePoint site by query, with optional drive and result limits; use it to locate documents when you do not know the exact path.

Instructions

Search files within a SharePoint site. 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": {
      "site_id": "<site_id>",
      "query": "<query>"
    },
    "name": "search_site_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoMaximum results to return (default: 25). Use fetch_all_pages when every match is needed.
queryYesSearch query
site_idYesSite ID
drive_idNoDrive ID (omit to search default document library)
fetch_all_pagesNoFetch all pages of results (max 50 pages)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, so the description carries the rest, and it does disclose a real result-fidelity limitation: folders come back without item counts or sizes. That is exactly the kind of beyond-schema behavior an agent needs, though pagination/result-cap behavior is left entirely to the schema.

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?

Two sentences, no filler, with the core purpose front-loaded before the caveat and the alternative routing. Every clause carries information the agent can act on.

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?

With no output schema, the description partially compensates by describing what results look like for folders, and the schema fully covers paging. It is nearly complete for a 5-parameter read-only search; only the overall result shape for files (vs folders) is left unstated.

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 (query, site_id, drive_id, top, fetch_all_pages) is already documented, including the fetch_all_pages guidance for exhaustive retrieval. The description adds no parameter-level meaning beyond that, so the baseline of 3 applies.

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 gives a specific verb and resource ('Search files') plus a scope ('within a SharePoint site'), which is enough to distinguish it from a generic file search. It stops short of explicitly naming the sibling search_files, so the differentiation relies on the site-scoping phrase rather than a direct contrast.

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 clearly routes the agent away from this tool when folder metadata is needed, naming two concrete alternatives (list_drive_items, get_drive_item). What's missing is any statement of when this tool is preferred over the other search entry point, so the when-not guidance is narrower than a full 5.

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