Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture to enhance its capabilities through extension components. When handling non-text files (such as PDF, Word, and Excel files), large models often struggle to understand them directly. The dsh-tool-markitdown plugin uses the Microsoft MarkItDown engine to convert files locally into Markdown format, allowing large models to read and process them directly.

Installation

Before installing the plugin, ensure the environment dependencies are met: install Python 3.9+ and the MarkItDown library.

0. Install MarkItDown

pip install "markitdown[all]"

After installation, you can verify the version with python -m markitdown --version.

1. Install the plugin

In a DSH Web environment, install the plugin using the following command:

dsh plugin --profile web add dsh-tool-markitdown

2. Install plugin dependencies

The plugin is an independent directory, and the DSH loader resolves dependencies based on the plugin path. After installing the plugin code, install the runtime dependencies (schemastery) inside the plugin directory:

cd dsh-tool-markitdown
pnpm install        # or npm install

Usage

The plugin provides multiple ways to convert files to Markdown.

One-Click Conversion in the Input Box

Click the 📄 button in the input box toolbar and select a file. MarkItDown will immediately convert the file and insert the Markdown content (with an annotation header) into the input box. You can edit the content before sending it.

Drag and Drop with Automatic Conversion

Drag a file from the right-side file panel into the input box. When sending, the plugin automatically detects the file path in that line (such as docs/报告.pdf) and converts it to Markdown before sending.

Model-Side Tool Call

During a conversation, if the user mentions a local path, an HTTP(S) link, or an uploaded attachmentId, the model automatically calls the markitdown tool to perform conversion before reading the content.

Handling Ultra-Long Content

By default, a single response returns 120,000 characters. If the content exceeds this limit, it will be truncated, and an attachmentId will be provided at the end. The model can use this ID to call the API to retrieve the complete content.

Configuration and Notes

Visual Configuration

In “Settings > Plugin Settings > markitdown”, you can adjust the Python command, file size limit, output character limit, timeout duration, and the toggle for automatic conversion when sending.

Notes

  • Local Execution: Conversion is executed locally and does not consume API quota.
  • Original File Safety: Original files on disk remain read-only and will not be modified or deleted. Uploaded temporary copies are cleaned up immediately after conversion is completed.
  • Image Handling: Images are not converted by default and are prioritized for visual recognition. If OCR is required, the model can call the markitdown tool to process the image path.
  • Dependency Requirements: The conversion feature requires Python 3.9+ and the markitdown library.