browse_documents
Browse library folders level by level to locate and retrieve documents, or use query-based relevance ranking to answer document questions.
Instructions
Primary document retrieval tool. After orienting with get_folder_structure() (when available) — and, for queries that may involve typed attributes, pairing it with get_metadata_schema() so you know which fields metadata mode could filter on — use this for all document-related questions. The bare call returns root-level sub-folders and documents; pass folder_id to drill into a sub-folder level by level. Use sort="relevance" + query for semantic ranking. Do NOT jump to search_documents() first — keyword search and metadata mode are escalation paths, only after browse_documents(sort="relevance") + the persistence retries have failed. browse_documents does not filter by attribute — for typed-attribute queries, escalate to search_documents(mode="metadata").
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "browse_documents"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Sort order. "time" (default) sorts by upload date (newest first); "relevance" orders documents by semantic relevance to `query`. Relevance also works inside the read-only shared folders — pass their folder_id — but at the library root it ranks only your own documents. | |
| limit | No | Number of documents to return per page (1-50, default 10) | |
| query | No | Search query for relevance ranking. Required when sort="relevance". | |
| offset | No | Zero-based pagination offset. Pass the value of `next_offset` from the previous response to fetch the next page. | |
| folder_id | No | Folder scope (default "root"). Pass a specific folder ID to scope into that folder, or "root" to reference the library root. The read-only "shared-with-me" and "following" folders live at the library root — pass one of those ids to browse them. Copy any folder_id verbatim from a browse/tree response, never construct one. Combine with `recursive` to control breadth. | |
| recursive | No | Whether to include documents from descendant folders. When false (default), returns the direct contents of folder_id along with its sub-folders — prefer this for level-by-level exploration so you retain folder hierarchy context. When true, flattens all descendant documents into one list and omits sub-folders — use only when a non-recursive browse of the target folder returned no relevant results and you need to widen the scope, or the user explicitly requests a flat listing. |