Limits
Input sizes and rate limits for quarry's MCP server and HTTP routes, and what your agent gets when it hits one.
Sizes
| Input | Limit |
|---|---|
search question | 1 to 500 characters |
search category | Up to 40 characters |
search results (limit) | 1 to 10, default 5 |
ask or HTTP question (query) | 1 to 2,000 characters |
Passages returned (top_k) | 1 to 20, default 5; never more than a fifth of the dataset's passages, and at least 1 |
request_id | 1 to 128 characters: letters, digits, _, ., :, or - |
username, slug | Up to 60 and 80 characters |
Free preview (snippet) | The passage's opening: up to 200 characters, half of the passage at most; top five search results only |
| MCP request body | Up to 128 KiB |
| Arrays and objects nested in an MCP request body | Up to 64 levels |
| Messages in one request to the MCP server (a JSON-RPC batch) | Up to 20 |
Rate limits
All windows are sliding: a limit counts the requests of the last minute, or day, at any moment.
| What | Limit | Counted per |
|---|---|---|
| Requests to the MCP server | 60 a minute | IP address, or token when you send one (API key or OAuth) |
| Requests that carry a token | 600 a minute | IP address, across all tokens |
Requests to /api/agent/access, quote, subscription, and query | 60 a minute | Account |
search | 20 a minute and 300 a day | Account when signed in, otherwise IP address |
get_dataset | 60 a minute | Account when signed in, otherwise IP address |
| Free previews | 30 a day | Caller and dataset |
| Questions to a free dataset | 30 a minute | Account when signed in over MCP, otherwise IP address |
| Requests to a paid dataset over HTTP, paid or not | 60 a minute | IP address |
ask calls that carry a payment | 60 a minute | Account when signed in, otherwise IP address |
| Paid questions, per question | 30 a minute | Paying wallet, once its payment is checked |
| Paid questions, with a subscription | 30 a minute | Account |
request_subscription, or POST /api/agent/subscription | 30 a minute | Account, across all its keys and connected agents |
Over MCP, each message of a batch counts as one request toward the first two limits: a batch of 20 messages counts 20.
Free search and previews also have global daily ceilings shared by all callers, and each dataset caps how many previews it serves per hour.
Assistants and model APIs that reach quarry from their own servers, like Claude, ChatGPT, or the OpenAI and Anthropic APIs, share those servers' IP addresses with their other users. Send an API key or sign in, and most limits count only your own account or key.
When you hit one
- HTTP: status 429 with
{ "error": { "code": "RATE_LIMITED" } }and aRetry-Afterheader, in seconds. - MCP server limits (the first two rows): the same HTTP 429, before any tool runs. Your MCP client reports it as a transport error, not a tool result.
- MCP batch over 20 messages: HTTP 413 with the code
MCP_BATCH_TOO_LARGE, before any of its messages runs. Send the messages in smaller batches, or one at a time. - MCP request body over 128 KiB: HTTP 413 with the code
MCP_BODY_TOO_LARGE, before the body is parsed. Send a smaller request or split a batch. - MCP request body nested deeper than 64 levels: HTTP 413 with the code
MCP_BODY_TOO_DEEP, before any of its messages runs. - MCP request body that isn't JSON: HTTP 400 with the JSON-RPC error
-32700, before any tool runs. - MCP tool:
isError: truewith the codeRATE_LIMITEDanddetails.retry_after, in seconds. A paid question over x402 gives the wait in the message only. - Preview: the
snippetisnull, and the search still answers.
Wait the given number of seconds before retrying. Retrying sooner counts against the same limit. A paid question refused for a limit isn't charged, and its signed payment stays unspent: send the same payment again after the wait.