Skip to content

Read tools

These tools only look. Every connected app gets them, and they are the only tools an app has unless an administrator has agreed it may make changes.

Read onlyScope: foldr.read

Evaluate a math expression with arbitrary-precision decimal arithmetic. Use this for any sum / average / difference / multiplication / percentage calculation. NEVER compute math in your head — this tool is always cheaper and always correct.

Expression grammar:

  • Operators: + - * / and parentheses
  • Functions: sum(a, b, …), avg(a, b, …), min(a, b, …), max(a, b, …), abs(x), round(value, places)
  • Numbers can be decimal (e.g. 89.50, -1.25)

Examples:

  • “1250 + 89.50 + 12450.75” → “13790.25”
  • “sum(1250, 89.50, 12450.75)” → “13790.25”
  • “avg(45.50, 127.80, 2234.00)” → “802.4333”
  • “(1250 + 89.50) * 1.20” → “1607.40”
  • “round((45.50 + 127.80) / 3, 2)” → “57.77”
  • “max(1250, 89.50, 12450.75)” → “12450.75”
ArgumentTypeRequiredWhat it is
expressionstringYesThe math expression to evaluate.
scaleintegerNoDecimal places of precision (0-20). Default 4. For currency, prefer 2 or 4.
Read onlyScope: foldr.read

Find files where one or more custom fields match. Automatically detects similar values (typos, OCR errors, abbreviations) and includes them in the results. Use list_fields first to get field IDs. Pass filters as a JSON array, e.g. [{“field_id”:“X”,“value”:“Y”}]. For AND across multiple fields: [{“field_id”:“X”,“value”:“Y”},{“field_id”:“Z”,“value”:“W”}]. In your response, always mention any variant matches found.

To compute a sum/avg/min/max over the matched files (e.g. “total spend where status=paid”), pass aggregate as a JSON object: {“field_id”:“<numeric field id>”,“op”:“sum|avg|min|max”}. The aggregate runs server-side — never sum results yourself. If the aggregate field isn’t numeric, the response will include aggregate.reason: 'field_not_numeric' and you should tell the user the field can’t be summed.

ArgumentTypeRequiredWhat it is
filtersstringYesJSON array of filters, e.g. [{“field_id”:“29”,“value”:“paid”}]
aggregatestringNoOptional JSON object: {“field_id”:“30”,“op”:“sum”}. Op is one of sum|avg|min|max.
Read onlyScope: foldr.read

Get the details of one file or folder in a share: its name, kind, size, last-modified time and type.

ArgumentTypeRequiredWhat it is
sharestringYesThe share’s name or id, from list_shares
pathstringYesPath of the file or folder inside the share
Read onlyScope: foldr.read

Get the text Foldr’s search index extracted from a file (including OCR of scans), without opening the file itself. Only for shares that list_shares marks indexed.

A long text comes back in parts: when next_offset is set, call again with offset set to it.

ArgumentTypeRequiredWhat it is
sharestringYesThe share’s name or id, from list_shares
pathstringYesPath of the file inside the share
offsetintegerNoWhere to start, from a previous part’s next_offset (default 0)
Read onlyScope: foldr.read

Get your recent activity across all shares. Filter by action type and/or a relative time window.

ArgumentTypeRequiredWhat it is
typestringNoOptional: download, upload, delete, share, view, create
sincestringNoISO date or relative like ‘last week’, ‘yesterday’
limitintegerNoMaximum events to return (default 50, max 200)
Read onlyScope: foldr.read

Get items you have shared with others. An item with pending_approval true is a request still waiting for an approver: nobody else can open it yet, and the people or public link it asks for are not in effect until it is approved.

ArgumentTypeRequiredWhat it is
recipient_guidstringNoFilter by recipient: the person’s or group’s guid, when you already have it
typestringNoFilter: file, dir, or public
expiredstringNoFilter: true (expired only) or false (active only)
Read onlyScope: foldr.read

Get items others have shared with you.

ArgumentTypeRequiredWhat it is
sharer_guidstringNoFilter by who shared: the person’s guid, when you already have it
typestringNoFilter: file or dir
Read onlyScope: foldr.read

List your bookmarks. Optionally filter by filename.

ArgumentTypeRequiredWhat it is
searchstringNoOptional filename substring
Read onlyScope: foldr.read

List available custom fields across all your shares.

No arguments.

Read onlyScope: foldr.read

List the files and folders in one folder of a share, folders first, 200 entries per page.

When next_page is set there are more entries: call again with that page. When truncated is true the folder holds more entries than can be listed, and the pages cover only the first of them.

ArgumentTypeRequiredWhat it is
sharestringYesThe share’s name or id, from list_shares
pathstringNoFolder path inside the share; ”/” or empty for the top of the share (default ”/”)
pageintegerNoPage number, from 1 (default 1)
Read onlyScope: foldr.read

List the shares (storage locations) you can read. Call this first: every other file tool takes a share’s name or id from this list.

Each share has its name, id, storage type, whether it is indexed for search_files, and whether it is read-only for you.

A share listed with reachable: false is one of yours whose file server could not be reached just now (it timed out or refused the connection). It exists and you may read it, but it cannot be opened or searched until the server is back: tell the user it is unavailable, not that it does not exist, and try again in a few minutes.

No arguments.

Read onlyScope: foldr.read

List the earlier versions of one file, newest first, each with the id restore_version_as_copy takes, when it was saved, its size and, where Foldr recorded it, who saved it. Only storage that keeps versions has any (SharePoint, S3 when the bucket is versioned, Azure, Foldr’s hosted storage, SMB shadow copies); other storage answers that it keeps none.

ArgumentTypeRequiredWhat it is
sharestringYesThe share’s name or id, from list_shares
pathstringYesPath of the file inside the share
Read onlyScope: foldr.read

Read a file’s text. Plain-text files (txt, csv, md, json, code…) are read as they are; documents (PDF, Word, Excel, PowerPoint…) give their extracted text, from the search index when it has it.

A file with no text (an image, a video, an archive) is answered with its size and type instead, never raw bytes. A long file comes back in parts: when next_offset is set, call again with offset set to it to read on.

ArgumentTypeRequiredWhat it is
sharestringYesThe share’s name or id, from list_shares
pathstringYesPath of the file inside the share
max_bytesintegerNoMost text to return for a plain-text file, in bytes (default 49152, at most 61440)
offsetintegerNoWhere to start, from a previous part’s next_offset (default 0)
Read onlyScope: foldr.read

Search for existing values of a custom field. Use to browse what values exist for a field, or to check for a specific value with a prefix filter. Returns up to 100 distinct values.

ArgumentTypeRequiredWhat it is
field_idstringYesThe field ID from list_fields
prefixstringNoStarting characters to filter by (e.g. “A”, “Acm”)
Read onlyScope: foldr.read

Search file names and contents with Foldr’s keyword search, across every indexed share you can read or within one share. Only files you are allowed to see are returned.

Plain words find files containing all of them; “quoted phrases” match exactly. Each hit has its share, path, name, size, modified time and a snippet of matching text; pass its share and path to read_file to read it.

ArgumentTypeRequiredWhat it is
querystringYesWhat to search for
sharestringNoLimit the search to this share (name or id from list_shares); empty for all indexed shares
pageintegerNoPage number, from 1 (default 1)
limitintegerNoHits per page (default 20, at most 50)
Read onlyScope: foldr.read

Get the current user’s profile: name, email, type, group memberships, admin status, and enabled tier features. Useful for “what groups am I in?”, “am I an admin?”, “what features do I have?”.

No arguments.