@uuv/mcp-server 0.3.0 → 0.4.1

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.
package/README.md CHANGED
@@ -7,38 +7,6 @@ This library is an MCP (Model Context Protocol) server for UUV - a solution to f
7
7
  - Opencode, Claude Desktop, Goose or any other MCP client
8
8
  - [Playwright MCP Server](https://github.com/microsoft/playwright-mcp)
9
9
 
10
- ## Exposed MCP Tools
11
-
12
- This MCP server exposes the following tools:
13
-
14
- ### retrieve_prompt
15
- - **Description**: Retrieve a uuv prompt template for a coding agent based on a prompt name and arguments.
16
- - **Input Schema**:
17
- - `promptName` (enum): Either "generate_table" or "generate_role_and_name"
18
- - `baseUrl` (string): The base URL of the page
19
- - For generate_role_and_name:
20
- - `accessibleName` (string, optional): Accessible name
21
- - `accessibleRole` (string, optional): Accessible role
22
-
23
- ### available_sentences
24
- - **Description**: List all available UUV test sentences/phrases in Gherkin format.
25
- - **Input Schema**:
26
- - `category` (enum, optional): Filters sentences by action type (general, keyboard, click, contains, type, checkable)
27
- - `role` (string, optional): Filters sentences related to an accessible role
28
-
29
- ### generate_role_and_name
30
- - **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence of an element with specified accessible name and role.
31
- - **Input Schema**:
32
- - `baseUrl` (string): The base URL of the page where the element is located
33
- - `accessibleName` (string): Accessible name of the element
34
- - `accessibleRole` (string): Accessible role of the element
35
-
36
- ### generate_table
37
- - **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence and content of html table, grid or treegrid.
38
- - **Input Schema**:
39
- - `baseUrl` (string): The base URL of the page where the table/grid/treegrid is located
40
- - `innerHtmlFilePath` (string): File path containing the raw innerHTML content
41
-
42
10
  ## Getting started
43
11
 
44
12
  First, install the UUV MCP server with your client.
@@ -119,3 +87,104 @@ gemini extensions uninstall uuv-e2e-accessibility-test
119
87
  ```
120
88
 
121
89
  </details>
90
+
91
+ ## Exposed MCP Tools
92
+
93
+ This MCP server exposes the following tools:
94
+
95
+ ### retrieve_prompt
96
+ - **Description**: Retrieve an uuv prompt template for a coding agent based on a prompt name and arguments.
97
+ - **Input Schema**:
98
+ - `promptName` (enum): Either `generate_test_expect_table`, `generate_test_expect_element`, `generate_test_click_element`, `generate_test_within_element` or `generate_test_type_element`
99
+ - `baseUrl` (string): The base URL of the page
100
+ - For `generate_test_expect_table`, `generate_test_expect_element`, `generate_test_click_element`, `generate_test_within_element` or `generate_test_type_element`:
101
+ - `accessibleName`: (string, optional): Accessible name
102
+ - `accessibleRole`: (string, optional): Accessible role
103
+ - `domSelector`: Dom selector of the element
104
+
105
+ ### available_sentences
106
+ - **Description**: List all available UUV test sentences/phrases in Gherkin format.
107
+ - **Input Schema**:
108
+ - `category` (enum, optional): Filters sentences by action type (general, keyboard, click, contains, type, checkable)
109
+ - `role` (string, optional): Filters sentences related to an accessible role
110
+
111
+ ### generate_test_expect_element
112
+ - **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence of an element with specified (role and name) or domSelector.
113
+ - **Input Schema**:
114
+ - `baseUrl` (string): The base URL of the page where the element is located
115
+ - `accessibleName` (string): Accessible name of the element
116
+ - `accessibleRole` (string): Accessible role of the element
117
+ - `domSelector`: Dom selector of the element
118
+
119
+ ### generate_test_expect_element
120
+ - **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence of an element with specified (role and name) or domSelector.
121
+ - **Input Schema**:
122
+ - `baseUrl` (string): The base URL of the page where the element is located
123
+ - `accessibleName` (string): Accessible name of the element
124
+ - `accessibleRole` (string): Accessible role of the element
125
+ - `domSelector`: Dom selector of the element
126
+
127
+ ### generate_test_click_element
128
+ - **Description**: Generate a complete UUV test scenario (Gherkin format) that clicks on html element with specified (role and name) or domSelector.
129
+ - **Input Schema**:
130
+ - `baseUrl` (string): The base URL of the page where the element is located
131
+ - `accessibleName` (string): Accessible name of the element
132
+ - `accessibleRole` (string): Accessible role of the element
133
+ - `domSelector`: Dom selector of the element
134
+
135
+ ### generate_test_type_element
136
+ - **Description**: Generate a complete UUV test scenario (Gherkin format) that focus within a html element with specified (role and name) or domSelector.
137
+ - **Input Schema**:
138
+ - `baseUrl` (string): The base URL of the page where the element is located
139
+ - `accessibleName` (string): Accessible name of the element
140
+ - `accessibleRole` (string): Accessible role of the element
141
+ - `domSelector`: Dom selector of the element
142
+
143
+ ### generate_test_expect_table
144
+ - **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence and content of html table, grid or treegrid.
145
+ - **Input Schema**:
146
+ - `baseUrl` (string): The base URL of the page where the table/grid/treegrid is located
147
+ - `innerHtmlFilePath` (string): File path containing the raw innerHTML content
148
+
149
+
150
+ ## Exposed MCP Prompts
151
+
152
+ This MCP server exposes the following prompts:
153
+
154
+ ### generate_test_expect_element
155
+ - **Description**: Returns UUV prompt to verify the presence of an element with specified (role and name) or domSelector.
156
+ - **Input Schema**:
157
+ - `baseUrl` (string): The base URL of the page where the element is located
158
+ - `accessibleName` (string): Accessible name of the element
159
+ - `accessibleRole` (string): Accessible role of the element
160
+ - `domSelector`: Dom selector of the element
161
+
162
+ ### generate_test_expect_element
163
+ - **Description**: Returns UUV prompt to verify the presence of an element with specified (role and name) or domSelector.
164
+ - **Input Schema**:
165
+ - `baseUrl` (string): The base URL of the page where the element is located
166
+ - `accessibleName` (string): Accessible name of the element
167
+ - `accessibleRole` (string): Accessible role of the element
168
+ - `domSelector`: Dom selector of the element
169
+
170
+ ### generate_test_click_element
171
+ - **Description**: Returns UUV prompt that clicks on html element with specified (role and name) or domSelector.
172
+ - **Input Schema**:
173
+ - `baseUrl` (string): The base URL of the page where the element is located
174
+ - `accessibleName` (string): Accessible name of the element
175
+ - `accessibleRole` (string): Accessible role of the element
176
+ - `domSelector`: Dom selector of the element
177
+
178
+ ### generate_test_type_element
179
+ - **Description**: Returns UUV prompt that focus within a html element with specified (role and name) or domSelector.
180
+ - **Input Schema**:
181
+ - `baseUrl` (string): The base URL of the page where the element is located
182
+ - `accessibleName` (string): Accessible name of the element
183
+ - `accessibleRole` (string): Accessible role of the element
184
+ - `domSelector`: Dom selector of the element
185
+
186
+ ### generate_test_expect_table
187
+ - **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence and content of html table, grid or treegrid.
188
+ - **Input Schema**:
189
+ - `baseUrl` (string): The base URL of the page where the table/grid/treegrid is located
190
+ - `innerHtmlFilePath` (string): File path containing the raw innerHTML content
package/dist/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ # [0.4.0](https://github.com/e2e-test-quest/uuv/compare/mcp-server-v0.3.0...mcp-server-v0.4.0) (2025-12-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **mcp-server:** correct type prompt template ([114e817](https://github.com/e2e-test-quest/uuv/commit/114e81791991df8919150c26b566ceaedea0e013))
7
+
8
+
9
+ ### Features
10
+
11
+ * **mcp-server:** add mcp prompts, [#1171](https://github.com/e2e-test-quest/uuv/issues/1171) ([4e7eb52](https://github.com/e2e-test-quest/uuv/commit/4e7eb521ae73cb5e3de095a8cb917f17ebb0c6bb))
12
+
13
+ # [0.3.0](https://github.com/e2e-test-quest/uuv/compare/mcp-server-v0.2.0...mcp-server-v0.3.0) (2025-11-30)
14
+
15
+
16
+ ### Features
17
+
18
+ * **mcp-server:** add claude code plugin, [#1168](https://github.com/e2e-test-quest/uuv/issues/1168) ([8b00804](https://github.com/e2e-test-quest/uuv/commit/8b00804aaeea87b4385e16b5dbdfa01a10319db0))
19
+ * **mcp-server:** add gemini extension, [#1166](https://github.com/e2e-test-quest/uuv/issues/1166) ([b1ee07b](https://github.com/e2e-test-quest/uuv/commit/b1ee07bcf6236fd9c5b0ee8cc30ae786b19fe1b1))
20
+
1
21
  # [0.2.0](https://github.com/e2e-test-quest/uuv/compare/mcp-server-v0.1.3...mcp-server-v0.2.0) (2025-11-30)
2
22
 
3
23
 
package/dist/README.md CHANGED
@@ -7,38 +7,6 @@ This library is an MCP (Model Context Protocol) server for UUV - a solution to f
7
7
  - Opencode, Claude Desktop, Goose or any other MCP client
8
8
  - [Playwright MCP Server](https://github.com/microsoft/playwright-mcp)
9
9
 
10
- ## Exposed MCP Tools
11
-
12
- This MCP server exposes the following tools:
13
-
14
- ### retrieve_prompt
15
- - **Description**: Retrieve a uuv prompt template for a coding agent based on a prompt name and arguments.
16
- - **Input Schema**:
17
- - `promptName` (enum): Either "generate_table" or "generate_role_and_name"
18
- - `baseUrl` (string): The base URL of the page
19
- - For generate_role_and_name:
20
- - `accessibleName` (string, optional): Accessible name
21
- - `accessibleRole` (string, optional): Accessible role
22
-
23
- ### available_sentences
24
- - **Description**: List all available UUV test sentences/phrases in Gherkin format.
25
- - **Input Schema**:
26
- - `category` (enum, optional): Filters sentences by action type (general, keyboard, click, contains, type, checkable)
27
- - `role` (string, optional): Filters sentences related to an accessible role
28
-
29
- ### generate_role_and_name
30
- - **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence of an element with specified accessible name and role.
31
- - **Input Schema**:
32
- - `baseUrl` (string): The base URL of the page where the element is located
33
- - `accessibleName` (string): Accessible name of the element
34
- - `accessibleRole` (string): Accessible role of the element
35
-
36
- ### generate_table
37
- - **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence and content of html table, grid or treegrid.
38
- - **Input Schema**:
39
- - `baseUrl` (string): The base URL of the page where the table/grid/treegrid is located
40
- - `innerHtmlFilePath` (string): File path containing the raw innerHTML content
41
-
42
10
  ## Getting started
43
11
 
44
12
  First, install the UUV MCP server with your client.
@@ -119,3 +87,104 @@ gemini extensions uninstall uuv-e2e-accessibility-test
119
87
  ```
120
88
 
121
89
  </details>
90
+
91
+ ## Exposed MCP Tools
92
+
93
+ This MCP server exposes the following tools:
94
+
95
+ ### retrieve_prompt
96
+ - **Description**: Retrieve an uuv prompt template for a coding agent based on a prompt name and arguments.
97
+ - **Input Schema**:
98
+ - `promptName` (enum): Either `generate_test_expect_table`, `generate_test_expect_element`, `generate_test_click_element`, `generate_test_within_element` or `generate_test_type_element`
99
+ - `baseUrl` (string): The base URL of the page
100
+ - For `generate_test_expect_table`, `generate_test_expect_element`, `generate_test_click_element`, `generate_test_within_element` or `generate_test_type_element`:
101
+ - `accessibleName`: (string, optional): Accessible name
102
+ - `accessibleRole`: (string, optional): Accessible role
103
+ - `domSelector`: Dom selector of the element
104
+
105
+ ### available_sentences
106
+ - **Description**: List all available UUV test sentences/phrases in Gherkin format.
107
+ - **Input Schema**:
108
+ - `category` (enum, optional): Filters sentences by action type (general, keyboard, click, contains, type, checkable)
109
+ - `role` (string, optional): Filters sentences related to an accessible role
110
+
111
+ ### generate_test_expect_element
112
+ - **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence of an element with specified (role and name) or domSelector.
113
+ - **Input Schema**:
114
+ - `baseUrl` (string): The base URL of the page where the element is located
115
+ - `accessibleName` (string): Accessible name of the element
116
+ - `accessibleRole` (string): Accessible role of the element
117
+ - `domSelector`: Dom selector of the element
118
+
119
+ ### generate_test_expect_element
120
+ - **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence of an element with specified (role and name) or domSelector.
121
+ - **Input Schema**:
122
+ - `baseUrl` (string): The base URL of the page where the element is located
123
+ - `accessibleName` (string): Accessible name of the element
124
+ - `accessibleRole` (string): Accessible role of the element
125
+ - `domSelector`: Dom selector of the element
126
+
127
+ ### generate_test_click_element
128
+ - **Description**: Generate a complete UUV test scenario (Gherkin format) that clicks on html element with specified (role and name) or domSelector.
129
+ - **Input Schema**:
130
+ - `baseUrl` (string): The base URL of the page where the element is located
131
+ - `accessibleName` (string): Accessible name of the element
132
+ - `accessibleRole` (string): Accessible role of the element
133
+ - `domSelector`: Dom selector of the element
134
+
135
+ ### generate_test_type_element
136
+ - **Description**: Generate a complete UUV test scenario (Gherkin format) that focus within a html element with specified (role and name) or domSelector.
137
+ - **Input Schema**:
138
+ - `baseUrl` (string): The base URL of the page where the element is located
139
+ - `accessibleName` (string): Accessible name of the element
140
+ - `accessibleRole` (string): Accessible role of the element
141
+ - `domSelector`: Dom selector of the element
142
+
143
+ ### generate_test_expect_table
144
+ - **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence and content of html table, grid or treegrid.
145
+ - **Input Schema**:
146
+ - `baseUrl` (string): The base URL of the page where the table/grid/treegrid is located
147
+ - `innerHtmlFilePath` (string): File path containing the raw innerHTML content
148
+
149
+
150
+ ## Exposed MCP Prompts
151
+
152
+ This MCP server exposes the following prompts:
153
+
154
+ ### generate_test_expect_element
155
+ - **Description**: Returns UUV prompt to verify the presence of an element with specified (role and name) or domSelector.
156
+ - **Input Schema**:
157
+ - `baseUrl` (string): The base URL of the page where the element is located
158
+ - `accessibleName` (string): Accessible name of the element
159
+ - `accessibleRole` (string): Accessible role of the element
160
+ - `domSelector`: Dom selector of the element
161
+
162
+ ### generate_test_expect_element
163
+ - **Description**: Returns UUV prompt to verify the presence of an element with specified (role and name) or domSelector.
164
+ - **Input Schema**:
165
+ - `baseUrl` (string): The base URL of the page where the element is located
166
+ - `accessibleName` (string): Accessible name of the element
167
+ - `accessibleRole` (string): Accessible role of the element
168
+ - `domSelector`: Dom selector of the element
169
+
170
+ ### generate_test_click_element
171
+ - **Description**: Returns UUV prompt that clicks on html element with specified (role and name) or domSelector.
172
+ - **Input Schema**:
173
+ - `baseUrl` (string): The base URL of the page where the element is located
174
+ - `accessibleName` (string): Accessible name of the element
175
+ - `accessibleRole` (string): Accessible role of the element
176
+ - `domSelector`: Dom selector of the element
177
+
178
+ ### generate_test_type_element
179
+ - **Description**: Returns UUV prompt that focus within a html element with specified (role and name) or domSelector.
180
+ - **Input Schema**:
181
+ - `baseUrl` (string): The base URL of the page where the element is located
182
+ - `accessibleName` (string): Accessible name of the element
183
+ - `accessibleRole` (string): Accessible role of the element
184
+ - `domSelector`: Dom selector of the element
185
+
186
+ ### generate_test_expect_table
187
+ - **Description**: Generate a complete UUV test scenario (Gherkin format) to verify the presence and content of html table, grid or treegrid.
188
+ - **Input Schema**:
189
+ - `baseUrl` (string): The base URL of the page where the table/grid/treegrid is located
190
+ - `innerHtmlFilePath` (string): File path containing the raw innerHTML content
@@ -39,6 +39,78 @@ function createUUVServer() {
39
39
  accessibleRole: zod_1.z.string().optional().describe("Accessible role of the element"),
40
40
  domSelector: zod_1.z.string().optional().describe("Dom selector of the element"),
41
41
  };
42
+ server.registerPrompt(prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE, {
43
+ title: prompt_retriever_service_1.uuvPrompts[prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE].title,
44
+ description: prompt_retriever_service_1.uuvPrompts[prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE].description,
45
+ argsSchema: {
46
+ baseUrl: zod_1.z.string().describe("The base URL of the page where the table/grid/treegrid is located."),
47
+ },
48
+ }, ({ ...args }) => ({
49
+ messages: [
50
+ {
51
+ role: "assistant",
52
+ content: {
53
+ type: "text",
54
+ text: prompt_retriever_service_1.PromptRetrieverService.retrievePrompt({
55
+ promptName: prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE,
56
+ ...args
57
+ }),
58
+ },
59
+ },
60
+ ],
61
+ }));
62
+ [
63
+ prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT,
64
+ prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT,
65
+ prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT
66
+ ].forEach((promptName) => {
67
+ server.registerPrompt(promptName, {
68
+ title: prompt_retriever_service_1.uuvPrompts[promptName].title,
69
+ description: prompt_retriever_service_1.uuvPrompts[promptName].description,
70
+ argsSchema: {
71
+ baseUrl: zod_1.z.string().describe("The base URL of the page where the table/grid/treegrid is located."),
72
+ accessibleName: zod_1.z.string().optional().describe("Accessible name of the element"),
73
+ accessibleRole: zod_1.z.string().optional().describe("Accessible role of the element"),
74
+ domSelector: zod_1.z.string().optional().describe("Dom selector of the element")
75
+ }
76
+ }, ({ ...args }) => ({
77
+ messages: [
78
+ {
79
+ role: "assistant",
80
+ content: {
81
+ type: "text",
82
+ text: prompt_retriever_service_1.PromptRetrieverService.retrievePrompt({
83
+ promptName,
84
+ ...args
85
+ })
86
+ }
87
+ }
88
+ ]
89
+ }));
90
+ });
91
+ server.registerPrompt(prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT, {
92
+ title: prompt_retriever_service_1.uuvPrompts[prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT].title,
93
+ description: prompt_retriever_service_1.uuvPrompts[prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT].description,
94
+ argsSchema: {
95
+ baseUrl: zod_1.z.string().describe("The base URL of the page where the table/grid/treegrid is located."),
96
+ accessibleName: zod_1.z.string().optional().describe("Accessible name of the element"),
97
+ accessibleRole: zod_1.z.string().optional().describe("Accessible role of the element"),
98
+ domSelector: zod_1.z.string().optional().describe("Dom selector of the element")
99
+ }
100
+ }, ({ ...args }) => ({
101
+ messages: [
102
+ {
103
+ role: "assistant",
104
+ content: {
105
+ type: "text",
106
+ text: prompt_retriever_service_1.PromptRetrieverService.retrievePrompt({
107
+ promptName: prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT,
108
+ ...args
109
+ })
110
+ }
111
+ }
112
+ ]
113
+ }));
42
114
  server.registerTool("retrieve_prompt", {
43
115
  title: "Retrieve uuv prompt",
44
116
  description: "Retrieve a uuv prompt template for a coding agent based on a prompt name and arguments.",
@@ -47,12 +119,14 @@ function createUUVServer() {
47
119
  prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE,
48
120
  prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT,
49
121
  prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT,
122
+ prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT,
123
+ prompt_retriever_service_1.UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT
50
124
  ]),
51
125
  baseUrl: zod_1.z.string().describe("The base URL of the page"),
52
126
  // generate_test_* Fields
53
- accessibleName: zod_1.z.string().optional().describe("Accessible name (required for generate_role_and_name)"),
54
- accessibleRole: zod_1.z.string().optional().describe("Accessible role (required for generate_role_and_name)"),
55
- domSelector: zod_1.z.string().optional().describe("Dom selector of the element"),
127
+ accessibleName: zod_1.z.string().optional().describe("Accessible name"),
128
+ accessibleRole: zod_1.z.string().optional().describe("Accessible role"),
129
+ domSelector: zod_1.z.string().optional().describe("Dom selector of the target element")
56
130
  },
57
131
  }, async ({ ...args }) => {
58
132
  return {
@@ -89,7 +163,7 @@ function createUUVServer() {
89
163
  };
90
164
  });
