{"uid":"cap_gZFkVwaHjTEWlb21hZLze","slug":"json-number-coerce-877ae97e","name":"JSON Number Coerce","description":"JSON Number Coerce: JSON Number Coerce coerces explicit numeric strings while reporting rejected values from bounded caller-supplied values without an external provider. Call JSON Number Coerce before an agent hands structured data or a batch plan to a downstream tool with a stricter contract. Returns the bounded transformation or validation finding with counts, normalized values, and a versioned result contract for JSON Number Coerce as versioned deterministic JSON. Price: $0.001 USDC via x402…","url":"https://api.delx.ai/api/v1/x402/json-number-coerce?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"values":{"type":"array","items":{"type":"string","maxLength":8192},"maxItems":256,"description":"Values supplied to JSON Number Coerce; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"values":[1,2.5],"rejected":["bad"]},"schema":"delx/util-json-number-coerce/v1","status":"advisory","evidence":{"retained":false,"input_sha256":"b08932be9b3a6478f77ce565e226057d6faaec761236079792dd3b4913f103be","external_calls":0},"operation":"data_batch:json_number_coerce"}},"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_PfLVBbhVbpm9r-JbG3tru","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":"Coerces an array of string values into numeric types, reporting normalized values and rejected entries with counts in a versioned deterministic result contract.","exampleAgentPrompt":"Take these string values — ['123', '45.6', 'abc', '7', 'N/A', '0.01'] — and coerce them into numbers, then tell me which ones were rejected and how many came through successfully.","exampleUseCases":[{"title":"Pre-flight data cleaning for strict tool","prompt":"Before I send this batch of price strings to the trading engine, coerce them all to numbers and flag any that can't be parsed — the values are ['100.5', '200', 'N/A', '350.00', 'pending', '99.9']."},{"title":"Agent output validation before downstream handoff","prompt":"My agent just produced a list of quantity strings from a user's order form: ['1', '2', 'two', '10', '', '5']. Can you coerce them into numbers and give me a count of how many were valid vs rejected?"},{"title":"Cleaning scraped numeric data","prompt":"I scraped these values from a webpage and they're all strings: ['$42.00', '3.14', 'n/a', '0', '1,200', '88.5']. Try to coerce them to proper numbers and tell me which ones failed."}],"resultDescription":"A versioned deterministic JSON object containing normalized numeric values for successfully coerced inputs, a list of rejected values that could not be parsed, counts of accepted and rejected entries, and a versioned result contract identifier.","failureModes":["Empty values array returns zero counts with no normalized values","All values are non-numeric strings — result contains full rejection list and zero normalized values","Array exceeds 256-item limit — request rejected with validation error","Individual string exceeds 8192 character limit — offending item rejected or request fails","Malformed request body — HTTP 4xx error returned"],"whenToPreferThis":"Use this endpoint when an agent or pipeline needs to convert a batch of caller-supplied string values into proper numeric types before handing them to a downstream tool with a strict JSON schema. It is especially useful when the source data is untrustworthy or mixed (e.g. scraped, user-entered, or agent-generated), and you need explicit counts of valid vs rejected values plus a normalized output list — all in a versioned, deterministic contract suitable for audit or retry logic.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T06:50:08.774Z","isFirstParty":false,"canonicalSlug":"json-number-coerce-877ae97e"}