docshelf_add_document
Add PDF or Markdown files to a categorized document shelf. PDFs are converted to Markdown and large documents split by headings, with automatic index regeneration.
Instructions
Add a PDF or Markdown file to the shelf and refresh INDEX.md.
.pdfis converted to Markdown (pymupdf4llmby default; passquality='high'to usemarker-pdf).Documents larger than 50 KB with multiple H2 headings are split into one file per section (turn this off with
split=False).If a different title/category slugifies onto a path an existing document already occupies, the call errors instead of overwriting it — pass
overwrite=trueto replace it. Re-adding the same title updates in place. The response reportsoverwritten.The response
warningsinclude suspicious section headings and anempty-conversionwarning when the source yields little or no text (e.g. a scanned / image-only PDF — considerquality='high'/ OCR).INDEX.md is regenerated automatically. The caller still owns the git commit / push step.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |