Skip to main content
POST
Files
Choose a connection from GET /v1/connections by system and account_label. The signed-in user’s permissions apply.

Search files

POST /v1/tools/files/search (files_search) requires connection_id and a non-empty query. Optional folder_id restricts search to that folder: recursively for Box and Microsoft 365, or direct children for Google Drive. limit defaults to 25, maximum 50. Pass next_cursor as cursor, filters unchanged. Search indexing can lag changes. Box excludes trashed files and stops paging at offset 10000; narrow larger searches.
The response contains data.records, data.receipt_id, and data.next_cursor when another page exists. Each record has id, name, path, content_type, size, modified_at and source (system, id). Unavailable descriptive fields are null. Folders are omitted; continue while a cursor is present. Pass opaque IDs unchanged. Microsoft folder IDs can be raw item IDs or drive/item references.

Read a file

POST /v1/tools/files/read (files_read) takes connection_id and file_id from the search results. It returns name, content_type, size and base64 inside data, alongside receipt_id. Google Drive currently supports Google Sheets as CSV (text/csv). Optional sheet selects a tab by its exact name; omitting it selects the first tab. CSV uses displayed values, escaping delimiters and newlines and preserving interior empty cells. Empty tabs return empty CSV. The cap applies to UTF-8 bytes including escaping. Missing tabs refund payment. Other providers refuse sheet. Ordinary Drive bytes and Google Docs/Slides plain-text exports are not supported yet: reads refuse before payment; metadata remains searchable. Content is limited to 10 MB (10,485,760 bytes). Missing or invalid required metadata and known oversized content refuse before payment. Sheets have no exported size in metadata, so their CSV size is checked during the read. Downloads are bounded while streaming and only use Box download endpoints or Microsoft 365 tenant download endpoints, without following redirects. A file that changes size or fails to download after payment is refused and refunded as account credit. These tools never modify files or save fetched data in logs, receipts, jobs or goal history. Later steps must read again. Invalid inputs return 400 invalid_request, unsupported sizes return 400 not_supported, another agent’s connection returns 404 connection_not_found, and revoked or expired connections return 409. Unavailable file data returns 503. Payment uses x402 or account credit; amounts are on Pricing.