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/lib/server.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,10 @@ import { createRequire } from 'module';
17
17
constrequire=createRequire(import.meta.url);
18
18
const{ version }=require('../../package.json');
19
19
20
-
constserver=newMcpServer({
21
-
name: "MCP Selenium",
22
-
version
23
-
});
20
+
constserver=newMcpServer(
21
+
{name: "MCP Selenium", version },
22
+
{instructions: "To understand the current page state, read the accessibility://current resource. It provides a structured accessibility tree that's faster and more reliable for finding element locators."}
23
+
);
24
24
25
25
// BiDi imports — loaded dynamically to avoid hard failures if not available
26
26
letLogInspector,Network;
@@ -436,7 +436,7 @@ server.registerTool(
436
436
server.registerTool(
437
437
"take_screenshot",
438
438
{
439
-
description: "captures a screenshot of the current page",
439
+
description: "captures a screenshot of the current page. Prefer using the accessibility://current resource for understanding page content. Use screenshots only when visual layout matters.",
440
440
inputSchema: {
441
441
outputPath: z.string().optional().describe("Optional path where to save the screenshot. If not provided, returns an image/png content block.")
0 commit comments