Lint a DESIGN.md file with the official linter
lint_design_mdLints one DESIGN.md file with the official @google/design.md 0.4.0 linter, the same check as npx @google/design.md lint DESIGN.md. Best for: checking a DESIGN.md file the user pasted before it goes to a coding agent. Pass the whole file contents in text, including the YAML front matter between the --- lines; a file path or URL will not work, so ask the user to paste the file. Returns: each finding with its severity, rule and token path (broken token references, low text contrast, missing primary color, unused colors, section order, unknown keys), the error, warning and note counts, the sections found and the token counts. The file is valid when it has no errors. Front matter that is not valid YAML comes back as a finding, not an error. Do not use for: comparing two versions (use diff_design_md) or reading a website (use extract_design_md).
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "---\nname: Probe\ncolors:\n primary: \"#1a73e8\"\n---\n"
},
"name": "lint_design_md"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The whole DESIGN.md file contents, up to 60000 characters: the YAML front matter between --- lines, then the ## sections. Not a file path or URL. Example: "--- name: Paper colors: primary: "#1D1D1B" --- ## Overview ..." |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | Yes | True when there are no errors, which is when `npx @google/design.md lint` exits 0 | |
| counts | Yes | ||
| linter | Yes | ||
| summary | Yes | ||
| findings | Yes | ||
| sections | Yes | The ## section headings found, in order | |
| tokenCounts | Yes |