@tontoko/fast-playwright-mcp 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -23,7 +23,7 @@ import { expectationSchema } from "../schemas/expectation.js";
|
|
|
23
23
|
import { getErrorMessage } from "../utils/common-formatters.js";
|
|
24
24
|
var baseElementSchema = z.object({
|
|
25
25
|
element: z.string().optional().describe("Human-readable element description used to obtain permission to interact with the element"),
|
|
26
|
-
ref: z.string().optional().describe(
|
|
26
|
+
ref: z.string().optional().describe('System-generated element ID from previous tool results (e.g., "rNODE-45-1"). Never use custom values.')
|
|
27
27
|
});
|
|
28
28
|
var baseExpectationSchema = z.object({
|
|
29
29
|
expectation: expectationSchema
|
package/lib/tools/evaluate.js
CHANGED
|
@@ -26,7 +26,7 @@ import { generateLocator } from "./utils.js";
|
|
|
26
26
|
var evaluateSchema = z.object({
|
|
27
27
|
function: z.string().describe("() => { /* code */ } or (element) => { /* code */ } when element is provided"),
|
|
28
28
|
element: z.string().optional().describe("Human-readable element description used to obtain permission to interact with the element"),
|
|
29
|
-
ref: z.string().optional().describe(
|
|
29
|
+
ref: z.string().optional().describe('System-generated element ID from previous tool results (e.g., "rNODE-45-1"). Never use custom values.'),
|
|
30
30
|
expectation: expectationSchema
|
|
31
31
|
});
|
|
32
32
|
var evaluate = defineTabTool({
|
package/lib/tools/keyboard.js
CHANGED
|
@@ -51,7 +51,7 @@ var pressKey = defineTabTool({
|
|
|
51
51
|
});
|
|
52
52
|
var typeSchema = elementSchema.extend({
|
|
53
53
|
element: z.string().describe("Human-readable element description used to obtain permission to interact with the element"),
|
|
54
|
-
ref: z.string().describe(
|
|
54
|
+
ref: z.string().describe('System-generated element ID from previous tool results (e.g., "rNODE-45-1"). Never use custom values.'),
|
|
55
55
|
text: z.string().describe("Text to type into the element"),
|
|
56
56
|
submit: z.boolean().optional().describe("Whether to submit entered text (press Enter after)"),
|
|
57
57
|
slowly: z.boolean().optional().describe("Whether type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once."),
|
package/lib/tools/screenshot.js
CHANGED
|
@@ -27,7 +27,7 @@ var screenshotSchema = z.object({
|
|
|
27
27
|
type: z.enum(["png", "jpeg"]).default("png").describe("Image format for the screenshot. Default is png."),
|
|
28
28
|
filename: z.string().optional().describe("File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified."),
|
|
29
29
|
element: z.string().optional().describe("Human-readable element description used to obtain permission to screenshot the element. If not provided, the screenshot will be taken of viewport. If element is provided, ref must be provided too."),
|
|
30
|
-
ref: z.string().optional().describe(
|
|
30
|
+
ref: z.string().optional().describe('System-generated element ID from previous tool results (e.g., "rNODE-45-1"). Never use custom values. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too.'),
|
|
31
31
|
fullPage: z.boolean().optional().describe("When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots."),
|
|
32
32
|
expectation: expectationSchema
|
|
33
33
|
}).refine((data) => {
|
package/lib/tools/snapshot.js
CHANGED
|
@@ -47,7 +47,7 @@ var snapshot = defineTool({
|
|
|
47
47
|
});
|
|
48
48
|
var elementSchema = z.object({
|
|
49
49
|
element: z.string().describe("Human-readable element description used to obtain permission to interact with the element"),
|
|
50
|
-
ref: z.string().describe(
|
|
50
|
+
ref: z.string().describe('System-generated element ID from previous tool results (e.g., "rNODE-45-1"). Never use custom values.')
|
|
51
51
|
});
|
|
52
52
|
var clickSchema = elementSchema.extend({
|
|
53
53
|
doubleClick: z.boolean().optional().describe("Whether to perform a double click instead of a single click"),
|
|
@@ -93,9 +93,9 @@ var drag = defineTabTool({
|
|
|
93
93
|
description: `Perform drag and drop between two elements.expectation:{includeSnapshot:true,snapshotOptions:{selector:".drop-zone"}} to verify drop result.diffOptions:{enabled:true} shows only what moved.CONSIDER batch_execute if part of larger workflow.`,
|
|
94
94
|
inputSchema: z.object({
|
|
95
95
|
startElement: z.string().describe("Human-readable source element description used to obtain the permission to interact with the element"),
|
|
96
|
-
startRef: z.string().describe(
|
|
96
|
+
startRef: z.string().describe('System-generated source element ID from previous tool results (e.g., "rNODE-45-1"). Never use custom values.'),
|
|
97
97
|
endElement: z.string().describe("Human-readable target element description used to obtain the permission to interact with the element"),
|
|
98
|
-
endRef: z.string().describe(
|
|
98
|
+
endRef: z.string().describe('System-generated target element ID from previous tool results (e.g., "rNODE-45-1"). Never use custom values.'),
|
|
99
99
|
expectation: expectationSchema
|
|
100
100
|
}),
|
|
101
101
|
type: "destructive"
|