{
  "id": "record-profile",
  "name": "Record field observations",
  "description": "Profile caller-selected JSON Pointer fields across up to 500 records: missing/null/type counts, typed distinct values, numeric bounds/median, UTF-16 string lengths and bounded duplicate-row evidence. Observations only; no inferred schema guarantee or population extrapolation.",
  "category": "data-assurance",
  "priceUsd": "0.005",
  "pricingStatus": "proposed-unverified",
  "pricing": {
    "unit": "one successful operation call",
    "proposedNominalUsd": "0.005",
    "sixDecimalTokenBaseUnits": "5000",
    "subscription": false,
    "includesPayerWalletOrNetworkFees": false,
    "liveQuoteVerified": false,
    "condition": "Actual SDK challenge is authoritative only within the caller's explicit authorization; configured six-decimal token peg is an operator assertion, not a conversion guarantee."
  },
  "intents": [
    "profile missing null fields in JSON records",
    "inspect dataset types cardinality duplicates before validation",
    "measure field completeness and mixed types"
  ],
  "whenToUse": [
    "profile missing null fields in JSON records",
    "inspect dataset types cardinality duplicates before validation",
    "measure field completeness and mixed types"
  ],
  "whenNotToUse": [
    "Infer a guaranteed schema or population distribution",
    "Fuzzy entity matching or CSV file comparison"
  ],
  "capabilities": [
    "JSON Pointer field observations",
    "missing/null separation",
    "typed structural cardinality",
    "duplicate evidence",
    "numeric median"
  ],
  "related": [
    "record-constraints",
    "record-relations"
  ],
  "limits": {
    "inputBytes": 100000,
    "outputBytes": 400000,
    "jsonNodes": 12000,
    "depth": 20,
    "evidence": 200,
    "keyWorkBytes": 3000000,
    "matchingSteps": 2000000,
    "records": 500,
    "fields": 32,
    "duplicateGroupsPerField": 5
  },
  "errorCodes": [
    "INPUT_LIMIT",
    "OUTPUT_LIMIT",
    "COMPLEXITY_LIMIT",
    "UNSAFE_KEY",
    "INVALID_NUMBER",
    "INVALID_POINTER",
    "DUPLICATE_ID",
    "DUPLICATE_FIELD",
    "INVALID_RULE",
    "KEY_WORK_LIMIT",
    "LABEL_LIMIT",
    "UNJUDGED_DOCUMENT",
    "INVALID_SPAN",
    "DUPLICATE_SPAN",
    "INVALID_UNICODE",
    "MATCHING_LIMIT",
    "INVALID_CADENCE",
    "INVALID_INTERVAL",
    "NUMERIC_OVERFLOW"
  ],
  "requirementsProfile": {
    "format": "declared-requirements-v1",
    "facts": {
      "execution.suppliedCode": false,
      "execution.remoteMutation": false,
      "execution.llmInference": false,
      "execution.paidMcp": false,
      "verification.semanticTruth": false,
      "verification.sourceAuthenticity": false,
      "verification.liveVulnerabilities": false,
      "numbers.arbitraryPrecisionJson": false,
      "numbers.model": "ieee754-binary64",
      "privacy.requestBodyPersisted": false,
      "execution.deterministic": true,
      "execution.networkAccess": false,
      "privacy.resultBodyPersisted": false,
      "payment.x402": true,
      "payment.mpp": true,
      "operation.id": "record-profile",
      "operation.category": "data-assurance",
      "limit.httpRequestBytes": 131072,
      "limit.requestBytes": 100000,
      "limit.responseBytes": 524288,
      "limit.resultBytes": 400000,
      "limit.jsonDepth": 20,
      "limit.jsonNodes": 12000,
      "input.records.maxItems": 500,
      "input.fields.maxItems": 32,
      "input.fields.minItems": 1
    },
    "unknownPolicy": "Undeclared requirements are unknown, never compatible. Matching declared facts does not establish semantic fit or input validity.",
    "preflight": "/preflight"
  },
  "documentation": "/reference/tools/record-profile.md",
  "serviceContract": "/reference/services/record-profile.json",
  "errors": [
    {
      "status": 400,
      "meaning": "Malformed JSON, missing/invalid idempotency key, or payment identifier mismatch",
      "retry": "Correct the request before payment"
    },
    {
      "status": 402,
      "meaning": "Payment challenge or rejected payment",
      "retry": "Use official protocol SDK; inspect payment outcome before another payment"
    },
    {
      "status": 409,
      "meaning": "Idempotency conflict, duplicate proof, or PAYMENT_UNCERTAIN",
      "retry": "Keep original key, body, and proof; reconcile uncertainty with operator; never blindly repay"
    },
    {
      "status": 413,
      "meaning": "Input or generated output too large",
      "retry": "Reduce input; no payment attempted for validation failure"
    },
    {
      "status": 415,
      "meaning": "Unsupported media type or compression",
      "retry": "Send uncompressed application/json"
    },
    {
      "status": 422,
      "meaning": "Schema or service-specific semantic validation failure",
      "retry": "Correct input using returned error code; no payment attempted"
    },
    {
      "status": 429,
      "meaning": "Request/payment-attempt rate exceeded",
      "retry": "Wait for rate limit window; preserve existing payment identity"
    },
    {
      "status": 503,
      "meaning": "Payment configuration/provider/state unavailable, or live DNS preparation failed before settlement",
      "retry": "Check readiness; DNS preparation failures may retry the identical key/body/credential only; uncertainty requires reconciliation"
    }
  ],
  "numericPrecision": "JavaScript IEEE-754 numbers; use strings for large integer IDs/exact decimals where the schema accepts strings. No lossless numeric parsing.",
  "paymentWorkflow": {
    "discoveryOnly": false,
    "supportedProtocols": [
      "x402",
      "mpp"
    ],
    "x402": {
      "credentialHeader": "PAYMENT-SIGNATURE",
      "challengeHeader": "PAYMENT-REQUIRED",
      "receiptHeader": "PAYMENT-RESPONSE",
      "version": 2,
      "scheme": "exact",
      "paymentIdentifier": "payment-identifier extension MUST equal the HTTP Idempotency-Key",
      "sdk": "@x402/core with @x402/evm"
    },
    "mpp": {
      "supported": true,
      "credentialHeader": "Authorization",
      "challengeHeader": "WWW-Authenticate",
      "receiptHeader": "Payment-Receipt",
      "method": "tempo",
      "intent": "charge",
      "sdk": "mppx",
      "tokenDecimals": 6
    },
    "steps": [
      "Check configured readiness and the exact service schema",
      "Generate a fresh random Idempotency-Key for this operation; never use a discovery probe fixture for purchases",
      "Send valid input without a credential to obtain the official protocol challenge",
      "Use the official SDK and authorized wallet to fulfill the challenge",
      "Retry only with identical key, body, protocol and credential",
      "On PAYMENT_UNCERTAIN stop and request operator reconciliation; never blindly pay again"
    ],
    "versionedRetries": "Request fingerprint includes service release version. Retries across a version upgrade can conflict; coordinate upgrades outside the 24-hour replay window and reconcile pending attempts.",
    "docs": "/llms.txt"
  },
  "method": "POST",
  "paths": {
    "x402": "/v1/x402/record-profile",
    "mpp": "/v1/mpp/record-profile"
  },
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "records": {
        "maxItems": 500,
        "type": "array",
        "items": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      },
      "fields": {
        "minItems": 1,
        "maxItems": 32,
        "type": "array",
        "items": {
          "type": "string",
          "maxLength": 512,
          "description": "RFC 6901 JSON string pointer; empty string selects the row root. URI fragments and unsafe property names are rejected."
        }
      }
    },
    "required": [
      "records",
      "fields"
    ],
    "additionalProperties": false,
    "$defs": {
      "__schema0": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          },
          {
            "type": "null"
          },
          {
            "type": "array",
            "items": {
              "$ref": "#/$defs/__schema0"
            }
          },
          {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "$ref": "#/$defs/__schema0"
            }
          }
        ]
      }
    }
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "operation",
      "version",
      "result",
      "provenance"
    ],
    "properties": {
      "operation": {
        "const": "record-profile",
        "type": "string"
      },
      "version": {
        "const": "0.29.0",
        "type": "string"
      },
      "result": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "profile": {
            "type": "string",
            "const": "record-observations-v1"
          },
          "rowCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "presentCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "missingCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "nullCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "distinctCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "typeCounts": {
                  "type": "object",
                  "properties": {
                    "null": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "boolean": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "number": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "string": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "array": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "object": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "null",
                    "boolean",
                    "number",
                    "string",
                    "array",
                    "object"
                  ],
                  "additionalProperties": false
                },
                "numeric": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "min": {
                          "type": "number"
                        },
                        "max": {
                          "type": "number"
                        },
                        "median": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "count",
                        "min",
                        "max",
                        "median"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "stringLengthsUtf16": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "min": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "max": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "count",
                        "min",
                        "max"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "duplicateGroups": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "firstRowIndex": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "count": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "rowIndices": {
                        "type": "array",
                        "items": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "rowIndicesTruncated": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "firstRowIndex",
                      "count",
                      "rowIndices",
                      "rowIndicesTruncated"
                    ],
                    "additionalProperties": false
                  }
                },
                "duplicateGroupCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "duplicateGroupsTruncated": {
                  "type": "boolean"
                }
              },
              "required": [
                "path",
                "presentCount",
                "missingCount",
                "nullCount",
                "distinctCount",
                "typeCounts",
                "numeric",
                "stringLengthsUtf16",
                "duplicateGroups",
                "duplicateGroupCount",
                "duplicateGroupsTruncated"
              ],
              "additionalProperties": false
            }
          },
          "caveats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "profile",
          "rowCount",
          "fields",
          "caveats"
        ],
        "additionalProperties": false
      },
      "provenance": {
        "type": "object",
        "required": [
          "inputSha256",
          "outputSha256",
          "deterministic",
          "externalRequests"
        ],
        "properties": {
          "inputSha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "outputSha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "deterministic": {
            "const": true
          },
          "externalRequests": {
            "const": 0
          }
        }
      }
    },
    "additionalProperties": false
  },
  "exampleInput": {
    "records": [
      {
        "id": "a",
        "price": 12,
        "status": "ready"
      },
      {
        "id": "b",
        "price": null,
        "status": "ready"
      },
      {
        "id": "c",
        "status": "new"
      }
    ],
    "fields": [
      "/price",
      "/status"
    ]
  },
  "exampleResponse": {
    "operation": "record-profile",
    "version": "0.29.0",
    "result": {
      "profile": "record-observations-v1",
      "rowCount": 3,
      "fields": [
        {
          "path": "/price",
          "presentCount": 2,
          "missingCount": 1,
          "nullCount": 1,
          "distinctCount": 2,
          "typeCounts": {
            "null": 1,
            "boolean": 0,
            "number": 1,
            "string": 0,
            "array": 0,
            "object": 0
          },
          "numeric": {
            "count": 1,
            "min": 12,
            "max": 12,
            "median": 12
          },
          "stringLengthsUtf16": null,
          "duplicateGroups": [],
          "duplicateGroupCount": 0,
          "duplicateGroupsTruncated": false
        },
        {
          "path": "/status",
          "presentCount": 3,
          "missingCount": 0,
          "nullCount": 0,
          "distinctCount": 2,
          "typeCounts": {
            "null": 0,
            "boolean": 0,
            "number": 0,
            "string": 3,
            "array": 0,
            "object": 0
          },
          "numeric": null,
          "stringLengthsUtf16": {
            "count": 3,
            "min": 3,
            "max": 5
          },
          "duplicateGroups": [
            {
              "firstRowIndex": 0,
              "count": 2,
              "rowIndices": [
                0,
                1
              ],
              "rowIndicesTruncated": false
            }
          ],
          "duplicateGroupCount": 1,
          "duplicateGroupsTruncated": false
        }
      ],
      "caveats": [
        "Observations describe only supplied rows, not a schema guarantee or population estimate.",
        "Distinct values use typed structural JSON equality with object keys sorted; missing is separate from null. Numbers are already-parsed IEEE-754 values."
      ]
    },
    "provenance": {
      "inputSha256": "7a3a2676a5c8b31f529bfb018adf6ce45a687787779349029dcae02ef5215fe9",
      "outputSha256": "8135f48756dbce1bac61c230404690ca325e61c434d49d3b36c95903d7c4342d",
      "deterministic": true,
      "externalRequests": 0
    }
  },
  "requiredHeaders": {
    "Content-Type": "application/json",
    "Idempotency-Key": "random 16–128 character operation identifier"
  },
  "fixedExample": "/reference/examples/record-profile.json",
  "execution": {
    "deterministic": true,
    "externalRequests": 0,
    "maxExternalRequests": 0,
    "resultSnapshotPersisted": false,
    "fixedExampleIsIllustrativeSnapshot": false,
    "requiresPayment": true,
    "supportsMcpExecution": false
  },
  "releaseSnapshot": {
    "format": "static-release-reference-v1",
    "sourceVersion": "0.29.0",
    "sourceRegistrySha256": "a2b5ec09bf6c38b9d2879d746a4fded374f5928b445377b0270ef6aa8e6cac65",
    "generatedAt": "2026-10-06T15:38:00Z",
    "releaseAcceptance": "not-verified-by-generator",
    "runtimeReadiness": "not-evaluated",
    "livePaymentsVerified": false,
    "indexingVerified": false,
    "apiOrigin": null,
    "notice": "Build-time release reference. Runtime readiness, deployment, payment settlement and external indexing are not evaluated here. Prices are proposed; this file cannot authorize execution or payment."
  }
}
