{"uid":"cap_0B9leZR2HSryTMy3yXgY7","slug":"brainiac-pagination-contract-check-fb708f28","name":"BRAINIAC Pagination Contract Check","description":"Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.","url":"https://www.brainiac.software/api/v1/agent-contracts/pagination-contract-check?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"openapi":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{}},"workflows":{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":160,"minLength":1},"steps":{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":160,"minLength":1},"operation":{"type":"string","maxLength":160},"description":{"type":"string","maxLength":4000}},"additionalProperties":false},"maxItems":30},"states":{"type":"array","items":{"type":"string","maxLength":80,"minLength":1},"maxItems":40},"description":{"type":"string","maxLength":8000},"transitions":{"type":"array","items":{"type":"object","required":["from","to"],"properties":{"on":{"type":"string","maxLength":200},"to":{"type":"string","maxLength":80,"minLength":1},"from":{"type":"string","maxLength":80,"minLength":1},"operation":{"type":"string","maxLength":160}},"additionalProperties":false},"maxItems":80}},"additionalProperties":false},"maxItems":12},"operations":{"type":"array","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":160,"minLength":1},"path":{"type":"string","maxLength":400},"steps":{"type":"array","items":{"type":"string","maxLength":200,"minLength":1},"maxItems":20},"method":{"type":"string","maxLength":16},"summary":{"type":"string","maxLength":1000},"examples":{"type":"array","items":{},"maxItems":8},"responses":{"type":"array","items":{"type":"object","properties":{"schema":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{}},"status":{"type":"string","maxLength":40},"example":{},"examples":{"type":"array","items":{},"maxItems":8},"description":{"type":"string","maxLength":4000}},"additionalProperties":false},"maxItems":20},"parameters":{"type":"array","items":{"type":"object","required":["name"],"properties":{"in":{"enum":["query","header","path","cookie","body"],"type":"string"},"name":{"type":"string","maxLength":120,"minLength":1},"schema":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{}},"required":{"type":"boolean"},"description":{"type":"string","maxLength":4000}},"additionalProperties":false},"maxItems":40},"description":{"type":"string","maxLength":8000},"outputSchema":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{}},"requestSchema":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{}}},"additionalProperties":false},"maxItems":40}}},"responseSchema":{"type":"json","example":{"score":48,"issues":[{"type":"missing_continuation","evidence":"cursor","location":"openapi.paths[/orders].get","severity":"high","description":"The contract describes a page or a cursor and does not name the response field that leads to the next page.","agent_impact":"An agent can stop after the first page or loop because it has no declared continuation field.","suggested_fix":"Name the response field, such as next_cursor, and the request field that receives it."},{"type":"unclear_cursor","evidence":"Page cursor.","location":"openapi.paths[/orders].get.parameters.cursor","severity":"medium","description":"A cursor parameter is named, and the text does not say whether it is opaque, how the first page is requested, or when it expires.","agent_impact":"An agent may parse the cursor, omit it incorrectly, or reuse it after it stops working.","suggested_fix":"Say to omit it for the first page, whether it is opaque, and whether it expires."},{"type":"unclear_termination","evidence":"list_orders","location":"openapi.paths[/orders].get","severity":"high","description":"The contract does not say how the agent knows the last page has been reached.","agent_impact":"An agent can keep requesting pages after the list has ended.","suggested_fix":"State the end condition, such as a null next cursor, has_more false, or an empty page."},{"type":"conflicting_pagination","evidence":"cursor, offset","location":"openapi.paths[/orders].get","severity":"medium","description":"Both a cursor and an offset or page parameter are declared, and the text does not say which one to follow.","agent_impact":"An agent can send both and skip or repeat records.","suggested_fix":"Tell the agent to use one continuation style and ignore the other."}],"success":true,"analysis":"Checked 1 operations that mention a page, cursor, or offset.","warnings":[],"limitations":["Checks read only the supplied operations, workflows, and OpenAPI document. No URL is fetched and no model reads the text.","A missing sentence is an undocumented contract. It is not a confirmed defect in a running implementation.","A contradiction is two statements in the supplied text. It is not proof of how a server behaves.","The HTTP method is not evidence that an operation is safe to retry or that it is idempotent.","Matches are fixed phrases and field names. They do not infer a business rule that the text does not state.","A continuation field is next, next_cursor, next_page, continuation_token, or next_page_token. A bare limit is not a continuation.","Termination is has_more, total, or a sentence such as null next cursor or last page.","Missing continuation or termination subtracts 15. An unclear cursor subtracts 10. Cursor plus offset subtracts 12. The score is omitted when nothing describes a page."],"recommendations":[]}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.03","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.03/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.03","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_s5AZFV7hclyDMvm3Tp4ew","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.03","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes an OpenAPI spec or workflow definition to detect pagination anti-patterns that would cause AI agents to miss pages, loop infinitely, or skip records","exampleAgentPrompt":"Can you check my OpenAPI spec for pagination issues that would confuse an AI agent — I have a /orders endpoint that uses a cursor parameter and I want to make sure the continuation field, termination condition, and first-page behavior are all clearly described?","exampleUseCases":[{"title":"Cursor pagination audit before agent deployment","prompt":"Before I let my agent loose on the orders API, can you run a pagination contract check on this OpenAPI spec? I need to know if the cursor field, the end-of-list condition, and the first-page behavior are properly defined so the agent doesn't loop forever."},{"title":"Detecting conflicting offset and cursor params","prompt":"My API spec declares both a cursor and an offset parameter on the same list endpoint — can you analyze the contract and tell me which pagination style my agent should follow and whether there are any conflicts it would stumble on?"},{"title":"Scoring a workflow spec for pagination compliance","prompt":"I have a workflow definition with a fetch-all-records step that pages through results — can you score it for pagination issues and tell me exactly what an agent impact would look like if something is wrong, plus how to fix it?"}],"resultDescription":"A JSON object containing a numeric score (0-100), a boolean success flag, an analysis summary string, a list of issues each with type, severity, location, evidence, description, agent_impact, and suggested_fix fields, plus a warnings array and limitations list explaining what was and was not checked.","failureModes":["Malformed or missing OpenAPI object returns a validation error","Operations array exceeding 20 steps per item may be truncated","No pagination-related operations found results in zero issues but low score","Ambiguous schema references not resolvable without URL fetching are flagged in limitations","Overly large input payloads may be rejected or truncated"],"whenToPreferThis":"Use this endpoint when you need automated, agent-readable feedback on whether your API contract is safe for AI agents to paginate through — particularly when you suspect missing continuation fields, unclear termination conditions, or conflicting cursor/offset styles. Prefer it over manual review when building agent pipelines that call list endpoints, or before deploying an agent that must traverse multi-page results without human supervision.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-12T12:37:12.887Z","isFirstParty":false,"canonicalSlug":"brainiac-pagination-contract-check-fb708f28"}