@@ -278,12 +278,26 @@ Return ONLY the data JSON:`,
278278 } ,
279279 } ,
280280
281- // Upsert - which unique column to match on (defaults to the first unique column)
281+ // Upsert - which unique column to match on (required when 2+ unique columns)
282+ // Basic: pick a unique column. Advanced: enter the column id directly.
282283 {
283- id : 'conflictColumn' ,
284+ id : 'conflictColumnSelector' ,
285+ title : 'Conflict Column' ,
286+ type : 'column-selector' ,
287+ canonicalParamId : 'conflictColumn' ,
288+ mode : 'basic' ,
289+ selectorKey : 'table.columns' ,
290+ placeholder : 'Select a unique column' ,
291+ dependsOn : [ 'tableSelector' ] ,
292+ condition : { field : 'operation' , value : 'upsert_row' } ,
293+ } ,
294+ {
295+ id : 'manualConflictColumn' ,
284296 title : 'Conflict Column' ,
285297 type : 'short-input' ,
286- placeholder : 'Unique column to match on (required if the table has multiple unique columns)' ,
298+ canonicalParamId : 'conflictColumn' ,
299+ mode : 'advanced' ,
300+ placeholder : 'Enter the column id' ,
287301 dependsOn : [ 'tableId' ] ,
288302 condition : { field : 'operation' , value : 'upsert_row' } ,
289303 } ,
@@ -673,8 +687,8 @@ Return ONLY the sort JSON:`,
673687 } ,
674688 rowCount : {
675689 type : 'number' ,
676- description : 'Number of rows returned ' ,
677- condition : { field : 'operation' , value : 'query_rows' } ,
690+ description : 'Rows returned (query) or total rows in the table (get schema) ' ,
691+ condition : { field : 'operation' , value : [ 'query_rows' , 'get_schema' ] } ,
678692 } ,
679693 totalCount : {
680694 type : 'number' ,
@@ -713,7 +727,17 @@ Return ONLY the sort JSON:`,
713727 } ,
714728 columns : {
715729 type : 'array' ,
716- description : 'Column definitions' ,
730+ description : 'Column definitions (each includes its stable id)' ,
731+ condition : { field : 'operation' , value : 'get_schema' } ,
732+ } ,
733+ columnCount : {
734+ type : 'number' ,
735+ description : 'Number of columns' ,
736+ condition : { field : 'operation' , value : 'get_schema' } ,
737+ } ,
738+ maxRows : {
739+ type : 'number' ,
740+ description : "Max rows per table for the workspace's plan" ,
717741 condition : { field : 'operation' , value : 'get_schema' } ,
718742 } ,
719743 message : { type : 'string' , description : 'Operation status message' } ,
0 commit comments