list
[Tool boundaries: explore = global overview → find_paths = FIND a directory → list = LIST files in a known container → outline/read = read content. For keyword/semantic search use search.] List the entries of a container WITHOUT full-text matching. scope is REQUIRED: "folder" (indexed files under a local disk directory — omit path to sweep all watched roots), "library" (one library's files; requires library; call list_libraries first), or "notes" (local markdown card notes). Listing is a flat recursive sweep of the whole subtree — no directory tree is returned.
Sorting IS the truncation policy: "recent" (default) anchors on modified_at for folder/library and created_at for notes, newest first — with has_more=true you are seeing the MOST RECENT slice, not a random one. "oldest" is the same anchor earliest-first; "name" is file basename A → Z (local only — not supported for cloud libraries). Page order equals sort direction; offset pagination is deterministic. total counts the whole filtered set for local scopes; for cloud libraries total is usually null (unknown) — except a zero-row first page (offset=0), which returns total: 0 (plus a hint when a path prefix was given, since an empty prefix and a nonexistent one are indistinguishable) — paginate by has_more; if you need the full picture and has_more stays true, switch to search with the library filter. Timestamps are Unix milliseconds.
Items carry doc_id (for read/grep/outline) plus title/path/doc_type/word_count/char_count/total_lines/has_outline/modified_at/keywords/skip_reason; notes items add note_id + real-time version (the CAS pair for note_save mode="edit"). When a listed local directory has a README-style file, the response carries a top-level readme pointer — when present and you need to understand the folder's purpose, read it first.
Scope: scope="folder"/"notes" and local libraries ride the Desktop tunnel (Desktop must be online). Pass library="cloud:///" with scope="library" to list a linked cloud library — served by the gateway regardless of Desktop state; cloud path is a RELATIVE directory prefix as returned by find_paths.
Size fields (Desktop-local documents): word_count counts words (one per CJK character or Latin word; whitespace/punctuation/markup excluded) and reads well below a Chinese user's 字数; char_count counts Unicode characters of the extracted body (whitespace/punctuation/markup included, CR excluded) — the figure to match what the user sees. null/omitted char_count = not yet computed (or an older Desktop), not an empty body; read on a local document returns it whenever the Desktop supports it. cloud:// items do not carry char_count.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"scope": "<scope>"
},
"name": "list"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Directory to list. For scope="folder" and LOCAL libraries: an absolute disk path (must fall inside watched roots / the library's folders, or inside the Notes/Clips directory when the library has a tag filter for that source — such paths list only the documents matched by the filter). For CLOUD libraries: a RELATIVE directory prefix as returned by find_paths (absolute forms are rejected). The path is an ADDRESS, not a pattern — no globs; if you only know a fuzzy name, call `find_paths` first. | |
| sort | No | Sort order. "recent" (default): notes anchor on creation time (created_at desc); folder/library anchor on modification time (modified_at desc). "oldest": the same anchor, earliest first. "name": file basename, UTF-8 code point order, A → Z (local only; rejected for cloud libraries). Page order equals sort direction with a deterministic tiebreaker. Sending `null` or omitting the field yields the default. | |
| tags | No | Return only notes carrying ALL of the given tags (AND semantics). Valid for scope="notes" only — other scopes reject it. Tags are normalized (leading '#' stripped, ASCII lowercased). For keyword search over notes use `search` with scope="notes" instead — `list` does no full-text matching. | |
| limit | No | Maximum items to return (default: 50, max: 200). While `snippet` is enabled the max drops to 50. | |
| scope | Yes | Container scope to list. REQUIRED. "folder" — browse indexed files under a disk directory (omit `path` to see all watched roots). "library" — list files in one library; requires `library`. "notes" — the user's local markdown card notes. Unknown values are rejected. Note: `search.scope` has a value also spelled "folder" that means "all indexed content" — a different concept; the two parameters do not share values. | |
| offset | No | Pagination offset counted from the first item in sort order (default: 0). Use `has_more` to decide whether to fetch the next page. | |
| library | No | Which library to list (scope="library" only, required there). Use `local://<library-id>` or a plain local library name for a local library (rides the Desktop tunnel), or `cloud://<owner>/<slug>` for a linked cloud library (served by the gateway). Call list_libraries first to see valid names. | |
| snippet | No | Include a snippet per item. Defaults per scope: "notes" = true (first ~200 chars of the note body); "folder" / "library" = false (from the indexed abstract when enabled — no disk reads). While enabled, `limit` is capped at 50. The `snippet` field is always present and null when disabled or unavailable. Sending `null` or omitting yields the default. | |
| doc_types | No | Filter by document type name, as reported in the doc_type field of each result (e.g. ["pdf", "md", "docx"]). Type name, not extension. This is not a closed set — newly supported types appear there without a schema change. Valid for scope="folder" and scope="library". | |
| output_format | No | Output format. Defaults per scope: "notes" = "json" (each item is a CAS handle for note_save mode="edit"); "folder" / "library" = "markdown" (compact, human-readable; set "json" for machine parsing). Sending `null` or omitting yields the default. | |
| modified_after | No | Inclusive lower bound on file modification time (scope="folder" / "library"). ISO 8601 UTC: a bare date ("2024-01-01") or a full RFC 3339 datetime. Read the current time from any tool response's `_meta.now` to compute relative dates. | |
| modified_before | No | Inclusive upper bound on file modification time (scope="folder" / "library"). Same format as `modified_after`. |