Skip to main content
Glama

JSON Field Validation

object_contract_check
Read-onlyIdempotent

Discover deterministic top-level JSON field validation for API payloads, automation and AI-agent handoffs. The value must be an object; schema.required finds absent fields, schema.properties..type finds primitive type mismatches, and additionalProperties=false reports unknown fields. Prefer this for new simple contracts and use json_schema_check for nested or recursive constraints. This free MCP discovery call does not execute the advertised capability and does not charge; it returns the exact x402 endpoint, price and payment guide for execution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYesJSON object to check.
schemaYesTop-level contract definition. Only required, properties.<field>.type, and additionalProperties=false are evaluated.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
priceYes
methodYesHTTP method for paid execution.
endpointYesCanonical absolute ARN HTTP URL to POST the same tool arguments to for paid execution.
protocolYesPayment protocol required by the HTTP execution endpoint.
instructionYesHow to execute the capability after receiving the payment requirement.
paymentGuideYesPublic setup guide with a working x402 v2 Base-mainnet client example.
paymentRequiredYesAlways true for paid ARN capabilities exposed over MCP.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedOutput schema / properties / endpoint / description
      Previous value: -"ARN HTTP path to POST the same tool arguments to for paid execution."New value: +"Canonical absolute ARN HTTP URL to POST the same tool arguments to for paid execution."
    • addedOutput schema / properties / endpoint / format
      Added value: +"uri"
    • addedOutput schema / properties / method
      Added value: +{
      +  "const": "POST",
      +  "description": "HTTP method for paid execution.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "paymentRequired",
      -  "protocol",
      -  "endpoint",
      -  "price",
      -  "paymentGuide",
      -  "instruction"
      -]New value: +[
      +  "paymentRequired",
      +  "protocol",
      +  "method",
      +  "endpoint",
      +  "price",
      +  "paymentGuide",
      +  "instruction"
      +]
  2. Changed1 schema field changed
    • changedInput schema / description
      Previous value: -"Input for a fast top-level object-shape contract check."New value: +"Input for fast JSON field validation against a top-level object contract."
  3. Changed7 schema fields changed
    • changedInput schema / properties / schema / properties / properties / description
      Previous value: -"Top-level field definitions."New value: +"Up to 1,000 top-level field definitions."
    • addedInput schema / properties / schema / properties / properties / maxProperties
      Added value: +1000
    • addedInput schema / properties / schema / properties / properties / propertyNames
      Added value: +{
      +  "maxLength": 256,
      +  "minLength": 1
      +}
    • changedInput schema / properties / schema / properties / required / description
      Previous value: -"Top-level field names that must be present in value."New value: +"Up to 1,000 unique top-level field names that must be present in value."
    • addedInput schema / properties / schema / properties / required / items / maxLength
      Added value: +256
    • addedInput schema / properties / schema / properties / required / items / minLength
      Added value: +1
    • addedInput schema / properties / schema / properties / required / maxItems
      Added value: +1000
  4. Changed2 schema fields changed
    • addedOutput schema / properties / paymentGuide
      Added value: +{
      +  "description": "Public setup guide with a working x402 v2 Base-mainnet client example.",
      +  "format": "uri",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "paymentRequired",
      -  "protocol",
      -  "endpoint",
      -  "price",
      -  "instruction"
      -]New value: +[
      +  "paymentRequired",
      +  "protocol",
      +  "endpoint",
      +  "price",
      +  "paymentGuide",
      +  "instruction"
      +]
  5. Changed3 schema fields changed
    • changedInput schema / properties / schema / properties / additionalProperties / description
      Previous value: -"Set false to report top-level fields not declared in properties. Omitted or true allows them."New value: +"Set false to report top-level fields not declared in properties."
    • removedInput schema / properties / schema / properties / properties / additionalProperties / properties / type / description
      Removed value: -"Expected JSON type for this top-level field."
    • changedInput schema / properties / schema / properties / properties / description
      Previous value: -"Top-level field definitions. Each field may declare a JSON type; other JSON Schema keywords are ignored."New value: +"Top-level field definitions."
  6. Changed7 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / description
      Added value: +"Input for a fast top-level object-shape contract check."
    • addedInput schema / properties / schema / additionalProperties
      Added value: +true
    • addedInput schema / properties / schema / description
      Added value: +"Top-level contract definition. Only required, properties.<field>.type, and additionalProperties=false are evaluated."
    • addedInput schema / properties / schema / properties
      Added value: +{
      +  "additionalProperties": {
      +    "description": "Set false to report top-level fields not declared in properties. Omitted or true allows them.",
      +    "type": "boolean"
      +  },
      +  "properties": {
      +    "additionalProperties": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "type": {
      +          "description": "Expected JSON type for this top-level field.",
      +          "enum": [
      +            "null",
      +            "array",
      +            "object",
      +            "string",
      +            "number",
      +            "boolean"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "description": "Top-level field definitions. Each field may declare a JSON type; other JSON Schema keywords are ignored.",
      +    "type": "object"
      +  },
      +  "required": {
      +    "description": "Top-level field names that must be present in value.",
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array",
      +    "uniqueItems": true
      +  }
      +}
    • addedInput schema / properties / value / description
      Added value: +"JSON object to check."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "description": "MCP payment instruction. Calling the MCP tool itself does not charge or execute the paid operation.",
      +  "properties": {
      +    "endpoint": {
      +      "description": "ARN HTTP path to POST the same tool arguments to for paid execution.",
      +      "type": "string"
      +    },
      +    "instruction": {
      +      "description": "How to execute the capability after receiving the payment requirement.",
      +      "type": "string"
      +    },
      +    "paymentRequired": {
      +      "const": true,
      +      "description": "Always true for paid ARN capabilities exposed over MCP.",
      +      "type": "boolean"
      +    },
      +    "price": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "amount": {
      +          "description": "Atomic asset amount.",
      +          "type": "string"
      +        },
      +        "asset": {
      +          "description": "Settlement asset.",
      +          "type": "string"
      +        },
      +        "display": {
      +          "description": "Human-readable current price.",
      +          "type": "string"
      +        },
      +        "network": {
      +          "description": "CAIP-2 settlement network identifier.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "amount",
      +        "asset",
      +        "network",
      +        "display"
      +      ],
      +      "type": "object"
      +    },
      +    "protocol": {
      +      "const": "x402",
      +      "description": "Payment protocol required by the HTTP execution endpoint.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "paymentRequired",
      +    "protocol",
      +    "endpoint",
      +    "price",
      +    "instruction"
      +  ],
      +  "type": "object"
      +}
  7. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover read/idempotent/destructive hints, but the description adds critical context beyond them: this is a discovery call that does NOT execute the advertised capability, does not charge, and returns the exact x402 endpoint, price and payment guide. That overturns the natural assumption that calling this validates a payload, which is exactly the kind of behavioral disclosure that prevents misuse.

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?

Three sentences, all front-loaded and purposeful: purpose, mechanics, alternative, then the payment/discovery caveat. Slightly dense but no filler; minor tightening possible around the discovery sentence.

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?

With an output schema present, return values need not be explained. The description covers scope, evaluation limits, sibling routing, and the discovery/payment model — everything an agent needs to call it correctly.

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?

Schema coverage is 100%, so baseline is 3, but the description maps each schema element to its behavioral effect (required finds absent fields, properties.<field>.type finds primitive type mismatches, additionalProperties=false reports unknown fields). That adds semantic meaning beyond the raw schema definitions, though it does not cover edge cases like type coercion or duplicate handling.

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 ('deterministic top-level JSON field validation') and immediately scopes it to what is actually evaluated. It distinguishes itself from the sibling json_schema_check by naming it explicitly. An agent can select this tool 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 Guidelines5/5

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

Gives an explicit routing rule: 'Prefer this for new simple contracts and use json_schema_check for nested or recursive constraints.' Names both the condition and the alternative, leaving nothing to inference.

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