In the DeepSeek Harness (DSH) plugin ecosystem, processing financial data typically involves extracting information from PDFs, cleaning Excel/CSV tables, matching bank statements with ledgers, and handling invoices and tax calculations. dsh-duizhang provides automation for this pipeline, converting bank statements and invoice batches into tables suitable for bookkeeping and completing reconciliation.

Plugin Overview

This plugin is maintained by the ainetcafe.com team and is a workflow tool. It interacts with dsh via MCP (Model Context Protocol) and provides 15 tools covering document parsing, table processing, reconciliation/merging, and enterprise data cleaning. All tools are under the MIT License.

Core Capabilities

The tools are divided into four main categories, each addressing different stages of financial data processing.

1. Document Parsing and Cleaning

  • extract_statement: Converts bank or credit card statement PDFs into clean transaction tables (supports JSON and CSV formats) and automatically cross-checks balances.
  • extract_invoices: Processes up to 20 invoice PDFs or page images, extracts fields such as invoice number, date, buyer, and seller, and generates tables ready for bookkeeping.
  • read_xlsx / write_xlsx: Reads or creates Excel .xlsx files. Supports reading all sheets or a specified sheet, and outputs data as CSV text or JSON arrays.
  • fix_csv_encoding: Automatically detects the actual encoding of a CSV file (such as GB18030, Shift-JIS, Windows-1252, etc.) and fixes garbled text issues.
  • clean_table: Cleans exported tables by removing duplicate rows and trimming whitespace (including full-width and half-width spaces).

2. Reconciliation and Merging

  • reconcile_ledger: Reconciles two datasets, matches rows, and reports keys present only in A, only in B, or in both.
  • match_transactions: When there is no shared key (such as an account number), matches bank transactions to ledger entries using amount, date window, reference number, and fuzzy counterparty-name matching.
  • diff_tables: Compares two CSV tables, matches rows by key columns, and reports differences.
  • merge_tables: Merges up to 20 CSV tables and handles column-name mismatches by using the union of columns.

3. Enterprise Data Validation

  • uscc_validate: Validates the Unified Social Credit Code (GB 32100 check digit), useful for deduplicating enterprise lists and verifying invoice headers.
  • amount_to_chinese: Converts RMB amounts into Chinese uppercase (formal) notation (for example, the formal uppercase representation of RMB 1,000,001.23), suitable for invoicing and contract scenarios.
  • vat_calc_cn: Performs VAT price-tax separation (tax-inclusive price ⇄ tax-exclusive price + VAT amount), supporting 0.13 or 13 as the tax rate parameter.

4. Task Discovery

  • what_can_you_do: Describe a task in natural language (multilingual support) to get the specific tools and invocation parameters on the server that can execute the task.

Installation and Enablement

Installing this plugin requires specifying your profile. The command is:

dsh plugin --profile <your-profile> add github:mario03690/dsh-duizhang

After installation, the plugin only adds one configuration line for @deepseek-ai/dsh-mcp-client to the dsh config and includes no local tool code.

Typical Usage

In DSH, you can invoke tools by describing your needs in natural language.

  1. Extraction and conversion: Convert a bank statement PDF into a table.
    > “Convert the bank statement PDF into a clean transaction table (JSON+CSV).”
    > This will call extract_statement and automatically verify whether the balances are balanced.

  2. Keyless matching: Match bank transactions with ledger entries.
    > “Match bank transactions and ledger entries. They have no shared account number, so match them by amount and date only.”
    > This will call match_transactions and handle 1:N or N:1 payment cases.

  3. Entity deduplication: Clean a supplier list.
    > “Find potentially duplicate entities in the supplier list, for example ‘Beijing Xingchen Technology Co., Ltd.’ and ‘Xingchen Technology (Beijing)’.”
    > This will call dedupe_entities, combining tax ID validation and name-threshold judgment.

Runtime Environment and Permissions

  • Runtime: Built on dsh v0.1 developer preview (Cordis v4).
  • Local code: None. The plugin only includes a cordis.patch.yml configuration file and does not include any lifecycle scripts or build steps.
  • Permissions:
    • Filesystem/Shell/process: No access.
    • Network: Outbound HTTPS only to ainetcafe.com.
  • Data processing: Documents and prompts are processed in memory only and are not retained.
  • Quotas and billing: There is no free anonymous quota; registration is required. Table operations are billed per call (\(0.002-\)0.008), and document extraction is billed as follows: bank statements $0.03, invoices $0.05. Failed calls are not charged, and each response reports the exact cost.

Conclusion

dsh-duizhang focuses on the specific area of financial data processing. By encapsulating complex reconciliation logic inside tools, it lowers the barrier for DSH agents to perform financial automation tasks. For developers who need to process large volumes of bank transactions, invoices, and accounting reconciliation, this is a plug-and-play plugin.