llm_format_check
Validate that an LLM output matches an expected format: JSON, Markdown, code block, bullet list, numbered list, table, YAML, XML, or custom regex. Essential for structured output testing.
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": {
"output": "a: 1\nb: [1, 2]",
"expected_format": "yaml"
},
"name": "llm_format_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output | Yes | The LLM output to validate | |
| regex_pattern | No | Custom regex pattern (only when expected_format is "regex") | |
| expected_format | Yes | Expected format |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| valid | No | ||
| checks | No | ||
| failed | No | ||
| passed | No | ||
| total_checks | No | ||
| expected_format | No |