visimark

v0.4.1
io.github.michal-niedzwiedzki/visimark Checked 1 day ago Published 1 month ago

MCP server for VisiMark, a document integrity layer for Markdown: checks numbers against formulas.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

visimark_ref VisiMark function reference

Look up VisiMark's builtin functions: signature, arity, precision, errors and examples. Give `name` to look it up, or omit `name` for the whole reference. Reads no file.

ParameterTypeDescription
namestringA builtin's name, e.g. `SUM`. Omit for the whole reference.

visimark_check Check a VisiMark document

Verify that every computed number in a Markdown document still agrees with the formula that produced it, and report what does not. Findings are a successful result, not an error. A document given as `content` has no directory, so imports and generated artifacts cannot be verified; `skipped` names the ones that were not checked.

ParameterTypeDescription
contentstringThe document as text, for a draft that is not on disk. Give this or `path`, never both.
pathstringPath to a Markdown document on disk.

visimark_explain Explain a VisiMark document's structure

Describe what a document declares: its sheets, input columns, computed rules, anchored scalars, derived precision and imports. Give `sheet` to narrow it.

ParameterTypeDescription
contentstringThe document as text, for a draft that is not on disk. Give this or `path`, never both.
pathstringPath to a Markdown document on disk.
sheetstringA sheet id, without the leading `#`.

visimark_eval Evaluate a VisiMark document

Evaluate a document and return its values, its assertions and its charts. Give `get` to select a single named value. Give `scenarioPath` or `scenarioContent` to substitute parameters and see what moves — a draft scenario against a draft document, with no temp file. A false assertion is a successful result reporting problems.

ParameterTypeDescription
contentstringThe document as text, for a draft that is not on disk. Give this or `path`, never both.
getstringOne value's qualified name, e.g. `lines.gross_total`.
pathstringPath to a Markdown document on disk.
scenarioContentstringA scenario as JSON text.
scenarioPathstringPath to a scenario JSON file.

visimark_infer Propose VisiMark rules for a plain table

Derive the formulas an existing Markdown table already obeys, and propose them as `vmark` rules. Run this before hand-authoring rules for a document that already has its numbers. Returns proposals only and never writes; `visimark_infer_apply` writes them.

ParameterTypeDescription
contentstringThe document as text, for a draft that is not on disk. Give this or `path`, never both.
pathstringPath to a Markdown document on disk.

visimark_fmt Plan a VisiMark repair

Plan the edits that would bring a document's stored numbers back into agreement with its formulas, and name the generated artifacts it would write. Nothing is written: pass the returned plan to `visimark_fmt_apply` to land it. It repairs stale computed values, anchors and generated artifacts, and nothing else — never prose, never a column with no rule, never any other finding class. A document given as `content` has no directory, so imports and generated artifacts cannot be verified; `skipped` names the ones that were not checked.

ParameterTypeDescription
contentstringThe document as text, for a draft that is not on disk. Give this or `path`, never both.
pathstringPath to a Markdown document on disk.

visimark_fmt_apply Apply a VisiMark repair

Land the plan `visimark_fmt` returned: splice the document's computed cells and anchors, and write the generated artifacts it named. Refused if the document changed since the plan was computed, and refused entirely unless the operator started the server with `--allow-write` and the host declared a root.

ParameterTypeDescription
path *stringThe document to write. There is nothing to apply to a string.
plan *objectThe result of `visimark_fmt`, unedited apart from dropping entries you rejected.

visimark_infer_apply Apply proposed VisiMark rules

Insert the `vmark` rules `visimark_infer` proposed. Pass the plan you were given, with any proposal you rejected removed. Refused if the document changed since the plan was computed, and refused entirely unless the operator started the server with `--allow-write` and the host declared a root.

ParameterTypeDescription
path *stringThe document to write. There is nothing to apply to a string.
plan *objectThe result of `visimark_infer`, unedited apart from dropping entries you rejected.