dsh-tool-doc
Manifest validDeepSeek Harness Document Tools Plugin: read/create/edit PDF/DOCX/XLSX/PPTX/CSV/Markdown (read_document, create_document, edit_document)
@deepseek-ai/dsh-tool-doc
English | 中文
Model-facing document tools: read, create and edit PDF / DOCX / XLSX / PPTX / CSV / Markdown files without shelling out to external utilities.
What it does
Registers three tools on ctx.tools:
read_document(file_path)— reads PDF (text layer, page by page), DOCX (mammoth), XLSX (every sheet, cell values), PPTX (per-slide text), CSV (delimiter-sniffed, quote-aware) and plain text (md/txt/yaml/json/log). Output is bounded bymaxTextChars(default 200,000) with an explicit truncation notice. Scanned/image-only PDFs yield no text.create_document(file_path, content)— creates a NEW file; the target must not exist (createIfAbsent semantics — useedit_documentto change an existing file). DOCX/PDF take Markdown-litetext(#/##/###headings,-bullets) plustitleand (DOCX)tables; XLSX takessheets; CSV takesrows; md/txt take plaintext. PDF embeds a system CJK font when one is discoverable (cjkFontPathconfig overrides the search).edit_document(file_path, operations)— applies ordered literal edits in place. DOCX:replace_text(inside single text runs,countdefaults to 1,'all'replaces every match) andappend_paragraph. XLSX:set_cell/append_rows/add_sheet(1-based addressing;sheetomitted means the first sheet). CSV:set_cell/append_rows. Operations validate up front; a rejected op aborts the call before any write.
Legacy binary .doc / .xls / .ppt files are not supported — the tools ask the user to convert them first. PPTX is read-only.
Filesystem seam
Text formats (csv/md/txt/…) read and write through the governed ctx.fs seam, so sandbox policy, approval flows and observation events apply as with the native read/write tools. Binary formats read through ctx.fs.readBytes (capped by readMaxBytes, default 50 MB) but write to the resolved process path with node:fs, because the seam is text-only; sandbox write policy does not fence those binary writes.
Configuration
All optional: maxTextChars (read text budget), readMaxBytes (binary read cap), cjkFontPath (explicit CJK font file for PDF creation — any fontkit-openable TTF/OTF/TTC).
Model Experience
Tool schema
The model sees one schema per tool with a precise per-format description; edit_document operations are a oneOf discriminated by a const op, so the model gets an exact contract for each edit kind.
Tool-call history and result
Read results carry a <path>/<kind>/<details>/<content> envelope (bounded text); create/edit results return a one-line acknowledgement with byte counts or per-op summary numbers. Errors are stable Chinese/English message strings describing the rejection (unsupported legacy format, target already exists, unknown worksheet, zero matches, …).
Known Limitations and Deferred Work
- PDF CJK fonts are discovered, not bundled — with no usable system font, CJK text falls back to the built-in Latin font (the create result reports it). The
.ttccollection path extracts the first face to a temp TTF because pdfkit cannot embed collections. - DOCX edits are paragraph-level —
replace_textmatches inside single<w:t>runs (text split across runs does not match); headers, footers, fields and numbering are out of edit scope. - No in-place edits for PDF/PPTX/text — recreate with
create_documentinstead. - Legacy binary office formats unsupported —
.doc/.xls/.pptneed a user-side conversion first.
Comments
Loading…
Similar plugins
by pqkisvery666
DSH 办公文件插件:阅读 PDF/DOCX/XLSX/PPTX,生成 DOCX/XLSX/PPTX/PDF/CSV。A DSH plugin for reading and generating common office files.
★ 3
MIT
JavaScript
Sep 11, 2026
dsh plugin --profile web add dsh-basic-officeby qingmumingyang
DSH 文档读写工具包 - PDF/DOCX/XLSX/CSV 读写与 PDF 导出(利用dsh制作的,希望能帮到你们)
★ 1
MIT
JavaScript
Sep 25, 2026
dsh plugin --profile web add dsh-doc-toolkitby didclawapp-ai
DeepSeek Harness plugin for PPTX / DOCX / XLSX / PDF read/write/edit
★ 6
MIT
TypeScript
Aug 15, 2026
dsh plugin --profile web add dsh-zagens-officeby taxueseek
DeepSeek Harness 插件:原生上传管线上的文件夹按钮 + read_document 文档解析(PDF/DOCX/XLSX)。The folder button on the native upload pipeline, plus the read_document parser.
★ 40
MIT
TypeScript
Oct 1, 2026
dsh plugin --profile web add dsh-filesby rong-coder
dsh plugin for DeepSeek Harness: complete Office document tools for the agent (create/read/edit .docx/.xlsx/.pptx via OfficeCLI) plus high-fidelity document preview in the dsh web sidebar through dsh-
★ 6
MIT
TypeScript
Aug 17, 2026
dsh plugin --profile web add dsh-office-toolby omdsh-dev
办公三件套!Office document tools for DeepSeek Harness (dsh): generate, read, and edit spreadsheets (.xlsx), PDFs, and presentations (.pptx).
★ 26
↓ 909/wk
Apache-2.0
TypeScript
Sep 24, 2026
dsh plugin --profile agent add @huiliyi37/dsh-office