Skip to main content
Glama

ScorpTech x402 Tools

Json Schema Infer

json_schema_infer
Read-onlyIdempotent

Infer a JSON Schema (draft 2020-12) from one JSON document or many samples: types (integer vs number), nested objects and arrays, required keys (present in every sample), nullable fields, string formats (date-time, date, email, uri, uuid, ipv4/6) and optionally enums and numeric bounds. Turns API responses into a contract for validation or tool definitions. POST JSON body. Returns JSON with: samples, schema. Price: $0.003 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/json-schema-infer

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_infer"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonNoOne JSON document
enumsNoEmit enum for low-cardinality repeated strings
titleNo
boundsNoEmit minimum/maximum for numbers
samplesNoSeveral sample documents of the same shape (better required/nullable detection)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare this is a read-only, idempotent, non-destructive, open-world operation, so the bar is lower. The description still adds genuinely useful behavior beyond them: transport ('POST JSON body'), a parallel HTTPS endpoint, the return payload ('samples, schema'), and a per-call price with payment rails (x402, Base or Solana). It omits failure modes (e.g. malformed JSON, oversized docs) which keeps it from a 5.

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 core capability is front-loaded in one dense sentence, followed by a use case and the operational tail. Every sentence carries information, though the pricing and URL tail slightly dilutes the front-loading of the primary contract.

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?

There is no output schema, yet the description names the return keys ('samples, schema'), the transport, the payment cost, and an alternative endpoint. For a stateless pure-transform tool that is everything an agent needs to invoke it 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 80%, so the baseline is 3. The description does clarify the semantic payoff of `samples` ('better required/nullable detection') and that `enums`/`bounds` are optional outputs, but most of this is already present in the property descriptions, so it adds little net meaning.

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 a specific verb+resource: 'Infer a JSON Schema (draft 2020-12) from one JSON document or many samples', and enumerates exactly what gets inferred (integer vs number, required keys, nullable fields, formats, enums, bounds). That is enough for an agent to separate it from siblings such as schema_validate or json_canonicalize without opening a 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?

It gives a clear use context: 'Turns API responses into a contract for validation or tool definitions', and the samples parameter's parenthetical notes when multiple samples are preferable. It does not name a sibling alternative or state an explicit when-not, so it stops short of full routing guidance.

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