sublime-mcp 1.13.1 → 1.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -434,7 +434,7 @@
434
434
  },
435
435
  {
436
436
  "name": "close_file",
437
- "description": "Close a file by path, or close the active file if path is omitted. Routed through Sublime's real close command (not a direct API call), so a host-side close-blocking hook gets a chance to run -- e.g. GhostShell's ai_terminal package refuses this outright (no dialog, just a no-op) for any ai_terminal tab, so calling this on one does nothing rather than closing it. Only ever targets an already-open view found by path, by name or index, or the current active view. Pass path for a saved file. For a tab with no path (unsaved buffer, scratch view) pass name (partial, case-insensitive match on the tab's title) or index (0-based, from get_open_files); with none of the three it closes whichever tab is active, so name the tab you mean. A name or index that matches nothing is an error and closes nothing. (run_command 'close' with scope='view' does not close a tab: use this tool.)",
437
+ "description": "Close a file by path, or close the active file if path is omitted. Routed through Sublime's real close command (not a direct API call), so a host-side close-blocking hook gets a chance to run -- e.g. GhostShell's ai_terminal package refuses this outright (no dialog, just a no-op) for any ai_terminal tab, so calling this on one does nothing rather than closing it. Only ever targets an already-open view found by path, by name or index, or the current active view. Pass path for a saved file. For a tab with no path (unsaved buffer, scratch view) pass name (partial, case-insensitive match on the tab's title) or index (0-based, from get_open_files); with none of the three it closes whichever tab is active, so name the tab you mean. A name or index that matches nothing is an error and closes nothing. A tab with unsaved edits normally raises Sublime's native \"Save Changes?\" dialog, which blocks the main thread until someone answers it; pass discard=true to throw the unsaved edits away and close at once (the result then says discarded). (run_command 'close' with scope='view' does not close a tab: use this tool.)",
438
438
  "inputSchema": {
439
439
  "type": "object",
440
440
  "properties": {
@@ -449,6 +449,11 @@
449
449
  "index": {
450
450
  "type": "integer",
451
451
  "default": -1
452
+ },
453
+ "discard": {
454
+ "type": "boolean",
455
+ "default": false,
456
+ "description": "Close without saving: unsaved edits are lost. Default false (Sublime asks)."
452
457
  }
453
458
  }
454
459
  }
@@ -1901,7 +1906,7 @@
1901
1906
  },
1902
1907
  {
1903
1908
  "name": "get_view_phantoms",
1904
- "description": "Return phantom HTML and extracted text from a view by name.\nIf key is omitted, returns phantoms for all keys.",
1909
+ "description": "Return phantom HTML and extracted text from a view by name.\nIf key is omitted, returns phantoms for all keys. Output can be huge for a view with hundreds of phantoms (a GhostShell omp tab: about 290 KB): html=false drops the HTML and the empty spacer phantoms, last=N keeps only the newest N, max_chars cuts each text.",
1905
1910
  "inputSchema": {
1906
1911
  "type": "object",
1907
1912
  "properties": {
@@ -1912,6 +1917,21 @@
1912
1917
  "key": {
1913
1918
  "type": "string",
1914
1919
  "default": ""
1920
+ },
1921
+ "last": {
1922
+ "type": "integer",
1923
+ "default": 0,
1924
+ "description": "Keep only the newest N phantoms (0 = all)."
1925
+ },
1926
+ "html": {
1927
+ "type": "boolean",
1928
+ "default": true,
1929
+ "description": "false: leave out the HTML and empty phantoms."
1930
+ },
1931
+ "max_chars": {
1932
+ "type": "integer",
1933
+ "default": 0,
1934
+ "description": "Cut each phantom's text to this length (0 = no cut)."
1915
1935
  }
1916
1936
  }
1917
1937
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sublime-mcp",
3
- "version": "1.13.1",
3
+ "version": "1.13.3",
4
4
  "description": "MCP server for Sublime Text 4 — exposes editor state and editing tools to AI assistants via the Model Context Protocol.",
5
5
  "type": "module",
6
6
  "bin": {