Fix MCP action routing for workspace_db_query

This commit is contained in:
2026-06-15 13:55:21 -07:00
parent 9b19befa0a
commit d67d8e2052

View File

@@ -1879,7 +1879,8 @@ export async function executeMcpTool(
if (toolName === "http_fetch") return executeHttpFetch(args);
// Convert underscore tool name → dotted MCP action (apps_create → apps.create)
const action = toolName.replace(/_/g, ".");
let action = toolName.replace(/_/g, ".");
if (toolName === "workspace_db_query") action = "workspace.db_query";
// Unpack JSON-string args (Gemini schemas can't represent free-form objects,
// so we accept *Json string fields and parse them server-side).