diff --git a/developers/mcp-tools.mdx b/developers/mcp-tools.mdx index a698534..d3ac36c 100644 --- a/developers/mcp-tools.mdx +++ b/developers/mcp-tools.mdx @@ -49,6 +49,8 @@ A call that opens a connection may also need approval on the Mac for a pre-conne **Read Only** refuses a statement classified as a write with `denied`. Reads also use the driver's read-only mode where supported. [What Read Only allows](/developers#what-read-only-allows) lists engine limits and the statements refused at every access level. Multiple statements return `invalid_argument`, except for SQL Server scripts sent to [`execute_query`](#execute_query) or [`confirm_destructive_operation`](#writing-data). On SQL Server, an `IF`, `WHILE` or `BEGIN ... END` block holding one statement counts as one statement; a block holding more is multiple statements. +At Safe Mode **Read-Only**, a read that calls a function TablePro cannot tell from a write is refused with `denied` on the engines [Safe Mode](/features/safe-mode#what-counts-as-a-read) names, whatever the token carries and whoever approved the call. + ## Masking rules On a connection with [masking rules](/features/data-masking#masking-for-ai-and-scripts), PostgreSQL, MySQL, MariaDB and local SQLite mask a cell by the table column it reads, so an alias is masked too. A column that reads no column of a user table comes back masked whole, whatever its name, and `status_message` names it. On engines that cannot trace a column, that is every column of a query. Schema tools such as `describe_table` return the structure as usual. diff --git a/features/ai-assistant.mdx b/features/ai-assistant.mdx index 81b5dca..ab7c7a7 100644 --- a/features/ai-assistant.mdx +++ b/features/ai-assistant.mdx @@ -87,7 +87,7 @@ The mode picker in the composer footer controls which tools the AI can call. It | Mode | Tools available | When to use | |------|----------------|-------------| | **Ask** | Read-only schema lookups: `list_connections` (this conversation's connection only), `get_connection_status`, `list_databases`, `list_schemas`, `list_tables`, `describe_table`, `get_table_ddl`. | Questions, exploration, drafting queries you run yourself. | -| **Edit** | All Ask tools, plus `execute_query` for any statement that is not destructive. The model is told to keep to `SELECT`, `INSERT`, `UPDATE` and `DELETE` and leave schema, privilege and session changes to Agent mode, but Edit refuses only destructive statements. See [external query rules](/developers#what-read-only-allows). | Letting the AI run the queries it proposes. | +| **Edit** | All Ask tools, plus `execute_query` for queries and data changes: `SELECT`, `INSERT`, `UPDATE`, `DELETE`, `MERGE`. On a SQL database and on DynamoDB it refuses schema, privilege, session and transaction statements, such as `CREATE`, `ALTER`, `GRANT`, `SET` and `BEGIN`, and changes to the database's own tables, such as `pg_settings` or `mysql.user`; run those in Agent mode or a query tab. A function a query calls is not read, so it runs whatever it does. Destructive statements stay blocked. On an engine with a query language of its own, such as MongoDB, Redis, Neo4j, SurrealDB or Kafka, Edit refuses only destructive statements. See [external query rules](/developers#what-read-only-allows). | Letting the AI run the queries it proposes. | | **Agent** | All tools, plus `confirm_destructive_operation` for destructive statements. Runs tools in a loop. | Multi-step migrations and schema changes. | Mode and [Safe Mode](/features/safe-mode) are independent gates. Agent mode does not bypass Safe Mode. @@ -101,7 +101,7 @@ In Edit and Agent modes each tool call appears as a card in the reply. Read-only Per-card tool approval -Safe Mode **Silent** auto-approves write tools and **Read-Only** auto-denies them. Destructive operations are the exception: `confirm_destructive_operation` always needs a click, Silent does not auto-approve it, its card has no **Always Allow**, and the model must pass the verbatim phrase `I understand this is irreversible`. +Safe Mode **Silent** auto-approves write tools and **Read-Only** auto-denies them, an **Always Allow** one too. Destructive operations are the exception: `confirm_destructive_operation` always needs a click, Silent does not auto-approve it, its card has no **Always Allow**, and the model must pass the verbatim phrase `I understand this is irreversible`. **Stop Generating** does not stop a write the database is already running. The write runs to the end, and the tool result in the reply says it may have been applied: check before you run it again. diff --git a/features/safe-mode.mdx b/features/safe-mode.mdx index 368ee92..da67ccc 100644 --- a/features/safe-mode.mdx +++ b/features/safe-mode.mdx @@ -24,7 +24,7 @@ Four things the table cannot carry. The confirmation dialog shows the whole stat Confirmation dialog over a query tab, showing a fourteen line UPDATE with Cancel and Execute Confirmation dialog over a query tab, showing a fourteen line UPDATE with Cancel and Execute - **Silent** is not a free pass: `DROP`, `TRUNCATE`, `CREATE OR REPLACE` of a table, schema or database, and a `DELETE` with no `WHERE` still raise the built-in dangerous query warning even there. So does a [Structure](/features/table-structure#saving-changes) save that drops a column, changes a column's type or character set, adds NOT NULL, changes the primary key, adds or rewrites a check constraint, converts a table's existing columns to another character set, or removes a MongoDB field. And **Read-Only** goes past queries to the interface itself, disabling inline cell editing, adding, deleting and duplicating rows, table truncate and drop, and import. + **Silent** is not a free pass: `DROP`, `TRUNCATE`, `CREATE OR REPLACE` of a table, schema or database, `INSERT OVERWRITE`, and a `DELETE` with no `WHERE` still raise the built-in dangerous query warning even there. So does a [Structure](/features/table-structure#saving-changes) save that drops a column, changes a column's type or character set, adds NOT NULL, changes the primary key, adds or rewrites a check constraint, converts a table's existing columns to another character set, or removes a MongoDB field. And **Read-Only** goes past queries to the interface itself, disabling inline cell editing, adding, deleting and duplicating rows, table truncate and drop, and import. ## Connections that are always read-only @@ -54,7 +54,7 @@ A statement runs as a read only when TablePro can tell for certain that it reads A read can still call a function that writes, such as `SELECT purge_orders()`. At **Read-Only** on PostgreSQL, PGlite, CockroachDB, KingbaseES, MySQL, MariaDB, SQLite, DuckDB and ClickHouse, the server refuses that write. Every read TablePro runs for you there runs in the engine's own read-only mode: Run, Run Selection, Run All, Explain, opening a table or view with its row counts and page turns, Fetch All, exports, Transfer, Data Compare, Copy Objects and dashboard tiles. Run All then opens no transaction of its own, and a SQL export reads table by table with no snapshot across tables. DuckDB and KingbaseES do this once their plugin in **Settings > Extensions** is updated for this release. -Oracle, Dameng and OceanBase have no such mode, and their functions can write. At **Read-Only** there, a query that calls a function outside TablePro's list of built-ins asks before it runs, and is refused when a [configuration profile](#managed-by-an-organization) holds the connection at Read-Only. A raw filter asks once, the filter of an export, a Transfer, a Data Compare or a Copy Objects asks before any row is read, and the automatic row count of such a browse shows no total. A function called without parentheses, which Oracle and Dameng allow, looks like a column and is not asked about. +Oracle, Dameng and OceanBase have no such mode, and their functions can write. At **Read-Only** there, a query that calls a function outside TablePro's list of built-ins is blocked, and so is a raw filter or the filter of an export, a Transfer, a Data Compare or a Copy Objects, before any row is read. The message names the level to switch to: **Alert**, or the lowest level a [configuration profile](#managed-by-an-organization) or Agent mode still offers, and it says the level is held when nothing below Read-Only is offered. Below Read-Only the query counts as a read, so only the two Full levels ask before it runs. The automatic row count of such a browse shows no total. A function called without parentheses, which Oracle and Dameng allow, looks like a column and is not blocked. `EXPLAIN` and `DESCRIBE` are reads until an option runs the statement. With `ANALYZE` they count as the statement they explain, so `EXPLAIN ANALYZE` of a `SELECT` is a read and of a `DELETE` is a write. An option TablePro does not recognize, or one in quotes, counts as running the statement, and an `EXPLAIN` whose statement cannot be found counts as a write. `ANALYZE` of a table stores statistics and is a write. diff --git a/ios/index.mdx b/ios/index.mdx index f004186..819bbe0 100644 --- a/ios/index.mdx +++ b/ios/index.mdx @@ -285,7 +285,7 @@ The **Status** row in **Info** uses the same words: **Connected**, **Not Connect Turn on Face ID, Touch ID, or Optic ID under **Settings > Security**. A cold launch always asks, and the connection from your last session waits behind that question: no connecting screen, no host key prompt, nothing dialed until you authenticate. After that **Auto-Lock** relocks immediately or after 1, 5, 15, or 60 minutes idle, starting at 5. The lock covers open sheets and connections, and the app switcher shows a locked card instead of your data; a connection open underneath stays connected. Turning the lock off asks you to authenticate first. -Each connection carries its own [safe mode](/features/safe-mode) level, synced from the Mac. Set it with **Safe Mode** under **Organization** in the connection's form. iOS has three: **Off**, **Confirm Writes**, and **Read-Only**, which refuses writes outright. **Default Safe Mode** under **Settings > New Connections** sets the level a new connection starts at. +Each connection carries its own [safe mode](/features/safe-mode) level, synced from the Mac. Set it with **Safe Mode** under **Organization** in the connection's form. iOS has three: **Off**, **Confirm Writes**, and **Read-Only**, which refuses writes outright. On PostgreSQL, MySQL, MariaDB, OceanBase and Oracle, Read-Only also refuses a query that calls a function outside TablePro's list of built-ins, since such a function can write; switch to **Confirm Writes** to run it. **Default Safe Mode** under **Settings > New Connections** sets the level a new connection starts at. SSH tunnels authenticate with a password, a private key or **Keyboard Interactive**. A tunnel set to **SSH Agent** on the Mac signs in here with a private key on this device and stays **SSH Agent** on the Mac. When the server asks for more, after the password or key or through keyboard-interactive, a password prompt gets the SSH password and a code prompt gets the code from **Two-Factor Authentication**. Any other question, or a code in **Prompt at Connect** mode, appears on the connection's screen for you to answer. **Auto Generate** takes the Base32 secret from your authenticator setup with its algorithm, digits and period, and shares them with the Mac; a tunnel that follows a Mac SSH profile uses the profile's. A private key on a security key does not work here, and the **SSH Sign-In Unavailable** alert says so. An unknown host key, the SSH server's or a jump host's, prompts with its fingerprint first, on the connection's own screen. The question waits there until you answer it, and leaving the screen ends that attempt. A key pasted under **Paste Key**, or picked as a text file, is kept in the Keychain beside the connection's passwords, never in the saved connection list. A key file that is not text is copied into the app and read from there. Setting **Auth Method** to **Password**, choosing **Import File**, or turning **SSH Tunnel** off deletes the saved key when you tap **Save**. A tunnel the Mac forwards to a unix socket on the server forwards to the same socket here. Turning the tunnel off keeps its other settings, here and on the Mac, for when you turn it back on. A tunnel that drops while the connection is open reconnects it, as returning to the app does; see [When the connection drops](#when-the-connection-drops).