validate_markdown
Pre-validate markdown to catch malformed tables, unclosed code fences, and broken task lists before conversion, returning a safety status and detected features.
Instructions
Pre-flight markdown validation BEFORE conversion. Catches malformed tables (mismatched pipes), unclosed code fences, broken task lists, and unsupported syntax. Returns a green/amber/red status plus the detected markdown features.
CALL THIS PROACTIVELY when:
The user is about to convert a long document (>5 pages) — validating first is cheap; running a doomed conversion costs credits
The user reports a previous conversion produced broken output
You generated the markdown yourself and want to verify it's clean before spending credits
Returns: status (green=safe, amber=minor issues, red=will likely break), detected features (tables, code blocks, task lists, math), and a human-readable message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Markdown content to validate | |
| filename | No | Optional filename label for the response (defaults to 'content.md') |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | No | Filename label echoed back | |
| status | Yes | Validation verdict | |
| message | Yes | Human-readable explanation of any issues | |
| inputFormat | No | Detected markdown flavour (e.g. gfm, commonmark) | |
| additionalPandocFlags | No | Pandoc flags that will be applied | |
| detectedFeatures | No | Map of markdown features found in the content |