Chronos/DBWaitlist

Reference

MCP tools

Every tool an agent sees, with its parameters and what it returns.

SoonThese pages describe Chronos Cloud, which opens from the waitlist. Running Chronos yourself? Self-host docs

Protocol

  • Transport: MCP streamable HTTP (protocol 2025-06-18, also 2025-03-26 and 2024-11-05). POST one JSON-RPC message, get one JSON answer; initialize opens a session (Mcp-Session-Id).
  • Auth: OAuth 2.1 with dynamic client registration and PKCE, or Authorization: Bearer ck_… (an API key). See Coding agents.
  • Results are text: SQL results as a psql-style table, others as one or more lines. Failures are normal results with isError: true and a message saying how to fix the call.
  • Branch: every tool that reads or writes rows takes branch (default main). Agents are taught to fork, write the world, and merge. In production they can’t write main at all; an agent with a merge policy changes main only by merging.
  • Which tools are listed follows what the agent may do: in production, merge lands nothing in main on its own.

Project tools

setup_project

Creates or finds the project’s database and makes it the session’s project. Returns DATABASE_URL and the files to write (.chronos/project.json, the .env line, .mcp.json, the CLAUDE.md block). Safe to call again: the same git remote, else name, gives the same project.

ParameterTypeRequiredNotes
namestringyesthe project folder’s name
git_remotestringnogit remote get-url origin

use_project

Makes an existing project the session’s project.

ParameterTypeRequiredNotes
project_idstringyesprj_…, from .chronos/project.json

usage

The project database’s size, open worlds, data out and awake time this month, against the plan. No parameters.

Reading

describe

Tables with row counts, their fields with types and example or allowed values, and a sample row. Call it first.

ParameterTypeRequiredNotes
tablestringnoall tables
branchstringnomain; a world, or name@when to read the past

sql

Runs SQL as its own session: a transaction must BEGIN and COMMIT within one call. Each result comes back as a table, or a statement’s tag.

ParameterTypeRequiredNotes
sqlstringyesone or more statements
paramsarraynoJSON values for $1, $2, …
branchstringnomain; a world, or name@when to read the past

get

ParameterTypeRequiredNotes
tablestringyes
idstringyesthe row’s key
branchstringnomain; a world, or name@when to read the past

find

Exact filters, plus optional text search (BM25) and vector similarity, best first; the match count, then up to limit rows with scores.

ParameterTypeRequiredNotes
tablestringyes
whereobjectno{"field": value}, all must match
textstringnowords to find in the rows’ text fields
vector, vector_fieldarray, stringtogetherranks by dot product with the stored vectors
limit, offsetintegerno20, 0
efintegernothe vector graph’s beam; 0 chooses
branchstringnomain; a world, or name@when to read the past

Writing

Writes go to the world named in branch: one the agent forked (or main, in development, for an agent without a merge policy).

put

Creates or replaces one whole row. On a SQL table it is checked like an INSERT: columns, types, NOT NULL, unique keys and foreign keys.

ParameterTypeRequiredNotes
tablestringyes
idstringyes
recordobjectyesthe row
branchstringyesthe world to write

delete

ParameterTypeRequiredNotes
tablestringyes
idstringyes
branchstringyesthe world to write

Most agents write with sql instead: INSERT, UPDATE, DELETE and migrations on the world.

Worlds

fork

Creates a world, an instant private copy. Returns created branch task-1 (world id …) from main; pass branch="task-1" to work on it.

ParameterTypeRequiredNotes
namestringyese.g. the task id
fromstringnomain; a world, or name@when
metaobjectnonotes (owner, task), a declared scope (may_change, tenant, max_rows, max_deletes, intent), run tags (run_id, prompt_version, model, tool_schema), check_reads

branches

Lists worlds with their parent and number of changes. No parameters.

set_meta

Merges a JSON object into a world’s metadata; null removes a key.

ParameterTypeRequiredNotes
branchstringyes
metaobjectyes

diff

What changed since the fork, row by row: the count first (2 changes on task-1 (leads: 1 deleted, 1 updated, 0 inserted)), deletes first with what they held (- DELETE table/id {row}), then + table/id {row} and ~ table/id field: old -> new.

ParameterTypeRequiredNotes
branchstringyes
tostringnocompare branch to this world or moment instead of the fork point
as_sqlbooleannothe change as SQL statements
readersbooleannowhat in the database reads each changed column
countbooleannojust the per-table counts, and what its merge would send
limit, offsetintegerno20, 0

rebase

Takes in what changed in the parent, keeping the world’s own changes on top. Refused on a conflict nothing settles.

ParameterTypeRequiredNotes
branchstringyes
by_columnsbooleanno
rowsobjectno{"table/id": "ours" | "theirs" | "delete" | {row}}
resolvestringnofail, ours or theirs
versionintegernoonly if still at this version

check_reads

For a world forked with check_reads: whether anything it read changed since it forked. Changes nothing.

ParameterTypeRequiredNotes
branchstringyes

checkpoint, rollback

checkpoint names this moment of a world (branch, name); rollback puts the world back to one (branch, checkpoint).

discard

ParameterTypeRequiredNotes
branchstringyes
cascadebooleannoalso every world forked from it

Merging

merge_preview

What merge would do, without doing it: per row, apply or conflict and why, with base, ours and theirs; a summary row per table first, deletes next; a blocked row if a policy or check would hold it; then what reads the changed columns; and the world’s version to merge exactly what it showed.

ParameterTypeRequiredNotes
branchstringyes
into, only_tables, only_keys, by_columns, resolve, rowsnoas for merge
limit, offset, versionintegernopages; later pages refused if the world changed

merge

Applies the world to its parent and deletes it (with into, only_tables or only_keys, the world stays). Conflicts come back with isError: true and how to settle them; a held merge comes back with the policy’s reasons and, on a production project, the review’s link.

ParameterTypeRequiredNotes
branchstringyes
intostringnoanother world to merge into
only_tables, only_keysarraynomerge just those; "table/id" for keys
by_columnsbooleannoonly a column both sides changed conflicts
rowsobjectno{"table/id": "ours" | "theirs" | "delete" | {row}}
resolvestringnofail (default), ours, theirs
versionintegernomerge only if still at this version
targetintegernowith rows settled: the target merge_preview named
confirmbooleannoafter the server stopped: merge as it is now
a call
{"name": "merge", "arguments": {"branch": "fix-prices", "version": 7}}

History

history

What happened to a world recently, newest first (branch, limit 30).

restore and undo_merge aren’t listed for coding agents on Chronos Cloud: putting data back is a person’s job, from the dashboard or SQL.

Rules and reviews

ToolDoes
merge_policiesthe policies, and which agent keeps to each
check_merge_policytries rules on a world’s real changes: branch, a policy name, and/or rules to override; nothing is saved
reviewsmerges waiting for a person, oldest first
reviewfor a policy’s reviewer agent: branch, verdict (approve, reject, pass), reason
merge_checksthe merge checks

Simulations

ToolParameters
simulateworlds, prefix, script, score (required); from, keep, order, seed, threads
replayworld (one a simulation kept); as to keep the replay

Errors

A tool that fails answers normally with isError: true and a message saying how to fix the call: a missing parameter, a refusal (with the right the agent lacks), a SQL error (with its SQLSTATE), a merge conflict (with the rows). Protocol errors use JSON-RPC’s: -32700 for a body that isn’t JSON, -32601 for an unknown method.

a failed call
{"jsonrpc":"2.0","id":8,"result":{"content":[{"type":"text","text":"'id' is required: a non-empty string without spaces"}],"isError":true}}
MCP tools · Chronos