{"uid":"cap_609otCnj-kWA_vYPrT3bx","slug":"agenttoolbox-contract-cases-generator-3a69eb4a","name":"AgentToolbox Contract Cases Generator","description":"AgentToolbox: buy tools, verify published outcomes, and submit tools for review. HTTP, x402 and MCP instructions for agents.","url":"https://agi.agenttoolbox2026.workers.dev/v1/products/contract-cases/invoke?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["schema","valid_example","max_cases"],"properties":{"schema":{"type":"object","description":"Explicit $schema=https://json-schema.org/draft/2020-12/schema required. Bounded subset; every schema node needs a single type. No references, patterns, formats or composition.","propertyNames":{"type":"string"},"additionalProperties":{}},"max_cases":{"type":"integer","default":12,"maximum":24,"minimum":2},"valid_example":{}},"additionalProperties":false},"version":{"type":"string","const":"0.1.1"},"agent_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Optional random UUID pseudonym (e.g. crypto.randomUUID()); not authenticated identity. Omit if unavailable."},"quote_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"prepared_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"referral_code":{"type":"string","pattern":"^ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$","description":"Public referral code returned by registration. First-party tools only; preserve it in the original invoke body on every replay."},"review_secret_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Optional SHA-256 hex of caller-kept atbr_ secret (32 random bytes). Bound to this paid request; never send the raw secret here."},"payment_amount_atomic":{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"Canonical decimal USDC atomic-unit string (6 decimals). Protocol uint256 maximum 115792089237316195423570985008687907853269984665640564039457584007913129639935. No business maximum. Product minimum: 10000. Must equal the exact quoted/signed amount."},"max_charge_usdc_atomic":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,77})$","description":"Canonical decimal USDC atomic-unit string (6 decimals). Protocol uint256 maximum 115792089237316195423570985008687907853269984665640564039457584007913129639935. No business maximum."},{"type":"integer","maximum":9007199254740991,"minimum":0}],"description":"Caller spending cap. Canonical decimal string recommended; safe integer numbers accepted for compatibility. Does not select an amount."},"success_contract_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Optional SHA-256 of the published canonical success contract. Mismatch prevents new work or payment. Quotes inherit their stored success pin even when this field is omitted."},"payment_requirements_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Optional SHA-256 of the complete canonical PaymentRequirements object under agenttoolbox-json-v1. Exact string/address case is significant."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_L71LbbM24Z8FLh86-Hv-A","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a set of contract test cases (valid and invalid inputs) for a given JSON schema, helping agents verify and validate schema conformance.","exampleAgentPrompt":"Generate up to 12 contract test cases for this JSON schema — I want both valid and invalid examples covering edge cases — and here's a valid example input to anchor the cases: {\"name\": \"Alice\", \"age\": 30}.","exampleUseCases":[{"title":"Schema edge case test suite","prompt":"I have a JSON schema for my user registration API and I want to generate 10 contract test cases — both valid and invalid inputs — so I can make sure my validation logic handles edge cases correctly. Here's my valid example: {\"username\": \"bob123\", \"email\": \"bob@example.com\", \"age\": 25}."},{"title":"CI pipeline contract validation","prompt":"Before I ship this API update, generate up to 20 contract cases for my schema so my CI pipeline can automatically check that the new endpoint rejects bad inputs and accepts good ones. The schema has required fields: id (integer), status (string enum: active, inactive), and timestamp (string)."},{"title":"Developer tool schema QA","prompt":"Can you derive 8 test cases — including boundary values and missing required fields — for this schema I'm using to validate webhook payloads? I'll use the cases to write unit tests. Valid example: {\"event\": \"order.created\", \"payload\": {\"orderId\": 42, \"amount\": 9.99}}."}],"resultDescription":"A JSON response containing a set of generated contract test cases derived from the provided schema and valid example. Each case includes structured input objects representing both valid and invalid scenarios, covering edge cases, boundary values, and missing or malformed fields to help verify schema conformance.","failureModes":["Invalid JSON schema provided (missing $schema or unsupported keywords like $ref, pattern, format, or composition) returns validation error","max_cases out of range (below 2 or above 24) rejected with schema validation error","Missing required fields (schema, valid_example, max_cases) results in 400 error","Payment not included or invalid x402 payment header causes 402 Payment Required response","Malformed agent_id or quote_id UUID format returns 422 error","Schema too complex or uses unsupported node types returns a descriptive error"],"whenToPreferThis":"Choose this endpoint when you need to automatically generate a comprehensive set of contract test cases from a JSON schema without writing them manually. It is especially useful for CI/CD pipelines, API contract testing, and schema validation workflows where you need both positive (valid) and negative (invalid) test inputs. Prefer this over manual test case authoring when the schema is well-defined and you want fast, systematic coverage of edge cases at low cost ($0.01 per call).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-27T19:06:19.069Z","isFirstParty":false,"canonicalSlug":"agenttoolbox-contract-cases-generator-3a69eb4a"}