From e624d6938179ad0f19c1d3a1d3d3735dbc07bd18 Mon Sep 17 00:00:00 2001 From: blankll Date: Mon, 10 Aug 2026 14:08:27 +0800 Subject: [PATCH] feat(mcp): guide agents to sqlkit tools for database access MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Strengthen execute_query description so AI agents reach for sqlkit on any SQL data task (row counts, table contents, aggregations) instead of psql/mysql CLIs, and report results in the user's language (中文/English). Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src-tauri/src/capabilities/sql.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/src/capabilities/sql.rs b/src-tauri/src/capabilities/sql.rs index 832ac2b..4d6bf50 100644 --- a/src-tauri/src/capabilities/sql.rs +++ b/src-tauri/src/capabilities/sql.rs @@ -688,7 +688,7 @@ fn connection_id_schema() -> Value { pub fn register_sql_tools(reg: &mut CapabilityRegistry) { reg.register(Capability { name: "sqlkit__execute_query", - description: "Execute a read-only SQL query (SELECT, SHOW, EXPLAIN) and return the result set. Write statements (INSERT/UPDATE/MERGE), deletes (DELETE/TRUNCATE), and DDL (CREATE/ALTER/DROP) are rejected — use sqlkit__execute_write, sqlkit__execute_delete, or sqlkit__execute_ddl respectively.", + description: "Execute a read-only SQL query (SELECT, SHOW, EXPLAIN) and return the result set. Use this whenever a task needs database data: row counts, table contents, aggregations, or data checks — instead of shelling out to psql/mysql CLI. Write statements (INSERT/UPDATE/MERGE), deletes (DELETE/TRUNCATE), and DDL (CREATE/ALTER/DROP) are rejected — use sqlkit__execute_write, sqlkit__execute_delete, or sqlkit__execute_ddl respectively. Report results in the user's language (中文/English).", handler: Arc::new(ExecuteQueryHandler), input_schema: json!({"type": "object", "properties": { "connection_id": connection_id_schema(),