Skip to main content
Glama

IA-QA — 152 QA & Dev Tools for AI Agents

llm_format_check

Read-onlyIdempotent

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.

Input Schema

NameRequiredDescriptionDefault
outputYesThe LLM output to validate
regex_patternNoCustom regex pattern (only when expected_format is "regex")
expected_formatYesExpected format

Output Schema

NameRequiredDescriptionDefault
validNo
checksNo
failedNo
passedNo
total_checksNo
expected_formatNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "expected_format": "yaml",
      +    "output": "a: 1\nb: [1, 2]"
      +  }
      +]
  2. Changed1 schema field changed
    • addedOutput schema / properties
      Added value: +{
      +  "checks": {},
      +  "expected_format": {},
      +  "failed": {},
      +  "passed": {},
      +  "total_checks": {
      +    "type": "number"
      +  },
      +  "valid": {
      +    "type": "boolean"
      +  }
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  4. First observed

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and closed-world, so safety behavior is covered. The description adds the meaningful behavioral detail that validation covers nine distinct format families, but says nothing about strictness, what a failure result looks like, or how partial/malformed matches are treated beyond what the output schema presumably conveys.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler, with the core action front-loaded and the format enumeration carrying real information rather than padding. Nothing could be removed without losing content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and full parameter coverage, the description only needs to establish scope, which it does. The one gap is sibling disambiguation among the several other LLM-output validators, which matters in this crowded toolset.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all three parameters are already documented, and the top-level example demonstrates usage. The description's format list mirrors the expected_format enum without adding semantics for regex_pattern (e.g., anchoring, flags) that the schema does not already give, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Validate that an LLM output matches an expected format') and enumerates the supported formats, so an agent knows exactly what it checks. It does not differentiate itself from nearby siblings like llm_output_validator, llm_json_schema_check, or function_call_validate, which an agent could easily confuse it with.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Essential for structured output testing' implies the usage context but never states when to pick this over llm_output_validator or llm_json_schema_check, nor any exclusions. The scenario is inferable but the routing decision is left to the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.