{"uid":"cap_-KKzGvrpn79i_e87wdJhE","slug":"agentutility-dice-roll-0b7b6e77","name":"AgentUtility Dice Roll","description":"Rolls dice from standard dice notation for tabletop RPGs. Evaluates XdY, flat modifiers (+/-), and keep-highest / keep-lowest (4d6kh3 for stat rolls, 2d20kh1 / 2d20kl1 for advantage/disadvantage). Returns each individual die, which were kept vs dropped, the per-roll total, and the grand total; roll the whole expression up to 100 times with 'rolls'. Pass 'seed' for reproducible output. Use it as a dice roller API, dice notation evaluator, or tabletop random roll engine.","url":"https://x402.agentutility.ai/dice-roll","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":["notation"],"properties":{"seed":{"type":"number","description":"Optional integer seed for reproducible rolls."},"rolls":{"type":"number","description":"How many times to evaluate the whole expression. 1-100, default 1."},"notation":{"type":"string","description":"Dice notation: 1d20, 3d6+2, 4d6kh3 (keep highest 3), 2d20kl1 (keep lowest 1)."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"range":{"type":"object","properties":{"max":{"type":"integer"},"min":{"type":"integer"}}},"rolls":{"type":"array","items":{"type":"object","properties":{"dice":{"type":"array","items":{"type":"integer"}},"kept":{"type":"array","items":{"type":"integer"}},"total":{"type":"integer"},"dropped":{"type":"array","items":{"type":"integer"}},"modifier":{"type":"integer"}}}},"parsed":{"type":"object","properties":{"keep":{"type":"object","properties":{"n":{"type":"integer"},"mode":{"type":"string"}}},"count":{"type":"integer"},"sides":{"type":"integer"},"modifier":{"type":"integer"}}},"notation":{"type":"string"},"grand_total":{"type":"integer"}}}}}}},"responseSchema":{"type":"json","example":{"range":{"max":18,"min":3},"rolls":[{"dice":[4,3,6,5],"kept":[4,6,5],"total":15,"dropped":[3],"modifier":0}],"parsed":{"keep":{"n":3,"mode":"h"},"count":4,"sides":6,"modifier":0},"notation":"4d6kh3","grand_total":15}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Clt1933kTJCNsCqJwJWBE","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Evaluates standard dice notation expressions (XdY, modifiers, keep-highest/lowest) and returns detailed per-die results, totals, and optional reproducible seeded rolls.","exampleAgentPrompt":"Roll 4d6kh3 six times for my D&D character's ability scores — I want to see each individual die result and which ones were kept.","exampleUseCases":[{"title":"D&D character stat generation","prompt":"Roll 4d6kh3 six times so I can generate all six ability scores for my new D&D character — show me which dice were kept and dropped for each roll."},{"title":"Advantage and disadvantage rolls","prompt":"I need to make an attack roll with advantage — roll 2d20kh1 and also roll 2d20kl1 for a disadvantage check, so I can see both outcomes."},{"title":"Reproducible session dice rolls","prompt":"Roll 3d6+2 ten times using seed 42 so our whole group gets the same results for tonight's encounter — I want the total for each roll."}],"resultDescription":"Returns a structured JSON object containing the parsed notation, an array of roll results (each with individual dice values, kept dice, dropped dice, modifier, and per-roll total), the grand total across all rolls, and the possible min/max range of the expression.","failureModes":["Invalid dice notation string returns a parse error","rolls count outside 1-100 range returns a validation error","Malformed request body returns HTTP 400","Non-integer seed values may cause unexpected behavior","Network timeout on rare occasions"],"whenToPreferThis":"Choose this endpoint when you need server-side, auditable dice rolling with full transparency into individual die results, keep/drop mechanics, and optional seeded reproducibility — especially for tabletop RPG use cases requiring standard dice notation like XdY, kh/kl modifiers, and flat +/- modifiers. Prefer this over client-side random number generation when reproducibility or auditability matters.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:51:13.966Z","isFirstParty":false}