Skip to content

Commit 24b4538

Browse files
anandgupta42claude
andcommitted
refactor(mcp): shorter property descriptions for sql_execute and sql_materialize
Definitions are re-sent with every request. Shorter `queries`, `query_from`, `full_text_columns`, `tables`, `sql` and `target_table` descriptions; defaults that the parsers apply (`queries[].label`, `queries[].warehouse`, `query_from.sql`, `max_rows`) lose theirs. Parsing unchanged. Declarations 5,163 -> 4,824 chars. Tests: `server.test.ts`, `stdio.test.ts` (ALTIMATE_MCP_E2E=1). Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 873d18a commit 24b4538

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

  • packages/opencode/src/altimate/mcp-server

‎packages/opencode/src/altimate/mcp-server/adapter.ts‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,16 @@ const PROPERTY_DESCRIPTIONS: Record<string, Record<string, string | null | typeo
5454
},
5555
sql_execute: {
5656
query: "SQL, or a MongoDB JSON command",
57-
queries: "Up to 8 independent read-only queries; each gets its own labeled result",
58-
"queries[].label": "Default q1, q2, ...",
57+
queries: "Up to 8 independent queries, one labeled result each",
58+
"queries[].label": null,
5959
"queries[].query": null,
60-
"queries[].warehouse": "Default: warehouse",
61-
query_from: "Run the SQL string this read-only SELECT returns, without copying it; needs warehouse as the target",
60+
"queries[].warehouse": null,
61+
query_from: "Run the SQL string a one-row SELECT returns; warehouse is the target",
6262
"query_from.warehouse": null,
63-
"query_from.sql": "SELECT returning one row with one SQL string column",
63+
"query_from.sql": null,
6464
warehouse: null,
6565
limit: "Max rows (default 100, max 10000)",
66-
full_text_columns: "Columns whose full text to prioritize (at most 20 rows; all rows are saved)",
66+
full_text_columns: "Columns to show in full (20-row preview)",
6767
query_timeout_ms: null,
6868
},
6969
sql_check: {
@@ -83,10 +83,10 @@ const PROPERTY_DESCRIPTIONS: Record<string, Record<string, string | null | typeo
8383
},
8484
sql_materialize: {
8585
source_warehouse: "Warehouse to read, or scratch",
86-
sql: "Read-only SELECT; every returned row is stored",
87-
target_table: "New scratch table: letters, digits, underscores",
86+
sql: "Read-only SELECT",
87+
target_table: "New scratch table name",
8888
mode: "create (default), replace or append",
89-
max_rows: "Row cap (default 2000000)",
89+
max_rows: null,
9090
max_bytes: null,
9191
query_timeout_ms: null,
9292
},
@@ -203,7 +203,7 @@ function withTables<T>(schema: T): T {
203203
type: "array",
204204
items: { type: "string" },
205205
maxItems: MAX_FUSED_TABLES,
206-
description: "Tables to describe first in this call (columns, types, value profile); a query is optional",
206+
description: "Tables to describe in this call (columns, value profile); query optional",
207207
},
208208
...copy.properties,
209209
}

0 commit comments

Comments
 (0)