From b09b67132ac86c43c58cefd8d4b94eb65d9765d7 Mon Sep 17 00:00:00 2001 From: angiejones Date: Sun, 22 Feb 2026 17:58:46 -0600 Subject: [PATCH 1/2] server instructions --- package.json | 2 +- src/lib/server.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2ac81a1..2f84513 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@angiejones/mcp-selenium", - "version": "0.2.1", + "version": "0.2.2", "description": "Selenium WebDriver MCP Server", "type": "module", "main": "src/lib/server.js", diff --git a/src/lib/server.js b/src/lib/server.js index b3cdb36..6a56693 100755 --- a/src/lib/server.js +++ b/src/lib/server.js @@ -19,7 +19,8 @@ const { version } = require('../../package.json'); const server = new McpServer({ name: "MCP Selenium", - version + version, + 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." }); // BiDi imports — loaded dynamically to avoid hard failures if not available @@ -436,7 +437,7 @@ server.registerTool( server.registerTool( "take_screenshot", { - description: "captures a screenshot of the current page", + 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.", inputSchema: { outputPath: z.string().optional().describe("Optional path where to save the screenshot. If not provided, returns an image/png content block.") } From 5e6b04af9fb61e64e4f982bcc1c597fa119a66e7 Mon Sep 17 00:00:00 2001 From: angiejones Date: Sun, 22 Feb 2026 18:19:39 -0600 Subject: [PATCH 2/2] address code review comments --- src/lib/server.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib/server.js b/src/lib/server.js index 6a56693..069a5e3 100755 --- a/src/lib/server.js +++ b/src/lib/server.js @@ -17,11 +17,10 @@ import { createRequire } from 'module'; const require = createRequire(import.meta.url); const { version } = require('../../package.json'); -const server = new McpServer({ - name: "MCP Selenium", - version, - 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." -}); +const server = new McpServer( + { name: "MCP Selenium", version }, + { 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." } +); // BiDi imports — loaded dynamically to avoid hard failures if not available let LogInspector, Network;