Skip to content

Commit 8d400ef

Browse files
authored
Merge pull request #65 from angiejones/accessibility-tip
server instructions
2 parents 1f879d7 + 5e6b04a commit 8d400ef

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angiejones/mcp-selenium",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "Selenium WebDriver MCP Server",
55
"type": "module",
66
"main": "src/lib/server.js",

src/lib/server.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ import { createRequire } from 'module';
1717
const require = createRequire(import.meta.url);
1818
const { version } = require('../../package.json');
1919

20-
const server = new McpServer({
21-
name: "MCP Selenium",
22-
version
23-
});
20+
const server = new McpServer(
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+
);
2424

2525
// BiDi imports — loaded dynamically to avoid hard failures if not available
2626
let LogInspector, Network;
@@ -436,7 +436,7 @@ server.registerTool(
436436
server.registerTool(
437437
"take_screenshot",
438438
{
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.",
440440
inputSchema: {
441441
outputPath: z.string().optional().describe("Optional path where to save the screenshot. If not provided, returns an image/png content block.")
442442
}

0 commit comments

Comments
 (0)