> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.deepmask.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Search Files

`sharepoint_search_files`

Runs a full-text search across all SharePoint content the user can access, using Microsoft's Keyword Query Language (KQL). Returns file identifiers (`driveId` and `itemId`) that can be passed directly to `sharepoint_get_file_content` or `sharepoint_get_file_metadata`.

## Parameters

| Parameter         | Type   | Required | Description                                                                                                                      |
| ----------------- | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `query`           | string | Yes      | Full-text search query. Supports KQL syntax — e.g. `"budget"`, `"\"Q3 report\""`, `"filename:roadmap.docx"`.                     |
| `limit`           | number | No       | Max results to return (1–100, default 20).                                                                                       |
| `offset`          | number | No       | Results to skip for pagination (default 0).                                                                                      |
| `entity_types`    | array  | No       | Graph entity types to include. Options: `"driveItem"`, `"listItem"`, `"list"`, `"site"`, `"drive"`. Defaults to `["driveItem"]`. |
| `response_format` | string | No       | Output format: `"markdown"` (default) or `"json"`.                                                                               |

## Returns

A paginated list of search results. Each result includes `driveId`, `itemId`, `name`, `webUrl`, `mimeType`, `size`, `lastModifiedDateTime`, `parentPath`, and `siteId`. Includes `count`, `offset`, `has_more`, and `next_offset`.

<Info>
  KQL supports phrases (`"exact phrase"`), field-scoped queries (`filename:report.xlsx`), and boolean operators (`budget AND 2024`). For simple keyword searches, plain text works without any special syntax.
</Info>

## Example use

> "Search for any SharePoint files mentioning 'annual review'."
