{
  "id": "decimal-distribution-summarize",
  "name": "Summarize exact decimal observations",
  "description": "Compute exact reduced-rational descriptive statistics and R type-7 quantiles from supplied decimal strings. Explicit null/error-or-omit policy, empty and singleton results, exact population/sample variance. No square roots, weighting, units, uncertainty or population inference.",
  "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": [
    "Compute exact descriptive mean, variance, median and R7 percentiles from supplied decimal measurements",
    "Summarize decimal observations with explicit missing-value omission evidence"
  ],
  "whenToUse": [
    "Compute exact descriptive mean, variance, median and R7 percentiles from supplied decimal measurements",
    "Summarize decimal observations with explicit missing-value omission evidence"
  ],
  "whenNotToUse": [
    "Significance testing, confidence intervals, population estimates, verified measurements, standard deviation or automatic missing-value imputation",
    "Network calls, external actions, supplied-evidence authenticity or factual correctness certification"
  ],
  "capabilities": [
    "Exact decimal strings up to 24 integer and 18 fraction digits, reduced rational results",
    "R type-7 interpolation only; probability order retained and numerical duplicates reject",
    "Missing indexes explicit; empty observations return zero sum and null other statistics",
    "Networkless bounded computation; advisoryOnly=true; externalRequests=0"
  ],
  "limits": {
    "inputBytes": 100000,
    "outputBytes": 400000,
    "jsonNodes": 12000,
    "depth": 20,
    "values": 1000,
    "quantiles": 21,
    "decimalIntegerDigits": 24,
    "decimalFractionDigits": 18,
    "rationalDigits": 2048,
    "arithmeticWorkSteps": 100000,
    "quantileMethod": "R7"
  },
  "errorCodes": [
    "INPUT_LIMIT",
    "OUTPUT_LIMIT",
    "COMPLEXITY_LIMIT",
    "INVALID_NUMBER",
    "INVALID_UNICODE",
    "UNSAFE_KEY",
    "MISSING_VALUE",
    "INVALID_PROBABILITY",
    "DUPLICATE_PROBABILITY",
    "NUMERIC_COMPLEXITY"
  ],
  "related": [
    "localized-number-parse",
    "records-aggregate",
    "numeric-rounding-check"
  ],
  "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": "decimal-distribution-summarize",
      "operation.category": "data-assurance",
      "limit.httpRequestBytes": 131072,
      "limit.requestBytes": 100000,
      "limit.responseBytes": 524288,
      "limit.resultBytes": 400000,
      "limit.jsonDepth": 20,
      "limit.jsonNodes": 12000,
      "decimalSummary.profile": "exact-decimal-r7-summary-v1",
      "decimalSummary.maxValues": 1000,
      "decimalSummary.maxQuantiles": 21,
      "decimalSummary.maxIntegerDigits": 24,
      "decimalSummary.maxFractionDigits": 18,
      "decimalSummary.maxRationalDigits": 2048,
      "decimalSummary.maxWorkSteps": 100000,
      "decimalSummary.quantileMethod": "R7",
      "decimalSummary.missingnessExplicit": true,
      "decimalSummary.binaryFloatArithmetic": false,
      "decimalSummary.standardDeviation": false,
      "decimalSummary.populationInference": false,
      "decimalSummary.measurementValidityVerified": false,
      "input.values.maxItems": 1000,
      "input.quantiles.maxItems": 21
    },
    "unknownPolicy": "Undeclared requirements are unknown, never compatible. Matching declared facts does not establish semantic fit or input validity.",
    "preflight": "/preflight"
  },
  "documentation": "/reference/tools/decimal-distribution-summarize.md",
  "serviceContract": "/reference/services/decimal-distribution-summarize.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/decimal-distribution-summarize",
    "mpp": "/v1/mpp/decimal-distribution-summarize"
  },
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "values": {
        "maxItems": 1000,
        "type": "array",
        "items": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 44,
              "pattern": "^-?(?:0|[1-9]\\d{0,23})(?:\\.\\d{1,18})?$"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "missing": {
        "type": "string",
        "enum": [
          "error",
          "omit"
        ]
      },
      "quantiles": {
        "maxItems": 21,
        "type": "array",
        "items": {
          "type": "string",
          "maxLength": 43,
          "pattern": "^(?:0|[1-9]\\d{0,23})(?:\\.\\d{1,18})?$"
        }
      }
    },
    "required": [
      "values",
      "missing",
      "quantiles"
    ],
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "operation",
      "version",
      "result",
      "provenance"
    ],
    "properties": {
      "operation": {
        "const": "decimal-distribution-summarize",
        "type": "string"
      },
      "version": {
        "const": "0.29.0",
        "type": "string"
      },
      "result": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "advisoryOnly": {
            "type": "boolean",
            "const": true
          },
          "externalRequests": {
            "type": "number",
            "const": 0
          },
          "profile": {
            "type": "string",
            "const": "exact-decimal-r7-summary-v1"
          },
          "status": {
            "type": "string",
            "enum": [
              "summarized",
              "empty"
            ]
          },
          "inputCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "observedCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "missingCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "omittedIndexes": {
            "maxItems": 1000,
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "sum": {
            "type": "object",
            "properties": {
              "numerator": {
                "type": "string",
                "maxLength": 2049,
                "pattern": "^-?(?:0|[1-9]\\d*)$"
              },
              "denominator": {
                "type": "string",
                "maxLength": 2048,
                "pattern": "^[1-9]\\d*$"
              }
            },
            "required": [
              "numerator",
              "denominator"
            ],
            "additionalProperties": false
          },
          "min": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "numerator": {
                    "type": "string",
                    "maxLength": 2049,
                    "pattern": "^-?(?:0|[1-9]\\d*)$"
                  },
                  "denominator": {
                    "type": "string",
                    "maxLength": 2048,
                    "pattern": "^[1-9]\\d*$"
                  }
                },
                "required": [
                  "numerator",
                  "denominator"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "max": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "numerator": {
                    "type": "string",
                    "maxLength": 2049,
                    "pattern": "^-?(?:0|[1-9]\\d*)$"
                  },
                  "denominator": {
                    "type": "string",
                    "maxLength": 2048,
                    "pattern": "^[1-9]\\d*$"
                  }
                },
                "required": [
                  "numerator",
                  "denominator"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "mean": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "numerator": {
                    "type": "string",
                    "maxLength": 2049,
                    "pattern": "^-?(?:0|[1-9]\\d*)$"
                  },
                  "denominator": {
                    "type": "string",
                    "maxLength": 2048,
                    "pattern": "^[1-9]\\d*$"
                  }
                },
                "required": [
                  "numerator",
                  "denominator"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "median": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "numerator": {
                    "type": "string",
                    "maxLength": 2049,
                    "pattern": "^-?(?:0|[1-9]\\d*)$"
                  },
                  "denominator": {
                    "type": "string",
                    "maxLength": 2048,
                    "pattern": "^[1-9]\\d*$"
                  }
                },
                "required": [
                  "numerator",
                  "denominator"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "populationVariance": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "numerator": {
                    "type": "string",
                    "maxLength": 2049,
                    "pattern": "^-?(?:0|[1-9]\\d*)$"
                  },
                  "denominator": {
                    "type": "string",
                    "maxLength": 2048,
                    "pattern": "^[1-9]\\d*$"
                  }
                },
                "required": [
                  "numerator",
                  "denominator"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "sampleVariance": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "numerator": {
                    "type": "string",
                    "maxLength": 2049,
                    "pattern": "^-?(?:0|[1-9]\\d*)$"
                  },
                  "denominator": {
                    "type": "string",
                    "maxLength": 2048,
                    "pattern": "^[1-9]\\d*$"
                  }
                },
                "required": [
                  "numerator",
                  "denominator"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "quantiles": {
            "maxItems": 21,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "probability": {
                  "type": "string",
                  "maxLength": 43
                },
                "value": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "numerator": {
                          "type": "string",
                          "maxLength": 2049,
                          "pattern": "^-?(?:0|[1-9]\\d*)$"
                        },
                        "denominator": {
                          "type": "string",
                          "maxLength": 2048,
                          "pattern": "^[1-9]\\d*$"
                        }
                      },
                      "required": [
                        "numerator",
                        "denominator"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "probability",
                "value"
              ],
              "additionalProperties": false
            }
          },
          "quantileMethod": {
            "type": "string",
            "const": "R7"
          },
          "populationInference": {
            "type": "boolean",
            "const": false
          }
        },
        "required": [
          "advisoryOnly",
          "externalRequests",
          "profile",
          "status",
          "inputCount",
          "observedCount",
          "missingCount",
          "omittedIndexes",
          "sum",
          "min",
          "max",
          "mean",
          "median",
          "populationVariance",
          "sampleVariance",
          "quantiles",
          "quantileMethod",
          "populationInference"
        ],
        "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": {
    "values": [
      "1.2",
      "2.4",
      "4.8",
      "7.2",
      null
    ],
    "missing": "omit",
    "quantiles": [
      "0.25"
    ]
  },
  "exampleResponse": {
    "operation": "decimal-distribution-summarize",
    "version": "0.29.0",
    "result": {
      "advisoryOnly": true,
      "externalRequests": 0,
      "profile": "exact-decimal-r7-summary-v1",
      "status": "summarized",
      "inputCount": 5,
      "observedCount": 4,
      "missingCount": 1,
      "omittedIndexes": [
        4
      ],
      "sum": {
        "numerator": "78",
        "denominator": "5"
      },
      "min": {
        "numerator": "6",
        "denominator": "5"
      },
      "max": {
        "numerator": "36",
        "denominator": "5"
      },
      "mean": {
        "numerator": "39",
        "denominator": "10"
      },
      "median": {
        "numerator": "18",
        "denominator": "5"
      },
      "populationVariance": {
        "numerator": "531",
        "denominator": "100"
      },
      "sampleVariance": {
        "numerator": "177",
        "denominator": "25"
      },
      "quantiles": [
        {
          "probability": "0.25",
          "value": {
            "numerator": "21",
            "denominator": "10"
          }
        }
      ],
      "quantileMethod": "R7",
      "populationInference": false
    },
    "provenance": {
      "inputSha256": "ba43b753b426000bc85f40d002986e7142da63e0e6543574b4175efdf716f060",
      "outputSha256": "446f17493b36b940a6b3bd24349ac063e1915aafda0117a8c72a76aea9460984",
      "deterministic": true,
      "externalRequests": 0
    }
  },
  "requiredHeaders": {
    "Content-Type": "application/json",
    "Idempotency-Key": "random 16–128 character operation identifier"
  },
  "fixedExample": "/reference/examples/decimal-distribution-summarize.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."
  }
}
