Tables and versions
Tables
Section titled “Tables”A table is named by a path, such as research/competitors: up to five parts of letters, digits, _ and -, joined by /. The parts before the last are its folders. Paths are lowercase, so Research/Competitors and research/competitors are one table. In SQL, a table is named by its path in double quotes:
SELECT category, count(*) FROM "research/competitors" GROUP BY 1Each column has a type (text, integer, double, decimal, boolean, date, timestamp and so on), read from the data written. Values that don’t all fit one type stay text exactly as written, and the write says so in a warning.
A table can be renamed, and its history, links and API follow it.
Versions
Section titled “Versions”Every write makes a new version: version 1, 2, 3 and on. A version never changes once made, so a version number always reads the same rows.
A query reads a table’s latest version. To read another, add it to the path: SELECT * FROM "research/competitors@3". One query can read several versions of a table, for example to see which rows a version added:
SELECT * FROM "research/competitors"EXCEPTSELECT * FROM "research/competitors@3"A write has a mode:
- create: a new table. Refused if the path is taken.
- append: adds the rows.
- upsert: updates the rows whose key columns match, and adds the rest. A column left out of a row keeps its value.
- replace: the rows become the table’s contents.
All but create make the table if there is none. Rows whose columns don’t fit the table are refused, naming the columns that conflict and how to fix them.
Tables saved from a query
Section titled “Tables saved from a query”query with save_as saves a query’s result as a table, and the version keeps the SQL and the version of each table it read. describe_table shows them, and says which of those tables have changed since. refresh_table runs the query again on their latest versions and saves the result as the next version, so the next session doesn’t have to write the SQL again:
SELECT company, revenue_growth FROM "research/companies" WHERE revenue_growth > 0.3saved as research/high_growth, is refreshed with refresh_table("research/high_growth") after research/companies changes. Each version keeps the query and the versions that made it, so older results can still be explained. A version the SQL names, such as "research/companies@3", stays that version. When none of the tables has changed, nothing runs and no version is made. A refresh without a message says in the history which tables moved, such as Refreshed: research/companies v3→v4.
Until it’s refreshed, a saved table whose tables have changed is stale: its rows may be out of date. A query that reads one by its path says so in its answer, under stale, with the tables that changed. A receipt from such a query says so too, so a figure is never shown as current when it may not be. list_tables and describe_table say it as well.
It goes through the whole chain: when report is saved from summary, which is saved from companies, a change to companies makes both stale, and both name companies. refresh_table refreshes only the table you name, so start nearest the change: refresh summary, then report. Refreshing report first runs nothing and says to refresh summary.
The query belongs to the version: a version written by hand has none, and a restore brings back the restored version’s. A query that reads the table it saves to keeps no query, as run again it would read its own result.
Who changed what, and why
Section titled “Who changed what, and why”Each version records:
- who made it: an agent (by the name its client gives, such as “Claude Code”), an API token (by its name), or a person in the app;
- the
messagegiven with the write, such as “added 40 rows from Crunchbase”; - the
runlabel, which an agent or script sets to group the writes of one task; - when, and what changed: rows added, updated and removed, and columns added.
table_history answers this list, and the table’s History panel in the app shows it with a diff of each version.
restore_version makes an earlier version the latest again. It does this by making a new version with the old one’s rows, so the versions after it are kept and the restore can be undone too. Its change says how many rows it added and removed compared with the version it replaced.
delete_table moves a table to the trash and frees its path. Its versions are kept. restore_version brings it back, and so does the Trash page in the app. No tool deletes a table for good: only you can, with Delete forever on the Trash page, which deletes its versions from rho and from its backups.
Because the tool is marked destructive, MCP clients ask their user before calling it.
Descriptions
Section titled “Descriptions”A table and each of its columns can have a description: what it holds, where it came from, its units. update_table_info sets them, and describe_table answers them, so the next session (or another agent) knows what it’s reading. Describing a table changes no data and makes no version.