sqlmc_script_complete: Worked exchange

totalItems is 11 and two came back, because maxItems was 5 and the cap applied after ranking —read the count, not the length.

Last updated 2026-10-21

{
  "name": "sqlmc_script_complete",
  "arguments": {
    "sql": "SELECT c.Customer",
    "caretOffset": 17,
    "workspace": "C:\\repos\\estate\\Estate.smcworkspace",
    "connection": "sql-dev-01",
    "database": "Sales",
    "distributionList": "All Prod",
    "maxItems": 5
  }
}
{
  "ok": true,
  "errors": [],
  "replacementStart": 9,
  "replacementLength": 8,
  "totalItems": 11,
  "items": [
    { "label": "CustomerId", "insertText": "CustomerId", "kind": "Column",
      "detail": "int", "drift": null },
    { "label": "CustomerName", "insertText": "CustomerName", "kind": "Column",
      "detail": "nvarchar(200)", "drift": null }
  ],
  "schemaReadUtc": "2026-09-19T08:14:22.0000000+00:00"
}

totalItems is 11 and two came back, because maxItems was 5 and the cap applied after ranking — read the count, not the length.

A completion call at the caret in SELECT * FROM dbo.Cu and the reply offering the Customer table, with totalItems and the schema read time.
A completion call at the caret in SELECT * FROM dbo.Cu and the reply offering the Customer table, with totalItems and the schema read time.