sublime-mcp 1.13.2 → 1.13.4

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.
@@ -1906,7 +1906,7 @@
1906
1906
  },
1907
1907
  {
1908
1908
  "name": "get_view_phantoms",
1909
- "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.",
1910
1910
  "inputSchema": {
1911
1911
  "type": "object",
1912
1912
  "properties": {
@@ -1917,6 +1917,21 @@
1917
1917
  "key": {
1918
1918
  "type": "string",
1919
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)."
1920
1935
  }
1921
1936
  }
1922
1937
  }
@@ -4734,7 +4749,7 @@
4734
4749
  },
4735
4750
  {
4736
4751
  "name": "ui_screenshot",
4737
- "description": "Take a picture of one window of this Sublime Text process (Windows only). The PNG is saved to a file and its path is returned (open it with the Read tool); inline=true returns the image itself. Works for a window that is behind others or not focused, and for dialogs. hwnd comes from list_native_windows (default: the first editor window). Only windows of Sublime Text itself can be captured, never another program.",
4752
+ "description": "Take a picture of one window of this Sublime Text process (Windows only). Returns the image itself as an image block (also through batch); inline=false saves a PNG file instead and returns its path. Works for a window that is behind others or not focused, and for dialogs. hwnd comes from list_native_windows (default: the first editor window). Only windows of Sublime Text itself can be captured, never another program.",
4738
4753
  "inputSchema": {
4739
4754
  "type": "object",
4740
4755
  "properties": {
@@ -4744,7 +4759,7 @@
4744
4759
  },
4745
4760
  "inline": {
4746
4761
  "type": "boolean",
4747
- "description": "Return the image itself instead of a file path (default false)."
4762
+ "description": "Return the image itself (default true); false saves a file and returns its path."
4748
4763
  },
4749
4764
  "settle_ms": {
4750
4765
  "type": "integer",
package/index.js CHANGED
@@ -46,6 +46,12 @@ const GATEWAY_FALLBACKS = [
46
46
  process.stderr.write(`mcp-commander: BASE=${BASE} platform=${process.platform}\n`);
47
47
 
48
48
  function ok(data) {
49
+ // The backend returns a list of MCP content blocks (images from ui_screenshot, also through
50
+ // batch): pass them on as they are instead of wrapping them as JSON text.
51
+ if (Array.isArray(data) && data.length && data.every(
52
+ (b) => b && (b.type === 'image' || b.type === 'text'))) {
53
+ return { content: data };
54
+ }
49
55
  return { content: [{ type: 'text', text: JSON.stringify(data) }] };
50
56
  }
51
57
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sublime-mcp",
3
- "version": "1.13.2",
3
+ "version": "1.13.4",
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": {