Repository navigation
Releases
safe-db v1.1.1
1.1.1
Desktop app, MCP server (safe-db-mcp / @safe-db/mcp), and shared query engine. Version is 1.1.1 in build.gradle.kts; the MCP fat JAR is safe-db-mcp-1.1.1-all.jar; npm packages are stamped 1.1.1 at assemble time.
- Settings query timeout is configurable from 1 to 120 seconds, default 10; it applies to the next desktop or MCP query run and its plan check; connect and schema introspection stay fixed. safe-db-mcp settings prints query_timeout_seconds; safe-db-mcp settings timeout writes it.
- The sidebar shows a reachability indicator (Connected / Not connected) for the selected connection, and the Connections screen labels that connection Selected instead of Active.
- Updated the bundled Temurin 25 jlink runtime for @safe-db/mcp to jdk-25.0.5+8 and updated runtime dependencies (mssql-jdbc 13.6.2, kotlinx-serialization-json 1.13.0) (#112).
- Refreshed README and documentation links to safe-db.dev and trimmed "single SELECT" wording from MCP tool descriptions and CTE error copy (#110).
safe-db v1.1.0
1.1.0
Desktop app, MCP server (safe-db-mcp / @safe-db/mcp), and shared query engine. Version is 1.1.0 in build.gradle.kts; the MCP fat JAR is safe-db-mcp-1.1.0-all.jar; npm packages are stamped 1.1.0 at assemble time.
- Schema discovery and join guidance:
describe_tableincludesjoin_eligibleon columns andincoming_foreign_keys. Addedsearch_catalogfor case-insensitive matching across tables, columns, indexes, and foreign keys, andfind_join_pathsfor direct neighbors or multi-hop foreign-key and indexed-column paths. - Dry-run query assessment: added
assess_query(SafeDbService.assessQuery/assessQueryCore) to parse, validate, compile, runEXPLAIN, and evaluate the risk gate and confirmation requirements without executing theSELECTor writing query history. - In-memory sample analysis: added
pivot_resultandfilter_result_rowsonresult_id, backed by the:sharedExplore pivot and worksheet engines, plusexport_resultto write owner-only CSV exports under{dataDir}/exports/. - Workspace tools: added
list_saved_queries,run_saved_query,save_query,delete_saved_query(two-step confirmation),list_recipes,apply_recipe, andlist_query_history, all backed by the sharedspecToSqlcompiler. - MCP resources and prompts: added
safedb://connections,safedb://connections/{connection_id}/tables, andsafedb://results/{result_id}/summaryresources plusexplore-databaseandanalyze-resultprompts. - CLI enhancements: added
safe-db-mcp connections test [<id>]andsafe-db-mcp settings(show,risk-gate,default-connection,clear-default-connection,block-schema,unblock-schema); addedsafe-db-mcp recipes list,recipes import <absolute path>, andrecipes export <recipe_id>. - Case-insensitive catalog lookup for
describe_tableandfind_join_paths, with up to 5 suggested tables when a name is unknown andinvalid_argumentslisting both names when a reference is ambiguous. - Db2 internal catalog tables (
EXPLAIN_*,ADVISE_*) are hidden fromlist_tables,search_catalog,describe_table,find_join_paths, and the tables resource. find_join_pathsacceptsforeign_key_onlyto exclude indexed-column candidates.- Unknown-column errors on
filter_result_rows,pivot_result, andsortslist known result columns. run_query,run_saved_query, andassess_queryreceipts includedialect; capped samples reportsample_cap_reason(sql_limitorbyte_budget) and unbounded SQL setssample_unbounded.- Additive
structuredContentfor object tools and publishedoutputSchemafor all 16 object tools:list_tables,describe_table,search_catalog,find_join_paths,run_query,assess_query,get_result_rows,summarize_result,pivot_result,filter_result_rows,apply_recipe,run_saved_query,save_query,delete_connection,delete_saved_query, andexport_result. - Intentional MCP contract changes: a visualization-only
apply_recipe(no pivot and no worksheet) is avalidationerror; worksheet receipt column names are source columns, not display labels;analyze-resultresult_idis optional. - Unknown-table suggestions rank visible tables by spelling similarity (edit distance / prefix) instead of alphabetical order.
run_query/assess_queryriskreasonsinclude the same scoring evidence on allowed queries as on blocked queries.- Empty
run_querysamples keep JDBC column types (instead of"unknown") and omitsample_unboundedplus the large-limit warning when the result is known empty. - Pivot dimension names use table-aware display labels for default, explicit, and recipe pivots (strip
{alias}__; qualify collisions astable.column). - Pivot measure names use the same table-aware display labels (
Sum amount,Max orders.idon collision). - Multi-dimension pivots emit one output column per row dimension; totals stay in the totaled dimension instead of collapsing into a single header.
filter_result_rowsmembers/included_keysmatches actual cell values (view,1) as well as internalTextCell:viewkeys.- Failure to parse a MySQL JSON plan, including Impossible WHERE / no matching const-table plans, no longer forces
confirmation_requiredon ordinary gated SELECTs. setup/connections addrefuse to save a connection whenSAFEDB_KEYCHAIN_BACKEND=disabled;connections testthen says to unset that override rather than add the connection again.- Empty
run_querysamples drop the leftover material-payload risk score/reason. - Duplicate “joins an additional relation” risk reasons collapse to one signal.
- Duplicate “high-row scan of a large table” risk reasons from a self-join collapse to one reason; both sides still count toward the score.
- Multi-dimension pivots no longer emit empty parent-group header rows with a null child and null measures, including when
show_subtotalsis false. - A mismatched destructive confirmation no longer replaces a still-valid outstanding token.
filter_result_rowsdocuments thatmemberstakesincluded_keys, notvalue.runQueryCorefails closed withQueryError.RiskGate(risk_gate) when risk assessment is still pending (AssessmentPending).LIKE/ILIKE/NOT LIKE ... ESCAPE '!'round-trips through SQL parsing,FilterSpec, andspecToSql/ saved queries (and clearslikeEscapewhen changing columns or operators in the Query Builder).
safe-db v1.0.1
Changelog
- History: Builder and SQL runs appear as they complete, without restarting the app. Delete a single entry, or clear the whole list.
- Light mode default: New installs start in light mode. A missing or unrecognized theme value also starts light. An explicitly saved dark theme stays dark.
- Query builder layout: The toolbar wraps the connection controls and Run as groups at the 960x600 minimum window with the sidebar expanded. Joins stay reachable at that size, and Query options opens a dialog with distinct rows, grouping, sorting, and joins. Filters sit in a height-bounded scrolling strip above the canvas, so a long IN list cannot cover the table cards.
- Filters: Filter chips stay visible at the default width with the sidebar expanded. BETWEEN fields stay together with their from, and, and to labels, and the operator menu no longer truncates BETWEEN. Each wrapped IN value keeps its remove button, and timestamp values stay readable.
- Table cards: Column names show at every width. A card shows column types once it is wide enough, and hovering a column name reveals the type on a narrower card. Each column toggle has an accessible label.
- SQL workspace:. The header wraps the title, connection and schema pickers, and Run as groups at the 960x600 minimum. With no saved connection selected, the screen shows only the Choose a database to query prompt and an Open Connections action.
safe-db v1.0.0
Safe DB 1.0.0 is the first official release: a desktop app and MCP server (safe-db-mcp / @safe-db/mcp) that give people and AI agents the same bounded, read-only access to databases.
Queries run through a shared engine with connection timeouts, result-size limits, and a risk gate that can stop high-risk plans before they execute. Failures come back as structured errors instead of an unbounded session.
Downloads, documentation, exact query limits, and supported databases are at https://safe-db.dev