fix(mcp): prevent encoding errors and fix tool bugs on MCP client transports (#38786)

(cherry picked from commit ed3c5280a9)
This commit is contained in:
Amin Ghadersohi
2026-03-24 05:41:24 -04:00
committed by Michael S. Molina
parent de42d4a986
commit ac8d6b0c53
11 changed files with 193 additions and 31 deletions

View File

@@ -248,6 +248,9 @@ class TestSaveSqlQueryToolLogic:
mock_sq.id = 42
mock_sq.label = "Revenue Query"
mock_sq.sql = "SELECT SUM(revenue) FROM sales"
mock_sq.db_id = 1
mock_sq.schema = ""
mock_sq.description = ""
mock_sq.catalog = None
request = SaveSqlQueryRequest(
@@ -412,6 +415,9 @@ class TestSaveSqlQueryToolLogic:
mock_sq.id = 10
mock_sq.label = "Test"
mock_sq.sql = "SELECT 1"
mock_sq.db_id = 1
mock_sq.schema = "public"
mock_sq.description = ""
mock_sq.catalog = None
request = SaveSqlQueryRequest(