Skip to main content
Glama

Lordevo Shop (x402 website checks)

JSON Schema 2020-12 inferred from sample JSON ($0.002/call)

json_schema_infer
Read-onlyIdempotent

$0.002 per call (x402, USDC on Base; free trial: add "trial": true or use try_free). [Data utilities] Infers a JSON Schema (2020-12) from 1-1,000 sample documents: types with null and integer vs number, properties, required (keys present in every sample), array items, string formats (date-time, date, email, uri, uuid, ipv4, ipv6) when every value matches, optional enums and strict mode. Input: json (one document or an array of samples; POST for large input), optional samples, enums, strict. Limits: 1 MB, depth 64. Pair with json-validate. Offline.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "json": "<json>"
    },
    "name": "json_schema_infer"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonYesJSON text, up to 1 MB (a JSON value is also accepted in a POST body or MCP arguments)
enumsNoyes: add enum for string fields with at most 10 distinct values, each seen at least twice (default no)no
trialNoOptional. true = free if a trial call is left (3 per IP per UTC day), else the payment terms.
strictNoyes: additionalProperties false on every object (default no)no
samplesNoauto (default): a top-level array of objects is a list of samples; yes: the top-level array is a list of samples; no: the whole input is one sampleauto

Output Schema

NameRequiredDescriptionDefault
toolNo
cacheNo
notesNo
statsNo
_trialNoPresent when the call was a free trial call.
schemaNo
providerNo
price_usdNo
sample_countNo
samples_modeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / trial / description
      Previous value: -"Optional. true = answer free if a trial call is left (3 per IP per UTC day); otherwise you get the payment terms."New value: +"Optional. true = free if a trial call is left (3 per IP per UTC day), else the payment terms."
  2. Changed2 schema fields changed
    • addedInput schema / properties / trial
      Added value: +{
      +  "description": "Optional. true = answer free if a trial call is left (3 per IP per UTC day); otherwise you get the payment terms.",
      +  "type": "boolean"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "anyOf": [
      +    {
      +      "required": [
      +        "tool",
      +        "schema",
      +        "sample_count"
      +      ]
      +    },
      +    {
      +      "properties": {
      +        "accepts": {
      +          "type": "array"
      +        },
      +        "error": {
      +          "type": "string"
      +        },
      +        "resource": {
      +          "type": "object"
      +        },
      +        "x402Version": {
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "x402Version",
      +        "accepts"
      +      ]
      +    },
      +    {
      +      "properties": {
      +        "charged": {
      +          "type": "boolean"
      +        },
      +        "error": {
      +          "type": "string"
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "error"
      +      ]
      +    }
      +  ],
      +  "properties": {
      +    "_trial": {
      +      "description": "Present when the call was a free trial call.",
      +      "type": "object"
      +    },
      +    "cache": {
      +      "type": "object"
      +    },
      +    "notes": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "price_usd": {
      +      "type": "number"
      +    },
      +    "provider": {
      +      "type": "string"
      +    },
      +    "sample_count": {
      +      "type": "integer"
      +    },
      +    "samples_mode": {
      +      "enum": [
      +        "array_of_samples",
      +        "single_document"
      +      ],
      +      "type": "string"
      +    },
      +    "schema": {
      +      "type": "object"
      +    },
      +    "stats": {
      +      "type": "object"
      +    },
      +    "tool": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already carry safety (readOnly, idempotent, non-destructive, closed-world), and the description adds genuinely useful constraints the annotations do not: 1 MB input cap, depth 64, offline execution, 1-1,000 sample count, and the pricing/trial model. It does not describe failure behavior on malformed JSON, but the added operational context is substantial.

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?

Dense but well-structured: capability first, then inputs, then limits and pairing. The only structural flaw is leading with the per-call price and trial mechanics before the tool's purpose, which front-loads billing ahead of task fitness.

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, return values need not be explained, and the description covers inputs, caps, dialect, strictness/enum options, and sibling pairing. Only edge-case handling (invalid JSON, partial inference) is left implicit, which is minor for this tool.

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 every parameter (json, enums, strict, samples, trial) is already documented at the field level; the baseline is 3. The description repeats those names and contributes only marginal extra meaning (sample-count range, "POST for large input"), so it does not clearly exceed the baseline.

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?

States a specific verb+resource+artifact: "Infers a JSON Schema (2020-12) from 1-1,000 sample documents," plus the exact dialect and inference rules. An agent can tell this apart from json_validate, json_query, and json_repair without opening the schema.

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?

Gives clear intended context by naming the companion step ("Pair with json-validate") and the sample-count/scenario framing. It stops short of explicit when-not guidance against the other JSON siblings (json_repair, json_query), so it is good but not fully exclusionary.

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