graph_search_files
Search OneDrive or SharePoint files by name or content and page through results with next-link URLs when large result sets exceed the requested limit.
Instructions
Search for files by name or content in OneDrive or a SharePoint document library.
Graph rejects $skip on the search function, so page with next_link instead.
Args: query: Search query string. top: Maximum number of results (default 25). compact: Whether to return only the identifying fields instead of the full record (default false). Use it to page through large collections cheaply. next_link: Opaque nextLink URL from a previous call, used to fetch the next page. Overrides the other paging arguments when supplied. include_next_link: Whether to wrap the result as {items, next_link} so paging can continue (default false, which returns a bare list). drive_id: Drive ID to act on. Empty targets your own OneDrive.
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": "graph_search_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| query | Yes | ||
| compact | No | ||
| drive_id | No | ||
| next_link | No | ||
| include_next_link | No |