{"uid":"cap_GDAqLr1t98PvKkwR0jxPF","slug":"json-boolean-coerce-a3d0a892","name":"JSON Boolean Coerce","description":"JSON Boolean Coerce: JSON Boolean Coerce coerces explicit boolean tokens while reporting rejected values from bounded caller-supplied values without an external provider. Call JSON Boolean 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 Boolean Coerce as versioned deterministic JSON. Price: $0.001 USDC via x…","url":"https://api.delx.ai/api/v1/x402/json-boolean-coerce","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"values":{"type":"array","items":{"type":"string","maxLength":8192},"maxItems":256,"description":"Values supplied to JSON Boolean Coerce; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"values":[true,false,true],"rejected":["bad"]},"schema":"delx/util-json-boolean-coerce/v1","status":"advisory","evidence":{"retained":false,"input_sha256":"b0d8a970d8b95be459de90bd542fe2e952d9487c3b0d629f128cb547e47f6fa2","external_calls":0},"operation":"data_batch:json_boolean_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_hq6axcWBsN1WJy19RVN8L","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 string values into JSON booleans, reporting normalized results and rejected values with counts and a versioned result contract","exampleAgentPrompt":"Coerce these string values into proper JSON booleans for me and tell me which ones get rejected: ['true', 'yes', '1', 'false', 'no', 'maybe', '0', 'True', 'FALSE', 'nope'].","exampleUseCases":[{"title":"Sanitize form boolean fields before API call","prompt":"I have these raw form values that should be booleans before I send them to a strict downstream API — can you coerce them and flag anything that can't be converted? Values are: ['true', 'False', 'YES', 'nope', '1', '0', 'enabled']."},{"title":"Validate CSV boolean column for data pipeline","prompt":"I'm ingesting a CSV and the boolean column has messy values like ['True', 'false', 'N/A', 'yes', 'no', '', '1']. Can you run a boolean coercion on these and give me the normalized values plus a count of how many were rejected?"},{"title":"Normalize agent plan flags before tool handoff","prompt":"Before I hand this batch plan to the next tool, I need to make sure all these flag values are proper JSON booleans — coerce ['on', 'off', 'true', 'TRUE', 'false', '2', 'yes', 'maybe'] and tell me which ones fail."}],"resultDescription":"Returns a versioned deterministic JSON object containing normalized boolean values for each coercible input, a list of rejected values that could not be coerced, counts of accepted and rejected items, and a versioned result contract identifier.","failureModes":["Empty values array returns empty normalized output with zero counts","Values exceeding 8192 characters each are rejected or truncated","More than 256 values in a single call exceeds the maxItems limit and is rejected","Ambiguous tokens that are neither clearly truthy nor falsy are reported as rejected rather than coerced","Malformed request body returns a 4xx error"],"whenToPreferThis":"Use this endpoint when an agent needs to normalize boolean-like strings (e.g. 'yes', '1', 'True', 'on') into strict JSON booleans before handing structured data to a downstream tool with a strict schema contract. Prefer this over ad-hoc boolean parsing when you need a versioned, auditable result with explicit rejection reporting and counts — particularly useful in data pipelines, batch plan validation, or before calling APIs that do not accept truthy string equivalents.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:06:26.482Z","isFirstParty":false}