files.search
Search files
Find files (and folders) by name or content in a connected file store such as OneDrive or SharePoint. Returns metadata and a link; use files.get to read a file.
readOneDrive / SharePoint
The tenant picks one of these when they bind this capability at install time. New implementations land as connectors ship — browse the connector catalogue.
Request arguments
Passed as the args parameter to ctx.capability.call("files.search", …).
| Field | Type | Required | Description |
|---|---|---|---|
| limit | integer | no | default: 20 · min: 1 · max: 100 |
| query | string | yes |
Response
Returned by ctx.capability.call("files.search", …).
Array; each element is an object with the following fields.
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | yes | |
| url | string | no | |
| name | string | yes | |
| path | string | null | no | |
| size | integer | no | |
| score | number | no | |
| isFolder | boolean | no | |
| mimeType | string | null | no | |
| lastModified | string | null | no | format: date-time |
Example call
From inside your agent's handle(). The kernel resolves files.search to the tenant's connector binding at invocation time.
response = await ctx.capability.call(
"files.search",
args={
"limit": 20,
"query": "...",
},
)See SDK quickstart for the full agent handler template; code examples covers invocation patterns including fanout and error handling.