Returns every document in the collection with its status, tags, and metadata. For filename-based search across a collection use `searchDocuments`; for tag and metadata filters at retrieval time use the retrieval recipes.
Fetch Dewey's cleaned markdown rendering of a processed document.
Every document that reaches `ready` produces a normalized markdown rendering — headings, lists, tables, captioned images. Use it as the source of truth for downstream RAG, summarization, or display. The same content is what powers section browsing and retrieval.
Walk a document's heading hierarchy and its chunked content.
Sections preserve the heading structure of the source document. Each section contains an ordered list of chunks (the unit Dewey embeds and retrieves). Use this when you're building a navigator UI or want to feed a single section to an LLM rather than a whole document.
Set tags and arbitrary metadata on a single document.
Tags are short strings used for retrieval scoping; metadata is a free-form JSON object useful for any per-document state (uploader, source URL, expiry, etc.). By default metadata merges with the existing object; pass `replaceMetadata: true` to overwrite.
# Tags can be applied at upload time too
dewey upload ./report.pdf -c my-docs--tag q3-2026--tag finance --metadata source=quarterly-packet
Apply tag and metadata changes to many documents at once.
One round-trip for up to several hundred documents. Each entry carries its own `id`, `tags`, and `metadata`. The same merge-vs-replace semantics from the single-document update apply per entry.
Remove a document and its derived sections and chunks.
Hard delete. The document's markdown, sections, chunks, and embeddings are removed. Any claims or contradiction history tied to the document are also pruned.