Skip to main content
Glama

analyze_json_xml_validator

JSON/XML Validator — Check that text is valid JSON or XML and tidy its layout. It answers valid true or false, and a document that is not valid is still an answer, not a failed step, so the steps after it run either way. To stop a workflow on a bad document, add an If/Else step that checks {{step_N.valid}} equals true, where N is this step's number. Then, on each step that should run only for a valid document, set Run when to true and add the If/Else step's number to its Depends On. This step passes no file on, so a step after it that needs the document must take its file from the step before this one. [category: analyze]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoA JSON or XML file to check — this is how a previous step hands its output over. Up to 1 MB. Send this or the text below; a file wins if both arrive.
textNoUp to 1 MB of valid UTF-8. Nesting deeper than 256 levels is refused rather than followed, because following it exhausts the server's stack.
formatNoLeave it on automatic and the format is read from the text itself.auto

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / text / x-ui / multiline
      Added value: +true
  2. Changed1 schema field changed
    • addedInput schema / properties / text / x-ui
      Added value: +{
      +  "unset_label": "Uses the attached file instead"
      +}
  3. Changed2 schema fields changed
    • addedInput schema / x-passes-no-file
      Added value: +true
    • addedInput schema / x-require-one-of
      Added value: +[
      +  [
      +    "file"
      +  ],
      +  [
      +    "text"
      +  ]
      +]
  4. Changed2 schema fields changed
    • addedInput schema / properties / file
      Added value: +{
      +  "description": "A JSON or XML file to check — this is how a previous step hands its output over. Up to 1 MB. Send this or the text below; a file wins if both arrive.",
      +  "format": "binary",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "text"
      -]New value: +[]
  5. Added

TDQS

A4.4/5.0
Behavior5/5

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

The description discloses key behaviors beyond annotations: it returns valid true/false, a non-valid document is not a failed step, and the step passes no file onward. These are concrete operational details not covered by readOnlyHint=false or destructiveHint=false, and there is no annotation contradiction.

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

Conciseness4/5

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

The purpose is front-loaded and every sentence carries operational value. The If/Else recipe is somewhat long but directly relevant to correct use; it could be tightened slightly but contains no filler.

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

Completeness5/5

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

For a 3-parameter tool with full schema coverage and no output schema, the description explains result semantics, workflow continuation, stop conditions, and the file-passing limitation. An agent has enough to select and invoke the tool correctly.

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 the file/text/format parameters are already fully documented. The description adds workflow context like 'passes no file on', but it does not add parameter-level semantics beyond what the schema provides.

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

Purpose5/5

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

The description opens with 'JSON/XML Validator — Check that text is valid JSON or XML and tidy its layout', which states a specific verb, resource, and outcome. It clearly distinguishes this validation/formatting tool from other analyze_* siblings.

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

Usage Guidelines4/5

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

The description gives strong workflow guidance: invalid input is still an answer, and it explains exactly how to use an If/Else step with {{step_N.valid}} to stop a workflow. It does not name alternative tools or explicit when-not cases, but the tool's purpose is sufficiently unique among siblings.

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.

Resources