Skip to content

Lint

One call that takes a Markdown document and returns every structural problem it finds: skipped heading levels, mixed list markers, missing blank lines and the rest of the common rules. Each finding has the rule id, the line, a message, the expected value and a hint that says how to fix it.

  • Your agent’s cue: it is about to hand over a Markdown document and the task says “well-formed”, “valid” or “passes the checks”.
  • You’ll reach for it when documents written by several agents and people need to meet the same bar before they are merged or published.

You are building a publishing tool in Base44 where an agent writes long articles with tables. Before an article goes live, a backend function sends it to MarkdownScribe. The response lists what is structurally off, table style included, with the line of each finding; the tool shows them next to the editor. Run format first and most findings disappear; lint points at what is left.

Your coding agent gets a finding for rule MD004 at line 6: the list there uses * while the first list in the document uses -. The hint says exactly that: use the same marker as the first list, and detail names the expected one. The agent applies the fix without reading a rule page, and the next call returns valid: true.

A CI step runs mdscribe lint docs/. With findings, it exits with code 8 and the build fails; the findings go to the log with file, line and rule. Teams that want a softer gate run mdscribe format --write first and then block only on the rule ids they care about, reading them from the JSON.

  • Findings an agent can act on. Each one has rule, line, column when it applies, message, detail with the expected value, and a hint written as an instruction.
  • The same rules everywhere. The rule set is fixed on our side, so a document linted from a browser-based editor, from a coding agent and from CI gets the same findings.
  • A yes/no plus a count. valid and summary.total are enough for a gate; the list is there when you need the detail.
Terminal window
curl https://api.markdownscribe.com/v1/md/lint \
-H "X-API-Key: $MDSCRIBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"markdown":"# Release notes\n\n- Faster builds\n- Smaller images\n\n* Bug fixes\n\n### Known issues\n\nNone yet.\n"}'
import { MarkdownScribeClient } from "@markdownscribe/sdk";
const client = new MarkdownScribeClient({ apiKey: process.env.MDSCRIBE_API_KEY! });
const result = await client.lint({
markdown: "# Release notes\n\n- Faster builds\n- Smaller images\n\n* Bug fixes\n\n### Known issues\n\nNone yet.\n",
});

Save the markdown value above as release-notes.md, then:

Terminal window
mdscribe lint release-notes.md

Exits with code 8 when there are findings, so a CI step fails on them.

Captured from the API on 2026-10-23.

{
"valid": false,
"findings": [
{
"rule": "MD004",
"name": "ul-style",
"line": 6,
"message": "Unordered list style",
"doc_url": "https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md004.md",
"column": 1,
"detail": "Expected: dash; Actual: asterisk",
"hint": "Use the same list marker (-, * or +) as the first list in this document; 'detail' names the expected one."
},
{
"rule": "MD001",
"name": "heading-increment",
"line": 8,
"message": "Heading levels should only increment by one level at a time",
"doc_url": "https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md001.md",
"detail": "Expected: h2; Actual: h3",
"hint": "Use the next heading level down (one more '#') instead of skipping levels."
}
],
"summary": {
"total": 2
},
"meta": {
"request_id": "01M5MY6N7KTR01E1Y05V1CVSTD",
"duration_ms": 8,
"credits": 2
}
}

2 credits per call. Each response says what it cost in the X-Credits-Charged header. Error responses are never charged.

  • Input: markdown, up to 1,048,576 characters.
  • Output: valid is true when there are no findings. findings is empty then, and summary.total is 0. A document with findings is still a successful call and is charged.
Error When
validation markdown is missing or the body is not valid JSON.
payload_too_large The document is longer than 1,048,576 characters.
unauthorized, insufficient_credits, rate_limited The key, the balance or the per-minute limit, as on every operation.

Alternatives, and when MarkdownScribe is worth it

Section titled “Alternatives, and when MarkdownScribe is worth it”

Checked on 2026-10-23 against the tool’s own documentation.

  • markdownlint-cli2. npx markdownlint-cli2 "**/*.md" "#node_modules" lints a folder in a terminal and exits non-zero on findings (github.com/DavidAnson/markdownlint-cli2). Use MarkdownScribe when your agent runs where there is no terminal (the Lovable or Base44 editor), when you want the findings as JSON with a fix-it hint on each one, or when you want format, lint, table of contents and frontmatter from one key with one error format and one bill.