You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description:Some("Execute a SQL query on a specific connection".to_string()),
505
+
description:Some("Execute a SQL query on a specific connection. If the query already contains a LIMIT clause, it will be respected.".to_string()),
506
506
input_schema: json!({
507
507
"type":"object",
508
508
"properties":{
509
509
"connection_id":{"type":"string","description":"The ID or name of the connection"},
510
-
"query":{"type":"string","description":"The SQL query to execute"}
510
+
"query":{"type":"string","description":"The SQL query to execute"},
511
+
"limit":{"type":"integer","description":"Maximum number of rows to return (default: 100). If the query already contains a LIMIT clause smaller than this value, the query's LIMIT takes precedence."}
511
512
},
512
513
"required":["connection_id","query"]
513
514
}),
@@ -821,6 +822,11 @@ async fn tool_run_query(
821
822
data:None,
822
823
})?;
823
824
825
+
let max_rows = args
826
+
.get("limit")
827
+
.and_then(|v| v.as_u64())
828
+
.unwrap_or(100)asu32;
829
+
824
830
audit.connection_id = Some(conn_id.to_string());
825
831
audit.query = Some(query.to_string());
826
832
let kind = ai_activity::classify_query_kind(query);
0 commit comments