You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src-node/mcp-editor-tools.js
+12-4Lines changed: 12 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,9 @@ function createEditorMcpServer(sdkModule, nodeConnector, clarificationAccessors)
86
86
87
87
consttakeScreenshotTool=sdkModule.tool(
88
88
"takeScreenshot",
89
-
"Take a screenshot of the Phoenix Code editor window. Returns a PNG image. "+
89
+
"Take a screenshot of the Phoenix Code editor window. "+
90
+
"By default returns the screenshot as a PNG image inline. "+
91
+
"If filePath is specified, saves the screenshot to that file and returns the file path instead. "+
90
92
"Prefer capturing specific regions instead of the full page: "+
91
93
"use selector '#panel-live-preview-frame' for the live preview content, "+
92
94
"or '.editor-holder' for the code editor area. "+
@@ -95,16 +97,22 @@ function createEditorMcpServer(sdkModule, nodeConnector, clarificationAccessors)
95
97
"and other editor UI elements. Use purePreview=true to temporarily hide these overlays.",
96
98
{
97
99
selector: z.string().optional().describe("CSS selector to capture a specific element. Use '#panel-live-preview-frame' for the live preview, '.editor-holder' for the code editor."),
98
-
purePreview: z.boolean().optional().describe("When true, temporarily switches to preview mode to hide element highlight overlays and toolboxes before capturing, then restores the previous mode.")
100
+
purePreview: z.boolean().optional().describe("When true, temporarily switches to preview mode to hide element highlight overlays and toolboxes before capturing, then restores the previous mode."),
101
+
filePath: z.string().optional().describe("Absolute path to save the screenshot as a PNG file. If specified, returns the file path instead of inline image data.")
0 commit comments