The pattern
Fetch the contract
Download the OpenAPI spec from
https://api.creatoraudit.com/v2/openapi.json (also linked from the API reference). It describes every endpoint, parameter, and response shape.Generate tool schemas
Convert the operations you want to expose into your provider’s tool format. Each operation becomes one tool: the path and method are the call target; the parameters and request body become the input JSON schema. This works for Anthropic tool use, OpenAI function calling, and any generic function-calling runtime — they all consume JSON Schema.Start small. Expose a handful of read endpoints (
/search, /overview, /accounts, /creators/top) before adding write endpoints (POST /accounts, POST /videos).A minimal tool layer
The example below defines two read tools —search (calls GET /v2/search) and overview (calls GET /v2/overview) — and an executor that runs whichever tool the model picks. Responses are passed through verbatim, so you never hardcode fields that might drift.
These calls go to the CreatorAudit API, not the docs MCP. Mintlify’s
/mcp
searches the documentation; to call the API as MCP tools instead, see Connect via
MCP.What to get right in the loop
- Paginate in a loop. Collection responses carry
pagination.next_cursorandpagination.has_next. Passcursorback withlimit(1–200) and keep going untilhas_nextisfalse. Don’t make the model manage cursors — handle it in your executor and return aggregated results. - Parse RFC 9457 errors. On any
4xx/5xx, the body isapplication/problem+jsonwithstatus,title,detail, and a machine-readablecode. Branch onstatusfor control flow and oncodefor specific handling, then hand the model a structured error it can reason about. - Log
X-Request-ID. Capture the header on every call — success or failure — so any request can be traced. Quote it when you contact support. - Use
Idempotency-Keyon writes.POST /accounts,POST /videos, andPOST /creatorsaccept an optionalIdempotency-Keyheader. Set a stable key per logical action so retries from an agent loop don’t create duplicates.
Next
- Wrap the API as MCP tools instead — Connect via MCP.
- See full workflows that chain these calls — Agent recipes.