{"uid":"cap__VObe-cMIj18Mv5J-ltY5","slug":"delx-parse-float-safe-f6a568c3","name":"Delx Parse Float Safe","description":"Parse float with default on failure. Call when you need fail-soft float parsing for agent inputs. Returns value and ok for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.","url":"https://api.delx.ai/api/v1/x402/parse-float-safe","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Input field: text."},"default":{"type":"integer","description":"Input field: default."}}},"responseSchema":{"type":"json","example":{"ok":true,"value":12.5,"schema":"delx/util-parse-float-safe/v1"}},"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_wjH7FM0ZMbCChCFAu50hw","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":"Parses a string as a floating-point number, returning a default integer value on failure instead of throwing an error","exampleAgentPrompt":"Try to parse '3.14abc' as a float, and if it fails use 0 as the default value.","exampleUseCases":[{"title":"Parsing user-entered price input","prompt":"The user typed '12.5x' as a price — try to parse it as a float and fall back to 0 if it's not valid."},{"title":"Extracting numeric sensor reading","prompt":"Parse this sensor string '---' as a float with a default of -1 so the pipeline doesn't crash if the reading is missing."},{"title":"Processing agent form field numbers","prompt":"I've got a form field that came back as '7.89' — parse it as a float with a default of 0 in case it's ever blank or garbage."}],"resultDescription":"Returns a JSON object with a numeric 'value' field (the parsed float if successful, or the caller-supplied default integer if parsing fails) and an 'ok' boolean indicating whether parsing succeeded.","failureModes":["If 'text' is missing or empty, likely returns the default value with ok=false","If 'default' is omitted, behavior may be undefined or return an error","Non-string 'text' fields may cause a 400 validation error","Network timeouts or payment failures (x402) return no result","Extremely large or special float strings (Infinity, NaN) may or may not parse as ok=true depending on implementation"],"whenToPreferThis":"Choose this endpoint when you need guaranteed fail-safe float parsing in an agent pipeline where malformed, missing, or user-supplied numeric strings are expected and crashing is unacceptable. Prefer it over native language parsing when you want a remote, stateless, auditable utility with a consistent JSON contract and no language-specific exception handling.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:02:52.319Z","isFirstParty":false}