{"uid":"cap_I-DWS6LS8Lvsu4l-kek3m","slug":"agenttoolbox-contract-case-generator-6a0cafc3","name":"AgentToolbox Contract Case Generator","description":"Useful tools for agents. Small requests. Concrete results.","url":"https://agnttoolbx.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.0"},"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)$"},"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)$"},"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."}}},"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_SS3T2xvWyONA-EvyEJp0Q","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) from a JSON Schema plus a valid example, for use in API/schema testing workflows.","exampleAgentPrompt":"Generate up to 12 contract test cases for this JSON Schema — include both valid and edge-case invalid inputs — using this valid example object: {\"name\": \"Alice\", \"age\": 30, \"email\": \"alice@example.com\"}, and a schema that requires name (string), age (integer, min 0), and email (string).","exampleUseCases":[{"title":"Schema regression suite for a new API","prompt":"I've got a new API endpoint that accepts a user profile object with required fields: id (integer), username (string, minLength 3), and role (enum: admin, viewer, editor). Here's a valid example: {\"id\": 1, \"username\": \"bob\", \"role\": \"admin\"}. Can you generate 20 contract test cases covering valid inputs and boundary violations?"},{"title":"CI test fixtures for a payment request schema","prompt":"I need test fixtures for our payment schema — it requires amount (number, min 0.01), currency (string, exactly 3 chars), and recipient_id (string). Valid example: {\"amount\": 9.99, \"currency\": \"USD\", \"recipient_id\": \"usr_123\"}. Generate 15 contract cases including invalid ones so I can wire them into our CI pipeline."},{"title":"Fuzzing edge cases for an agent tool input","prompt":"Can you generate 10 contract cases for a tool schema that takes a query (string, maxLength 200) and a max_results (integer, 1–50)? Valid example is {\"query\": \"find flights\", \"max_results\": 10}. I want to find edge cases that might break my parser."}],"resultDescription":"A JSON response containing a collection of contract test cases derived from the provided schema and valid example. Each case likely includes the input object and a label indicating whether it is expected to be valid or invalid, along with information about which schema constraint it targets or violates. The number of cases is bounded by max_cases (2–24, default 12).","failureModes":["Schema includes unsupported features (references, patterns, formats, composition) — rejected with a validation error","Schema nodes missing explicit single 'type' — rejected as malformed","max_cases out of range (below 2 or above 24) — rejected","valid_example does not match the provided schema — may result in an error or degenerate cases","Payment amount does not match quoted amount — payment rejected","Missing required fields (schema, valid_example, max_cases) — request rejected"],"whenToPreferThis":"Choose this endpoint when you need a quick, paid-per-call service to automatically generate structured contract test cases from a JSON Schema without writing them manually. It is well-suited for CI pipelines, agent tool testing, and schema regression suites where you have a known valid example and want both positive and negative cases enumerated rapidly. Prefer it over manual case authoring or LLM prompting when you want deterministic, schema-grounded outputs at low cost ($0.01/call).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-14T00:30:27.695Z","isFirstParty":false,"canonicalSlug":"agenttoolbox-contract-case-generator-6a0cafc3"}