Skip to content

Commit 363ecf0

Browse files
authored
Merge pull request #66 from angiejones/accessibility-tip
discouraging use of screenshots for verification
2 parents 8d400ef + 69a1d64 commit 363ecf0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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.2",
3+
"version": "0.2.3",
44
"description": "Selenium WebDriver MCP Server",
55
"type": "module",
66
"main": "src/lib/server.js",

src/lib/server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ server.registerTool(
436436
server.registerTool(
437437
"take_screenshot",
438438
{
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.",
439+
description: "captures a screenshot of the current page. Prefer using the accessibility://current resource for understanding page content. Use get_element_text, get_element_attribute, or execute_script to verify element state. Only use screenshots when visual layout or styling needs to be verified.",
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
}
@@ -500,7 +500,7 @@ server.registerTool(
500500
server.registerTool(
501501
"get_element_attribute",
502502
{
503-
description: "gets the value of an attribute on an element",
503+
description: "gets the value of an attribute on an element. Use this to verify element state. Prefer this over screenshots for validation.",
504504
inputSchema: {
505505
...locatorSchema,
506506
attribute: z.string().describe("Name of the attribute to get (e.g., 'href', 'value', 'class')")
@@ -527,7 +527,7 @@ server.registerTool(
527527
server.registerTool(
528528
"execute_script",
529529
{
530-
description: "executes JavaScript in the browser and returns the result. Use for advanced interactions not covered by other tools (e.g., drag and drop, scrolling, reading computed styles, manipulating the DOM directly).",
530+
description: "executes JavaScript in the browser and returns the result. Use for advanced interactions not covered by other tools (e.g., drag and drop, scrolling, reading computed styles, manipulating the DOM directly). Also useful for batch-reading multiple element values/states in a single call instead of multiple get_element_attribute calls.",
531531
inputSchema: {
532532
script: z.string().describe("JavaScript code to execute in the browser"),
533533
args: z.array(z.any()).optional().describe("Optional arguments to pass to the script (accessible via arguments[0], arguments[1], etc.)")

0 commit comments

Comments
 (0)