Skip to main content
Glama

util_json_schema

Read-only

JSON Schema from a sample — Turn a sample JSON document into a JSON Schema (draft 2020-12) offline: types (integer vs number), nested objects, merged array item shapes, required keys (only those present in every sample object), and string formats (date, date-time, email, uri, uuid, ipv4). Use it to validate API payloads, write tool definitions or document a response. Price: $0.002 USDC (Base, via x402).

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": "util_json_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonYesa sample JSON document (URL-encoded), e.g. an object with id 7, email a@b.co and tags [x]
titleNooptional schema title
formatsNotrue (default) | false
requiredNoall (default) | none

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true and destructiveHint=false, so the safety profile is covered. The description adds genuinely new context: the operation is offline, inference is sample-driven ('required keys only those present in every sample object'), and each call costs $0.002 USDC via x402 — a payment requirement worth flagging. It does not say what happens with malformed or non-URL-encoded input or what the response body looks like, so it adds partial behavioral context beyond annotations.

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 transformation, then the inference details, then use cases, then pricing. It is dense but every clause carries information; the parenthetical enumeration is long but each item is a distinct capability.

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?

For a four-parameter, read-only transform with no output schema and full schema coverage, the description supplies the transformation rules, the schema draft version, use cases and cost. The main remaining gap is what the returned schema value looks like (string vs object) and failure behavior, which are minor for a deterministic utility.

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 coverage is 100%, so the parameters are already documented. The description reinforces the required-key detection semantics and format detection (date, date-time, email, uri, uuid, ipv4), but it does not clarify the meaning of the 'all'/'none' values for the `required` parameter or the 'true/false' string form of `formats`, which are the least self-explanatory parts of the schema.

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 and resource ('Turn a sample JSON document into a JSON Schema'), names the exact output standard (draft 2020-12), and enumerates what is inferred (integer vs number, nested objects, merged array item shapes, required keys, string formats). No sibling tool does this, so an agent can identify it immediately.

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 concrete use cases ('validate API payloads, write tool definitions or document a response') that tell the agent when this tool is appropriate. It stops short of naming alternatives or stating when not to use it, which keeps it below a 5.

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