91
165
  server.registerTool("generate_test_expect_element", {
92
- title: "Generate test that expects of html element with role and name",
166
+ title: "Generate test that expects of html element with (role and name) or domSelector",
93
167
  description:
94
168
  // eslint-disable-next-line max-len
95
169
  "Generate a complete UUV test scenario (Gherkin format) to verify the presence of an element with specified accessible name and role or domSelector. Use this when the user asks to create/write/generate a UUV scenario or test for checking element visibility. DON'T USE IF ACCESSIBLE ROLE IS grid, treegrid, table, or form",
@@ -101,7 +175,7 @@ function createUUVServer() {
101
175
  return handleElementTestGeneration({ serviceType: expect_service_1.ElementServiceType.EXPECT, baseUrl, accessibleName, accessibleRole, domSelector });
102
176
  });
103
177
  server.registerTool("generate_test_click_element", {
104
- title: "Generate test that clicks on html element with role and name",
178
+ title: "Generate test that clicks on html element with (role and name) or domSelector",
105
179
  description:
106
180
  // eslint-disable-next-line max-len
107
181
  "Generate a complete UUV test scenario (Gherkin format) to click on an element with specified accessible name and role or domSelector. Use this when the user asks to create/write/generate a UUV scenario or test for checking element visibility. DON'T USE IF ACCESSIBLE ROLE IS grid, treegrid, table, or form",
@@ -110,7 +184,7 @@ function createUUVServer() {
110
184
  return handleElementTestGeneration({ serviceType: expect_service_1.ElementServiceType.CLICK, baseUrl, accessibleName, accessibleRole, domSelector });
111
185
  });
112
186
  server.registerTool("generate_test_within_element", {
113
- title: "Generate test that focus within an html element with role and name",
187
+ title: "Generate test that focus within an html element with (role and name) or domSelector",
114
188
  description:
115
189
  // eslint-disable-next-line max-len
116
190
  "Generate a complete UUV test scenario (Gherkin format) that focus within an html element with specified accessible name and role or domSelector. Use this when the user asks to create/write/generate a UUV scenario or test for checking element visibility. DON'T USE IF ACCESSIBLE ROLE IS grid, treegrid, table, or form",
@@ -119,7 +193,7 @@ function createUUVServer() {
119
193
  return handleElementTestGeneration({ serviceType: expect_service_1.ElementServiceType.WITHIN, baseUrl, accessibleName, accessibleRole, domSelector });
120
194
  });
121
195
  server.registerTool("generate_test_type_element", {
122
- title: "Generate test that types a value into html element with role and name",
196
+ title: "Generate test that types a value into html element with (role and name) or domSelector",
123
197
  description:
124
198
  // eslint-disable-next-line max-len
125
199
  "Generate a complete UUV test scenario (Gherkin format) that types a value into an html element with specified accessible name and role or domSelector. Use this when the user asks to create/write/generate a UUV scenario or test for checking element visibility. DON'T USE IF ACCESSIBLE ROLE IS grid, treegrid, table, or form",
@@ -0,0 +1,8 @@
1
+ Use UUV and Filesystem MCP tools:
2
+ {{#domSelector}}
3
+ 1. With uuv_generate_test_click_element, Generate UUV tests into ./uuv/e2e to click on an element with domSelector "{{{domSelector}}}" exist on the webpage {{{baseUrl}}}
4
+ {{/domSelector}}
5
+ {{^domSelector}}
6
+ 1. With uuv_generate_test_click_element, Generate UUV tests into ./uuv/e2e to click on an element with accessibleName "{{accessibleName}}" and accessibleRole "{{accessibleRole}}" exist on the webpage {{{baseUrl}}}
7
+ {{/domSelector}}
8
+ 2. Write generated uuv test case into a .feature file in local folder ./uuv/e2e (must use actual line breaks, not literal "\n" characters)
@@ -0,0 +1,8 @@
1
+ Use UUV and Filesystem MCP tools:
2
+ {{#domSelector}}
3
+ 1. With uuv_generate_test_expect_element, Generate UUV tests into ./uuv/e2e to verify that an element with domSelector "{{{domSelector}}}" exist on the webpage {{{baseUrl}}}
4
+ {{/domSelector}}
5
+ {{^domSelector}}
6
+ 1. With uuv_generate_test_expect_element, Generate UUV tests into ./uuv/e2e to verify that an element with accessibleName "{{accessibleName}}" and accessibleRole "{{accessibleRole}}" exist on the webpage {{{baseUrl}}}
7
+ {{/domSelector}}
8
+ 2. Write generated uuv test case into a .feature file in local folder ./uuv/e2e (must use actual line breaks, not literal "\n" characters)
@@ -0,0 +1,9 @@
1
+ Use the Playwright and UUV MCP tools:
2
+ 1. Open a browser, then navigate to {{{baseUrl}}}
3
+ 2. Evaluate exactly, ensuring that the extracted HTML is not truncated: document.querySelector('table').outerHTML
4
+ 3. Write resulting HTML of the previous step into a file named extraction.html in the current project directory
5
+ 4. With uuv_generate_Table, Generate UUV tests into ./uuv/e2e to verify the html table with absolute path /workspaces/opensource/weather-app/extraction.html
6
+ 5. Write generated uuv test into a .feature file in local folder ./uuv/e2e (must use actual line breaks, not literal "\n" characters)
7
+
8
+ IMPORTANT:
9
+ - When Playwright returns the result, ignore any console logs or debug lines.
@@ -0,0 +1,8 @@
1
+ Use UUV and Filesystem MCP tools:
2
+ {{#domSelector}}
3
+ 1. With uuv_generate_test_type_element, Generate UUV tests into ./uuv/e2e to type sentence or value into an element with domSelector "{{{domSelector}}}" exist on the webpage {{{baseUrl}}}
4
+ {{/domSelector}}
5
+ {{^domSelector}}
6
+ 1. With uuv_generate_test_type_element, Generate UUV tests into ./uuv/e2e to type sentence or value into an element with accessibleName "{{accessibleName}}" and accessibleRole "{{accessibleRole}}" exist on the webpage {{{baseUrl}}}
7
+ {{/domSelector}}
8
+ 2. Write generated uuv test case into a .feature file in local folder ./uuv/e2e (must use actual line breaks, not literal "\n" characters)
@@ -0,0 +1,8 @@
1
+ Use UUV and Filesystem MCP tools:
2
+ {{#domSelector}}
3
+ 1. With uuv_generate_test_within_element, Generate UUV tests into ./uuv/e2e to focus on an element with domSelector "{{{domSelector}}}" exist on the webpage {{{baseUrl}}}
4
+ {{/domSelector}}
5
+ {{^domSelector}}
6
+ 1. With uuv_generate_test_within_element, Generate UUV tests into ./uuv/e2e to focus on an element with accessibleName "{{accessibleName}}" and accessibleRole "{{accessibleRole}}" exist on the webpage {{{baseUrl}}}
7
+ {{/domSelector}}
8
+ 2. Write generated uuv test case into a .feature file in local folder ./uuv/e2e (must use actual line breaks, not literal "\n" characters)
@@ -1,3 +1,4 @@
1
+ import { z } from "zod";
1
2
  type PromptExtraArgs = Record<string, any>;
2
3
  export type PromptArgs = {
3
4
  promptName: UUV_PROMPT;
@@ -9,6 +10,43 @@ export declare enum UUV_PROMPT {
9
10
  GENERATE_TEST_WITHIN_ELEMENT = "generate_test_within_element",
10
11
  GENERATE_TEST_TYPE_ELEMENT = "generate_test_type_element"
11
12
  }
13
+ export declare const uuvPrompts: {
14
+ generate_test_expect_table: {
15
+ title: string;
16
+ description: string;
17
+ };
18
+ generate_test_expect_element: {
19
+ title: string;
20
+ description: string;
21
+ };
22
+ generate_test_click_element: {
23
+ title: string;
24
+ description: string;
25
+ };
26
+ generate_test_within_element: {
27
+ title: string;
28
+ description: string;
29
+ };
30
+ generate_test_type_element: {
31
+ title: string;
32
+ description: string;
33
+ };
34
+ };
35
+ export declare const UUVPromptInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
36
+ promptName: z.ZodLiteral<UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE>;
37
+ baseUrl: z.ZodString;
38
+ }, z.core.$strip>, z.ZodObject<{
39
+ promptName: z.ZodEnum<{
40
+ generate_test_expect_element: UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT;
41
+ generate_test_click_element: UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT;
42
+ generate_test_within_element: UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT;
43
+ generate_test_type_element: UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT;
44
+ }>;
45
+ baseUrl: z.ZodString;
46
+ accessibleName: z.ZodOptional<z.ZodString>;
47
+ accessibleRole: z.ZodOptional<z.ZodString>;
48
+ domSelector: z.ZodOptional<z.ZodString>;
49
+ }, z.core.$strip>], "promptName">;
12
50
  export declare class PromptRetrieverService {
13
51
  private static loadPromptTemplate;
14
52
  private static generatePrompt;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PromptRetrieverService = exports.UUV_PROMPT = void 0;
3
+ exports.PromptRetrieverService = exports.UUVPromptInputSchema = exports.uuvPrompts = exports.UUV_PROMPT = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const path = tslib_1.__importStar(require("node:path"));
6
6
  const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
@@ -14,6 +14,60 @@ var UUV_PROMPT;
14
14
  UUV_PROMPT["GENERATE_TEST_WITHIN_ELEMENT"] = "generate_test_within_element";
15
15
  UUV_PROMPT["GENERATE_TEST_TYPE_ELEMENT"] = "generate_test_type_element";
16
16
  })(UUV_PROMPT || (exports.UUV_PROMPT = UUV_PROMPT = {}));
17
+ exports.uuvPrompts = {
18
+ [UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE]: {
19
+ title: "GenerateTestExpectTable",
20
+ description: "Prompt to generate test for html table or grid or treeGrid"
21
+ },
22
+ [UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT]: {
23
+ title: "GenerateTestExpectElement",
24
+ description: "Prompt to generate test that expects of html element with (role and name) or domSelector"
25
+ },
26
+ [UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT]: {
27
+ title: "GenerateTestClickElement",
28
+ description: "Prompt to generate test that clicks on html element with (role and name) or domSelector"
29
+ },
30
+ [UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT]: {
31
+ title: "GenerateTestWithinElement",
32
+ description: "Prompt to generate test that focus within an html element with (role and name) or domSelector"
33
+ },
34
+ [UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT]: {
35
+ title: "GenerateTestTypeElement",
36
+ description: "Prompt to generate test that types a value into html element with (role and name) or domSelector"
37
+ }
38
+ };
39
+ exports.UUVPromptInputSchema = zod_1.z.discriminatedUnion("promptName", [
40
+ zod_1.z.object({
41
+ promptName: zod_1.z.literal(UUV_PROMPT.GENERATE_TEST_EXPECT_TABLE),
42
+ baseUrl: zod_1.z.string().describe("The base URL of the page where the table/grid/treegrid is located."),
43
+ }),
44
+ zod_1.z.object({
45
+ promptName: zod_1.z.enum([
46
+ UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT,
47
+ UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT,
48
+ UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT,
49
+ UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT
50
+ ]),
51
+ baseUrl: zod_1.z.string().describe("The base URL of the page where the element is located."),
52
+ accessibleName: zod_1.z.string().optional().describe("Accessible name of the element"),
53
+ accessibleRole: zod_1.z.string().optional().describe("Accessible role of the element"),
54
+ domSelector: zod_1.z.string().optional().describe("Dom selector of the element"),
55
+ }),
56
+ ]).superRefine((data, ctx) => {
57
+ if (data.promptName === UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT ||
58
+ data.promptName === UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT ||
59
+ data.promptName === UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT ||
60
+ data.promptName === UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT) {
61
+ const hasAccessibleSelector = data.accessibleRole && data.accessibleName;
62
+ const hasDomSelector = data.domSelector;
63
+ if (!hasAccessibleSelector && !hasDomSelector) {
64
+ ctx.addIssue({
65
+ code: zod_1.z.ZodIssueCode.custom,
66
+ message: "You must provide either (accessibleRole AND accessibleName) or domSelector",
67
+ });
68
+ }
69
+ }
70
+ });
17
71
  class PromptRetrieverService {
18
72
  static loadPromptTemplate(promptName) {
19
73
  const templatePath = path.join(__dirname, "..", "prompts", `${promptName}.mustache`);
@@ -40,9 +94,13 @@ class PromptRetrieverService {
40
94
  accessibleName: zod_1.z.string().optional().describe("Accessible name of the element"),
41
95
  accessibleRole: zod_1.z.string().optional().describe("Accessible role of the element"),
42
96
  domSelector: zod_1.z.string().optional().describe("Dom selector of the element"),
43
- }),
97
+ // valueToType: z.string().describe("Value to type"), TODO: implement this arg for UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT
98
+ })
44
99
  ]).superRefine((data, ctx) => {
45
- if (data.promptName === UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT || data.promptName === UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT) {
100
+ if (data.promptName === UUV_PROMPT.GENERATE_TEST_EXPECT_ELEMENT ||
101
+ data.promptName === UUV_PROMPT.GENERATE_TEST_CLICK_ELEMENT ||
102
+ data.promptName === UUV_PROMPT.GENERATE_TEST_WITHIN_ELEMENT ||
103
+ data.promptName === UUV_PROMPT.GENERATE_TEST_TYPE_ELEMENT) {
46
104
  const hasAccessibleSelector = data.accessibleRole && data.accessibleName;
47
105
  const hasDomSelector = data.domSelector;
48
106
  if (!hasAccessibleSelector && !hasDomSelector) {
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uuv/mcp-server",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "A Model Context Protocol (MCP) server for UUV - a solution to facilitate the writing and execution of E2E tests understandable by any human being(English or French) using cucumber(BDD) and cypress or playwright.",
5
5
  "author": "Louis Fredice NJAKO MOLOM (https://github.com/luifr10) & Stanley SERVICAL (https://github.com/stanlee974)",
6
6
  "license": "MIT",
@@ -42,6 +42,7 @@
42
42
  "start": "ts-node src/lib/mcp-server.ts",
43
43
  "inspector": "npx @modelcontextprotocol/inspector --config test-mcp.json --server default-server",
44
44
  "lint": "npx eslint . --ext .js,.ts,.feature --fix",
45
+ "build-copy-prompt-templates": "copyfiles -u 1 \"src/lib/prompts/**/*\" dist",
45
46
  "tests": "jest --coverage --config=./jest.config.ts",
46
47
  "package": "npm pack --pack-destination=\"../../dist/packages\""
47
48
  },
@@ -56,7 +57,7 @@
56
57
  }
57
58
  },
58
59
  "dependencies": {
59
- "@modelcontextprotocol/sdk": "1.17.5",
60
+ "@modelcontextprotocol/sdk": "1.24.3",
60
61
  "@types/mustache": "^4.2.6",
61
62
  "@uuv/assistant": "2.74.0",
62
63
  "@uuv/dictionary": "0.2.0",
@@ -64,7 +65,7 @@
64
65
  "mustache": "^4.2.0",
65
66
  "tsconfig-paths": "4.2.0",
66
67
  "tslib": "2.3.0",
67
- "zod": "3.25.76"
68
+ "zod": "4.1.13"
68
69
  },
69
70
  "funding": {
70
71
  "type": "opencollective",
@@ -72,6 +73,7 @@
72
73
  },
73
74
  "devDependencies": {
74
75
  "@modelcontextprotocol/inspector": "^0.17.2",
76
+ "copyfiles": "^2.4.1",
75
77
  "ts-node": "^10.9.2"
76
78
  }
77
79
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uuv/mcp-server",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "A Model Context Protocol (MCP) server for UUV - a solution to facilitate the writing and execution of E2E tests understandable by any human being(English or French) using cucumber(BDD) and cypress or playwright.",
5
5
  "author": "Louis Fredice NJAKO MOLOM (https://github.com/luifr10) & Stanley SERVICAL (https://github.com/stanlee974)",
6
6
  "license": "MIT",
@@ -42,6 +42,7 @@
42
42
  "start": "ts-node src/lib/mcp-server.ts",
43
43
  "inspector": "npx @modelcontextprotocol/inspector --config test-mcp.json --server default-server",
44
44
  "lint": "npx eslint . --ext .js,.ts,.feature --fix",
45
+ "build-copy-prompt-templates": "copyfiles -u 1 \"src/lib/prompts/**/*\" dist",
45
46
  "tests": "jest --coverage --config=./jest.config.ts",
46
47
  "package": "npm pack --pack-destination=\"../../dist/packages\""
47
48
  },
@@ -56,15 +57,15 @@
56
57
  }
57
58
  },
58
59
  "dependencies": {
59
- "@modelcontextprotocol/sdk": "1.17.5",
60
+ "@modelcontextprotocol/sdk": "1.24.3",
60
61
  "@types/mustache": "^4.2.6",
61
- "@uuv/assistant": "2.74.0",
62
- "@uuv/dictionary": "0.2.0",
62
+ "@uuv/assistant": "2.74.1",
63
+ "@uuv/dictionary": "0.2.1",
63
64
  "jsdom": "26.1.0",
64
65
  "mustache": "^4.2.0",
65
66
  "tsconfig-paths": "4.2.0",
66
67
  "tslib": "2.3.0",
67
- "zod": "3.25.76"
68
+ "zod": "4.1.13"
68
69
  },
69
70
  "funding": {
70
71
  "type": "opencollective",
@@ -72,6 +73,7 @@
72
73
  },
73
74
  "devDependencies": {
74
75
  "@modelcontextprotocol/inspector": "^0.17.2",
76
+ "copyfiles": "^2.4.1",
75
77
  "ts-node": "^10.9.2"
76
78
  }
77
79
  }