Skip to main content
Glama

validate_json

validate_json
Read-only

Deterministic JSON-Schema subset validator. Catches malformed JSON before it breaks a pipeline. Supports: type, required, properties, items, minLength, maxLength, pattern, enum, minimum, maximum, additionalProperties. No external dependencies. $0.003 USDC per successful call (x402, client-paid); failed calls are not charged.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly/non-destructive/closed-world, yet the description adds genuinely non-obvious context: deterministic behavior, no external dependencies, and the x402 pricing model where successful calls cost $0.003 USDC and failed calls are free. The remaining gap is whether schema-invalid JSON counts as a "failed call" (waived) or a successful-but-negative result (charged) — that ambiguity matters for cost-sensitive agents.

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?

Front-loaded with the core statement, then the supported-keyword list, then operational facts. Every sentence carries information; the keyword enumeration is long but directly actionable. Slight density cost from cramming four facts into a run-on sequence.

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

Completeness3/5

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

No output schema exists, so the description should say what a call returns — a boolean plus collected errors, a JSON-Pointer error list, or a thrown exception. That return-shape information is entirely absent, which for a validator is the main thing an agent needs to consume the result.

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

Parameters4/5

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

With zero declared parameters, the schema-description baseline is 4, and the description does not regress from it. It does, however, leave unresolved how the JSON document and the schema itself are supplied, given the empty input object.

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: validates JSON against a documented JSON-Schema subset, and enumerates exactly which keywords are supported. This makes it distinguishable from generic siblings such as `validate` or `normalize` by scope, though it never explicitly names the alternative.

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?

"Catches malformed JSON before it breaks a pipeline" implies the usage context (pre-flight checks), but there is no explicit when-to-use/when-not guidance and no mention of the sibling `validate` tool that presumably covers other validation needs. The agent must infer routing.

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.