list
Browse a known folder, library, or notes container without full-text search: get sorted, paginated file entries with paths, sizes, and timestamps to drill down.
Instructions
[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 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; drill down by reading the absolute paths in items or via find_paths. 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. Page order equals sort direction; every sort has a deterministic full-path tiebreaker, so offset pagination is stable. total counts the whole filtered set; page with offset + has_more. Timestamps are Unix milliseconds; modified_at is the filesystem mtime. folder/library items carry doc_id/title/absolute path/doc_type/word_count/char_count/total_lines/has_outline/modified_at/keywords/skip_reason (a non-null skip_reason means the content is not readable — don't read/grep it). Use total_lines + has_outline to decide outline vs read. When a listed 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. notes are filesystem-first: notes created moments ago appear immediately, with doc_id=null and indexed=false until the watcher finishes. Each note item carries note_id plus real-time version (the CAS pair for note_save mode="edit") and title (null when the filename is machine-generated). tags filters notes only (AND; leading '#' stripped, ASCII lowercased); the response carries available_tags (top 50 by usage) — reuse them here and on search scope="notes"; for note_save pass tags only when the user explicitly asked. Defaults per scope — snippet: notes=on (~200 chars of body), folder/library=off (from the indexed abstract when on); output_format: notes=json, folder/library=markdown. snippet=on caps limit at 50; snippet=false pages up to 200.
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 | Absolute directory path to list. Valid for scope="folder" and local scope="library" (must fall inside 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). Omit with scope="folder" to list across all watched roots. The path is an ADDRESS, not a pattern — no globs; if you only know a fuzzy name, call `find_paths` first and use the returned path. | |
| sort | No | Sort order. "recent" (default): notes anchor on creation time (created_at desc); folder/library anchor on modification time (modified_at desc) — so with has_more=true you are looking at the MOST RECENT slice, not a random one. "oldest": the same anchor, earliest first. "name": file basename, UTF-8 code point order, A → Z. Page order equals sort direction, and every sort ends with a deterministic file-path tiebreaker so offset pagination is stable. 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 like `search.tags` (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 — set snippet=false to page with larger limits. | |
| 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). Page order equals sort direction — "recent" pages newest → older, "oldest" earliest → newer, "name" A → Z. Use `has_more` to decide whether to fetch the next page. | |
| library | No | Which library to list (scope="library" only, required there). Accepts `local://<library-id>` or a plain local library name. Call `list_libraries` first to see valid names. Cloud libraries (`cloud://owner/slug`) are served by the Linkly cloud endpoint, not by this local server. | |
| snippet | No | Include a snippet per item. Defaults per scope: "notes" = true (first ~200 chars of the note body, YAML stripped); "folder" / "library" = false (when enabled, the snippet comes from the indexed abstract — 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 — note_id + version — for note_save mode="edit", which does not fit a compact line format; markdown is a human-readable opt-in that still carries note_id and the full version inline). "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`. |