TotalBase
Settings

Data API

Limits, transactions, background queues, the OpenAPI document and the MCP server.

In the admin: Settings › Data API

Settings › Data API groups these pages of the admin: Limits, Transactions, Executions, OpenAPI, MCP.

Limits

Settings › Data API › Limits

Limits bounds what one Data API request may ask for, so no request, careless or hostile, can make PostgreSQL do unbounded work. A request past a limit is refused before any SQL runs. See Errors.

Pagination

SettingKeyDefaultRange
Default page sizeapi.default_limit50≥ 1. When a request sets no limit
Maximum page sizeapi.max_limit500≥ 1
Maximum offsetapi.max_offset100000≥ 0

Query complexity

SettingKeyDefault
Maximum relation depthapi.max_relation_depth3Levels of related tables one request may reach: site.customer.name reaches 2
Maximum filter depthapi.max_filter_depth10Nesting of _and / _or / _not
Maximum query nodesapi.max_query_nodes200Filter, sort and field nodes together

Writes

SettingKeyDefault
Require a filter for bulk updateapi.require_where_for_updateonAn update of several rows needs a where. Applies to the workflow Update records step too
Require a filter for bulk deleteapi.require_where_for_deleteonSame, for deletes
Maximum bulk itemsapi.bulk_max_items500Rows one bulk create, update or delete may touch
Maximum nested write depthapi.nested_write_max_depth21-3: parent → child → grandchild
Maximum nested write recordsapi.nested_write_max_records500Across all levels

Requests

SettingKeyDefault
Maximum request body sizeapi.max_body_bytes5 MB≥ 1024 bytes. Past it, REQUEST_BODY_TOO_LARGE
Maximum query string sizeapi.max_query_string_bytes32768 bytes≥ 256. Raising it above the value at startup needs a restart
Maximum query parametersapi.max_query_parameters200
Request timeoutapi.request_timeout_ms30000 ms100 ms to 1 h. PostgreSQL cancels the query, and the caller gets QUERY_CANCELED

Query features

SettingKeyDefault
Allow countapi.allow_countoncount=true
Allow regular expressionsquery.allow_regexon_regex. It can't use an ordinary index
Allow containment operatorsquery.allow_containson_contains, _contained_by, _overlap. Fast with a GIN index
Allow havingquery.allow_havingonFilters on aggregates

Transactions

Settings › Data API › Transactions

Transactions

POST /api/transactions runs several writes in one PostgreSQL transaction, all or nothing. See Transactions.

SettingKeyDefault
Enable transactionstransactions.enabledonA role also needs the Can run transactions capability: see Creating a role
Maximum operationstransactions.max_operations20
Statement timeouttransactions.timeout_ms0Up to 600000 ms. 0: the request timeout from Limits. A cancelled statement rolls back the whole transaction

Idempotency

An Idempotency-Key header makes a write safe to retry: the same key returns the first answer instead of writing again. See Writing.

SettingKeyDefault
Enable idempotency keysidempotency.enabledon
Key lifetimeidempotency.ttl_hours24 h
Maximum stored responseidempotency.max_response_bytes65536 bytesA larger answer isn't stored; a retry gets an error instead of the original body

Executions

Settings › Data API › Executions

TotalBase works through two queues in the background, both kept in PostgreSQL: executions (function calls made with ?async=true) and data events (the changes that start Database event workflows).

Executions

SettingKeyDefault
Enable the workerasync_executions.enabledonOff: queued executions wait
Maximum retriesasync_executions.max_retries3Only failures that can be retried
Retry delayasync_executions.retry_delay_seconds30 s
Stale timeoutasync_executions.stale_timeout_ms120000 msAn execution running longer without news is treated as abandoned by a crashed worker, and picked up again
Poll intervalasync_executions.poll_interval_ms2000 ms
Keep finished executionsasync_executions.retention_days7 days0: forever

See Calling functions.

Data events

SettingKeyDefault
Processed event retentionoutbox.retention_days7 days1-3650. Failed events that ran out of attempts are kept
Maximum attemptsoutbox.max_attempts51-100
Retry delayoutbox.retry_delay_seconds30 sDoubles after each attempt
Processing leaseoutbox.lease_seconds1200 sKeep it longer than your longest workflow run

An event is written in the same transaction as the change, and processed only after it commits. See Audit and events.

OpenAPI

Settings › Data API › OpenAPI

TotalBase generates an OpenAPI document of the Data API from your schema, permissions and workflows: each caller gets the one their roles can use. See OpenAPI.

SettingKeyDefault
Publish the OpenAPI documentopenapi.enabledonServes /api/openapi.json. Off: 404, though administrators still see it in the admin
Include example valuesopenapi.include_exampleson
Cache generated documentsopenapi.cache_enabledonKept per set of roles until the schema, permissions, workflows or settings change

MCP

Settings › Data API › MCP

MCP turns on the MCP server an AI agent builds and operates the instance through, served at the instance's own address, /mcp, with an administrator's token. See AI Agents.

None of these settings can be changed with an API token: only an administrator signed in to the admin. An agent can't widen its own limits.

Connection

Above the settings, the details to connect an agent: the Address (the public URL plus /mcp), Create a token (to your My account › Tokens), the claude mcp add command for Claude Code and a .mcp.json snippet, each with a copy button.

Settings

SettingKeyDefault
Enable MCPmcp.enabledoffOff: /mcp doesn't answer, and the totalbase-mcp command refuses to start
Modemcp.modeFULLRead only, Standard (no deleting or revoking) or Full (destructive calls need an explicit confirmation). On top of every permission check

Tools

Each group of tools can be switched off; an agent doesn't see the tools of a group that's off. All are on by default.

SettingKey
Tables and schemamcp.tools_schema
Recordsmcp.tools_records
Permissionsmcp.tools_access
Usersmcp.tools_users
DataViews and pagesmcp.tools_screens
Dashboardsmcp.tools_dashboards
Workflowsmcp.tools_workflows
Templatesmcp.tools_templates
SQLmcp.tools_sql. Also needs Allow API tokens in SQL Console

See Tools.

Agent

SettingKeyDefault
Project instructionsmcp.instructionsemptyYour project's conventions, given to every agent on connecting: naming, language, what never to touch. Up to 8000 characters
Requests per minutemcp.rate_limit_per_minute600Per token. An MCP request with a token counts only here, not toward the Network limit
Allowed hostsmcp.allowed_hostsnoneThe host names /mcp answers to, such as localhost:3050. Empty: the public URL's host and localhost. Protects against DNS rebinding