Skip to main content
Glama

data-api-code

json_schema_validate_and_mock

Validate a JSON instance against a JSON Schema (required fields, types, enums, min/max) OR generate deterministic mock JSON matching the schema.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "json_schema_validate_and_mock"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataNo
textNo
schemaNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It usefully discloses that mocks are deterministic and enumerates which schema keywords are enforced, but never explains how mode selection works (there is no mode parameter in the schema), what happens on validation failure, or how errors are surfaced.

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?

One tight sentence with the primary action front-loaded and the alternate mode placed after it. No filler, though the parenthetical keyword list crowds out more important information such as mode selection.

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

Completeness2/5

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

A dual-mode tool with three undocumented parameters, no annotations, and no output schema needs considerably more explanation than this. The critical unknowns — how the two modes are triggered and which parameter carries the instance versus the schema — are left entirely unaddressed.

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

Parameters2/5

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

Schema description coverage is 0% and the three parameters are opaque, with 'data' typed as an unconstrained object and 'text' as a bare string. The description mentions a JSON instance and a JSON Schema but does not map either to a specific parameter, nor explain what 'text' is for or how it relates to 'data'.

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 specific verbs and resources: validating a JSON instance against a JSON Schema, or generating mock JSON from a schema, and even names the constraint classes checked (required fields, types, enums, min/max). It does not explicitly differentiate itself from near-siblings such as openapi_mock_generate, so it falls short of a 5.

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

Usage Guidelines2/5

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

The 'OR' hints at two modes, but there is no guidance on when to pick validation versus mocking, no prerequisites, no error-handling expectations, and no reference to an alternative tool. An agent must guess the operating mode.

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