sublime-mcp 1.13.3 → 1.13.5
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.
- package/fallback-tools.json +20 -2
- package/index.js +7 -0
- package/package.json +1 -1
package/fallback-tools.json
CHANGED
|
@@ -4749,7 +4749,7 @@
|
|
|
4749
4749
|
},
|
|
4750
4750
|
{
|
|
4751
4751
|
"name": "ui_screenshot",
|
|
4752
|
-
"description": "Take a picture of one window of this Sublime Text process (Windows only).
|
|
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.",
|
|
4753
4753
|
"inputSchema": {
|
|
4754
4754
|
"type": "object",
|
|
4755
4755
|
"properties": {
|
|
@@ -4759,7 +4759,25 @@
|
|
|
4759
4759
|
},
|
|
4760
4760
|
"inline": {
|
|
4761
4761
|
"type": "boolean",
|
|
4762
|
-
"description": "Return the image itself
|
|
4762
|
+
"description": "Return the image itself (default true); false saves a file and returns its path."
|
|
4763
|
+
},
|
|
4764
|
+
"region": {
|
|
4765
|
+
"type": "object",
|
|
4766
|
+
"description": "Only this part of the window: {x, y, width, height} in pixels of the full window picture (top-left is 0, 0). Omit for the whole window.",
|
|
4767
|
+
"properties": {
|
|
4768
|
+
"x": {
|
|
4769
|
+
"type": "integer"
|
|
4770
|
+
},
|
|
4771
|
+
"y": {
|
|
4772
|
+
"type": "integer"
|
|
4773
|
+
},
|
|
4774
|
+
"width": {
|
|
4775
|
+
"type": "integer"
|
|
4776
|
+
},
|
|
4777
|
+
"height": {
|
|
4778
|
+
"type": "integer"
|
|
4779
|
+
}
|
|
4780
|
+
}
|
|
4763
4781
|
},
|
|
4764
4782
|
"settle_ms": {
|
|
4765
4783
|
"type": "integer",
|
package/index.js
CHANGED
|
@@ -22,6 +22,7 @@ const DEFAULT_TOOL_NAMES = new Set([
|
|
|
22
22
|
'str_replace_based_edit_tool',
|
|
23
23
|
'save_file',
|
|
24
24
|
'discover_tools',
|
|
25
|
+
'ui_screenshot',
|
|
25
26
|
]);
|
|
26
27
|
const GATEWAY_FALLBACKS = [
|
|
27
28
|
{
|
|
@@ -46,6 +47,12 @@ const GATEWAY_FALLBACKS = [
|
|
|
46
47
|
process.stderr.write(`mcp-commander: BASE=${BASE} platform=${process.platform}\n`);
|
|
47
48
|
|
|
48
49
|
function ok(data) {
|
|
50
|
+
// The backend returns a list of MCP content blocks (images from ui_screenshot, also through
|
|
51
|
+
// batch): pass them on as they are instead of wrapping them as JSON text.
|
|
52
|
+
if (Array.isArray(data) && data.length && data.every(
|
|
53
|
+
(b) => b && (b.type === 'image' || b.type === 'text'))) {
|
|
54
|
+
return { content: data };
|
|
55
|
+
}
|
|
49
56
|
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
50
57
|
}
|
|
51
58
|
|
package/package.json
CHANGED