{"uid":"cap_o5-jgjooLwZ9zVhZCkE9k","slug":"pennyrail-number-clamp-c41e61c1","name":"PennyRail number.clamp","description":"Machine-readable settlement service","url":"https://pennyrail.vercel.app/api/f/number.clamp","method":"POST","headers":{},"bodySchema":{"type":"object","required":["input"],"properties":{"input":{"type":"object","description":"{value,min,max}"}}},"responseSchema":{"type":"object","required":["operation","result"],"properties":{"result":{},"operation":{"type":"string"}},"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_e0InxAdq1nZsffzpy0Sif","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 between a minimum and maximum bound, returning the constrained result","exampleAgentPrompt":"Clamp the value 150 so it stays between 0 and 100 using PennyRail's number.clamp.","exampleUseCases":[{"title":"Sanitize sensor reading to valid range","prompt":"I have a temperature sensor that returned 212 degrees but valid readings should be between -50 and 150 — clamp it to that range for me."},{"title":"Cap user score to leaderboard bounds","prompt":"A player's score came in at -30 but scores must be between 0 and 1000 — can you clamp that value so it's within the valid range?"},{"title":"Normalize slider input for UI component","prompt":"My UI slider value is 1.8 but the allowed range is 0.0 to 1.0 — clamp 1.8 between 0 and 1 so I can use it safely."}],"resultDescription":"Returns a JSON object with an 'operation' string (e.g. 'number.clamp') and a 'result' field containing the clamped numeric value — the input value constrained to the [min, max] range.","failureModes":["Missing required 'input' object returns a validation error","Missing value, min, or max fields inside input may cause unexpected behavior or error","Non-numeric values passed as value/min/max may cause computation failure","min greater than max may produce undefined or erroneous results","Network timeout or Vercel cold-start latency on first invocation"],"whenToPreferThis":"Choose this endpoint when you need a simple, pay-per-call hosted math utility to clamp a number without spinning up your own compute. Useful in agent pipelines where arithmetic helpers need to be composable microservices, or when you want auditable on-chain micropayment settlement per computation call via the x402 protocol.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:48:54.569Z","isFirstParty":false}