Customs Declaration Consistency
v0.1.0Read-only MCP server that checks a Chinese customs declaration ledger for internal inconsistency.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
customs_check Check a declaration ledger for internal inconsistency
Run the customs declaration rule pack over a declaration ledger and return the findings as a Markdown report. The input is a JSON or YAML table: one row per document line, with columns such as 品名 (description), 商品编号 (HS code), 币制 (currency), 毛重/净重 (gross/net weight), 申报日期 (declaration date) and 总价 (total value). Call customs_schema for the exact field names and their aliases. The report lists only literal differences from the declared checks — an HS code that is not ten digits, a currency that is not a 3-letter code, gross weight below net weight, a duplic…
| Parameter | Type | Description |
|---|---|---|
material * | string | The ledger as JSON or YAML text. Either an object with a `rows` array, or a bare array of row objects. |
onlyRules | array | Run only these rule ids, e.g. ["CD-002"]. Omit to run the whole pack. |
customs_read_docx Extract readable text from a .docx
Extract text from a .docx file so it can be turned into a ledger for customs_check. Paragraphs come out one per line; table rows come out as "| a | b | c |" lines. Merged cells are marked "↔", meaning "this cell is merged with the one to its left and holds no value of its own" — do not read it as a missing value. A vertically merged cell repeats the value above it, which is what a reader of the document sees. Reads exactly the one path given, opens it read-only, and refuses anything larger than 20 MB. No other file is touched, no network is used, nothing is written. Only a path ending in .…
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute or working-directory-relative path to the .docx file. |
customs_schema Show the ledger column contract
Return the column contract for customs_check: the accepted field names, every alias each field answers to (for example 品名 / goodsName, 币制 / currency), and the header-level fields. Call this first when assembling a ledger, because a column name the reader does not recognise is silently dropped and the corresponding rule then reports nothing. Read-only, no parameters, no network, no writes.
customs_rulebook List the rules and how many can quote their source
Return every rule in the pack: id, title, severity, the basis kind (direct clause / derived from principle / local configuration), the document and clause it cites, and whether the pack actually holds the verbatim clause text. The `coverage` object states how many rules carry a verbatim clause and how many record that the clause was not obtained, so a reader can weigh the report instead of trusting it. This is the answer to "how much of this is actually backed by a quoted regulation" — the number is computed from the pack, not asserted. Read-only, no parameters, no network, no writes.