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
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -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. 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.",
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.")
442
442
}
@@ -500,7 +500,7 @@ server.registerTool(
500
500
server.registerTool(
501
501
"get_element_attribute",
502
502
{
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.",
504
504
inputSchema: {
505
505
...locatorSchema,
506
506
attribute: z.string().describe("Name of the attribute to get (e.g., 'href', 'value', 'class')")
@@ -527,7 +527,7 @@ server.registerTool(
527
527
server.registerTool(
528
528
"execute_script",
529
529
{
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.",
531
531
inputSchema: {
532
532
script: z.string().describe("JavaScript code to execute in the browser"),
533
533
args: z.array(z.any()).optional().describe("Optional arguments to pass to the script (accessible via arguments[0], arguments[1], etc.)")
0 commit comments