{"uid":"cap_kRzmNK8ihXGrUOlkMjQHH","slug":"pennyrail-number-clamp-limit-number-to-range-136edb4f","name":"PennyRail Number Clamp – Limit Number to Range","description":"Machine-readable settlement service","url":"https://pennyrail.vercel.app/api/p/nano/number.clamp--limit-number-range?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["input"],"properties":{"input":{"type":"object"}}},"responseSchema":{"type":"object","additionalProperties":true},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_NpPfdm46yU9cSaEUrV0kv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Clamps a numeric value to a specified minimum/maximum range, returning the bounded result","exampleAgentPrompt":"Clamp the number 150 so it stays within the range of 0 to 100 — I need to make sure this value doesn't go out of bounds.","exampleUseCases":[{"title":"Clamping user input score","prompt":"I have a user-submitted score of -5 and I need it clamped to between 0 and 10 — can you make sure it fits within that valid range?"},{"title":"Constraining sensor reading","prompt":"My temperature sensor returned 210 but the valid display range is 0 to 100, can you clamp it so I can render it on the gauge?"},{"title":"Bounding pagination offset","prompt":"A page offset value came in as 9999 but I need it constrained between 0 and 500 — please clamp it to that range."}],"resultDescription":"Returns a JSON object containing the clamped numeric value, which equals the input number if it falls within the range, the minimum if the input is below it, or the maximum if the input exceeds it.","failureModes":["Missing required 'input' field returns a validation error","Non-numeric values in input may cause computation failure","Min greater than max may produce undefined or error behavior","Payment failure (402) if USDC balance insufficient","Malformed JSON body returns 400 error"],"whenToPreferThis":"Use this endpoint when you need a simple, paid micro-service to clamp a number to a range without running your own compute, or when integrating into an x402 payment-gated workflow where all utility functions are sourced from the PennyRail ecosystem. Prefer local computation if latency or cost is a concern for high-frequency calls.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-22T06:56:13.760Z","isFirstParty":false,"canonicalSlug":"pennyrail-number-clamp-limit-number-to-range-136edb4f"}