List database collections
list_collections
Lists the tables in a site database with an exact row count for each.
This is the starting point for any question about the content stored in a site. Each table comes back with its schema, name and rowCount, and the schema and name are what the other data tools take.
Link tables that hold nothing but two foreign keys, and the join tables behind multi-reference fields, are left out unless you pass includeHidden, because they are plumbing rather than content. When you do, they come back with isHidden set to true. The field metadata table, _collection_fields, is never listed. See The CMS.
Request
Call it with a POST to https://api.modulify.ai/v1/list_collections, sending the inputs below as a JSON object. The token needs the data:read scope.
It only reads and changes nothing, so retrying it is safe.
curl -X POST https://api.modulify.ai/v1/list_collections \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"projectId":"PROJECT_ID"}'Over MCP, the same method is the list_collections tool.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
projectId |
string | Yes | The site id. |
includeHidden |
boolean | No | Also lists the internal link tables that join two collections together. Off by default. |
Response
Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.