fix(mcp): include iris in connection types

This commit is contained in:
t8y2
2026-06-01 13:50:05 +08:00
parent be2659447a
commit 43bd29b328
+6 -2
View File
@@ -46,7 +46,7 @@ function formatQueryToolResult(result: QueryResult, title?: string) {
}
export const DBX_CONNECTION_TYPE_DESCRIPTION =
"Database type: postgres, mysql, sqlite, redis, duckdb, clickhouse, sqlserver, mongodb, oracle, elasticsearch, doris, starrocks, redshift, dameng, kingbase, highgo, vastbase, goldendb, gaussdb, yashandb, databricks, saphana, teradata, vertica, firebird, exasol, opengauss, oceanbase-oracle, gbase, h2, snowflake, trino, hive, db2, informix, neo4j, cassandra, bigquery, kylin, sundb, tdengine, xugu, jdbc, access";
"Database type: postgres, mysql, sqlite, redis, duckdb, clickhouse, sqlserver, mongodb, oracle, elasticsearch, doris, starrocks, redshift, dameng, kingbase, highgo, vastbase, goldendb, gaussdb, yashandb, databricks, saphana, teradata, vertica, firebird, exasol, opengauss, oceanbase-oracle, gbase, h2, snowflake, trino, hive, db2, informix, iris, neo4j, cassandra, bigquery, kylin, sundb, tdengine, xugu, jdbc, access";
export function createDbxMcpServer(backend: Backend, options: { isWebMode?: boolean } = {}): McpServer {
const isWebMode = options.isWebMode ?? !!process.env.DBX_WEB_URL;
@@ -129,7 +129,11 @@ export function createDbxMcpServer(backend: Backend, options: { isWebMode?: bool
results.push(await backend.executeQuery(withDatabase(config, database), statement));
}
if (results.length === 1) return formatQueryToolResult(results[0]);
return text(results.map((result, index) => formatQueryToolResult(result, `Statement ${index + 1}`).content[0].text).join("\n\n"));
return text(
results
.map((result, index) => formatQueryToolResult(result, `Statement ${index + 1}`).content[0].text)
.join("\n\n"),
);
} catch (e: unknown) {
const msg = e instanceof Error ? e.message : String(e);
return toolError("QUERY_ERROR", msg);