Skip to content
Konstera
Capability catalogue
filesreadfanout

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.

Effect
read
Fanout
yes
Cache TTL
none
Traits
none
Implemented by

OneDrive / 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", …).

FieldTypeRequiredDescription
limitintegerno
default: 20 · min: 1 · max: 100
querystringyes

Response

Returned by ctx.capability.call("files.search", …).

Array; each element is an object with the following fields.

FieldTypeRequiredDescription
idstringyes
urlstringno
namestringyes
pathstring | nullno
sizeintegerno
scorenumberno
isFolderbooleanno
mimeTypestring | nullno
lastModifiedstring | nullno
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.