@ejazullah/browser-mcp 0.0.56
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/LICENSE +202 -0
- package/README.md +860 -0
- package/cli.js +19 -0
- package/index.d.ts +23 -0
- package/index.js +1061 -0
- package/lib/auth.js +82 -0
- package/lib/browserContextFactory.js +205 -0
- package/lib/browserServerBackend.js +125 -0
- package/lib/config.js +266 -0
- package/lib/context.js +232 -0
- package/lib/databaseLogger.js +264 -0
- package/lib/extension/cdpRelay.js +346 -0
- package/lib/extension/extensionContextFactory.js +56 -0
- package/lib/extension/main.js +26 -0
- package/lib/fileUtils.js +32 -0
- package/lib/httpServer.js +39 -0
- package/lib/index.js +39 -0
- package/lib/javascript.js +49 -0
- package/lib/log.js +21 -0
- package/lib/loop/loop.js +69 -0
- package/lib/loop/loopClaude.js +152 -0
- package/lib/loop/loopOpenAI.js +143 -0
- package/lib/loop/main.js +60 -0
- package/lib/loopTools/context.js +66 -0
- package/lib/loopTools/main.js +49 -0
- package/lib/loopTools/perform.js +32 -0
- package/lib/loopTools/snapshot.js +29 -0
- package/lib/loopTools/tool.js +18 -0
- package/lib/manualPromise.js +111 -0
- package/lib/mcp/inProcessTransport.js +72 -0
- package/lib/mcp/server.js +93 -0
- package/lib/mcp/transport.js +217 -0
- package/lib/mongoDBLogger.js +252 -0
- package/lib/package.js +20 -0
- package/lib/program.js +113 -0
- package/lib/response.js +172 -0
- package/lib/sessionLog.js +156 -0
- package/lib/tab.js +266 -0
- package/lib/tools/cdp.js +169 -0
- package/lib/tools/common.js +55 -0
- package/lib/tools/console.js +33 -0
- package/lib/tools/dialogs.js +47 -0
- package/lib/tools/evaluate.js +53 -0
- package/lib/tools/extraction.js +217 -0
- package/lib/tools/files.js +44 -0
- package/lib/tools/forms.js +180 -0
- package/lib/tools/getext.js +99 -0
- package/lib/tools/install.js +53 -0
- package/lib/tools/interactions.js +191 -0
- package/lib/tools/keyboard.js +86 -0
- package/lib/tools/mouse.js +99 -0
- package/lib/tools/navigate.js +70 -0
- package/lib/tools/network.js +41 -0
- package/lib/tools/pdf.js +40 -0
- package/lib/tools/screenshot.js +75 -0
- package/lib/tools/selectors.js +233 -0
- package/lib/tools/snapshot.js +169 -0
- package/lib/tools/states.js +147 -0
- package/lib/tools/tabs.js +87 -0
- package/lib/tools/tool.js +33 -0
- package/lib/tools/utils.js +74 -0
- package/lib/tools/wait.js +56 -0
- package/lib/tools.js +64 -0
- package/lib/utils.js +26 -0
- package/openapi.json +683 -0
- package/package.json +92 -0
package/openapi.json
ADDED
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.3",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "MCP Playwright Browser Automation API",
|
|
5
|
+
"description": "Enhanced Playwright Tools for Model Context Protocol (MCP) with CDP Support. Provides browser automation capabilities including navigation, interaction, extraction, and testing.",
|
|
6
|
+
"version": "0.0.34",
|
|
7
|
+
"contact": {
|
|
8
|
+
"name": "Ejaz Ullah",
|
|
9
|
+
"email": "ejazullah@example.com",
|
|
10
|
+
"url": "https://github.com/ejazullah/mcp-playwright"
|
|
11
|
+
},
|
|
12
|
+
"license": {
|
|
13
|
+
"name": "Apache-2.0",
|
|
14
|
+
"url": "https://www.apache.org/licenses/LICENSE-2.0"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"servers": [
|
|
18
|
+
{
|
|
19
|
+
"url": "https://mcp.doingerp.com",
|
|
20
|
+
"description": "Production MCP Playwright Server"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"url": "http://localhost:8931",
|
|
24
|
+
"description": "Local Development Server"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"paths": {
|
|
28
|
+
"/mcp/browser_navigate": {
|
|
29
|
+
"post": {
|
|
30
|
+
"summary": "Navigate to URL",
|
|
31
|
+
"description": "Navigate to a URL",
|
|
32
|
+
"operationId": "browser_navigate",
|
|
33
|
+
"requestBody": {
|
|
34
|
+
"required": true,
|
|
35
|
+
"content": {
|
|
36
|
+
"application/json": {
|
|
37
|
+
"schema": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"properties": {
|
|
40
|
+
"url": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "The URL to navigate to"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"required": ["url"]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"responses": {
|
|
51
|
+
"200": {
|
|
52
|
+
"description": "Navigation successful",
|
|
53
|
+
"content": {
|
|
54
|
+
"application/json": {
|
|
55
|
+
"schema": {
|
|
56
|
+
"$ref": "#/components/schemas/ToolResponse"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"/mcp/browser_snapshot": {
|
|
65
|
+
"post": {
|
|
66
|
+
"summary": "Page snapshot",
|
|
67
|
+
"description": "Capture accessibility snapshot of the current page, this is better than screenshot",
|
|
68
|
+
"operationId": "browser_snapshot",
|
|
69
|
+
"requestBody": {
|
|
70
|
+
"required": true,
|
|
71
|
+
"content": {
|
|
72
|
+
"application/json": {
|
|
73
|
+
"schema": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"properties": {}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"responses": {
|
|
81
|
+
"200": {
|
|
82
|
+
"description": "Snapshot captured successfully",
|
|
83
|
+
"content": {
|
|
84
|
+
"application/json": {
|
|
85
|
+
"schema": {
|
|
86
|
+
"$ref": "#/components/schemas/ToolResponse"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"/mcp/browser_click": {
|
|
95
|
+
"post": {
|
|
96
|
+
"summary": "Click",
|
|
97
|
+
"description": "Perform click on a web page",
|
|
98
|
+
"operationId": "browser_click",
|
|
99
|
+
"requestBody": {
|
|
100
|
+
"required": true,
|
|
101
|
+
"content": {
|
|
102
|
+
"application/json": {
|
|
103
|
+
"schema": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"properties": {
|
|
106
|
+
"element": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"description": "Human-readable element description used to obtain permission to interact with the element"
|
|
109
|
+
},
|
|
110
|
+
"ref": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"description": "Exact target element reference from the page snapshot"
|
|
113
|
+
},
|
|
114
|
+
"doubleClick": {
|
|
115
|
+
"type": "boolean",
|
|
116
|
+
"description": "Whether to perform a double click instead of a single click"
|
|
117
|
+
},
|
|
118
|
+
"button": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"enum": ["left", "right", "middle"],
|
|
121
|
+
"description": "Button to click, defaults to left"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"required": ["element", "ref"]
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"responses": {
|
|
130
|
+
"200": {
|
|
131
|
+
"description": "Click performed successfully",
|
|
132
|
+
"content": {
|
|
133
|
+
"application/json": {
|
|
134
|
+
"schema": {
|
|
135
|
+
"$ref": "#/components/schemas/ToolResponse"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"/mcp/browser_type": {
|
|
144
|
+
"post": {
|
|
145
|
+
"summary": "Type text",
|
|
146
|
+
"description": "Type text into editable element",
|
|
147
|
+
"operationId": "browser_type",
|
|
148
|
+
"requestBody": {
|
|
149
|
+
"required": true,
|
|
150
|
+
"content": {
|
|
151
|
+
"application/json": {
|
|
152
|
+
"schema": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"properties": {
|
|
155
|
+
"element": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"description": "Human-readable element description used to obtain permission to interact with the element"
|
|
158
|
+
},
|
|
159
|
+
"ref": {
|
|
160
|
+
"type": "string",
|
|
161
|
+
"description": "Exact target element reference from the page snapshot"
|
|
162
|
+
},
|
|
163
|
+
"text": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"description": "Text to type into the element"
|
|
166
|
+
},
|
|
167
|
+
"slowly": {
|
|
168
|
+
"type": "boolean",
|
|
169
|
+
"description": "Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once."
|
|
170
|
+
},
|
|
171
|
+
"submit": {
|
|
172
|
+
"type": "boolean",
|
|
173
|
+
"description": "Whether to submit entered text (press Enter after)"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"required": ["element", "ref", "text"]
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"responses": {
|
|
182
|
+
"200": {
|
|
183
|
+
"description": "Text typed successfully",
|
|
184
|
+
"content": {
|
|
185
|
+
"application/json": {
|
|
186
|
+
"schema": {
|
|
187
|
+
"$ref": "#/components/schemas/ToolResponse"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"/mcp/browser_press_key": {
|
|
196
|
+
"post": {
|
|
197
|
+
"summary": "Press key",
|
|
198
|
+
"description": "Press a key on the keyboard",
|
|
199
|
+
"operationId": "browser_press_key",
|
|
200
|
+
"requestBody": {
|
|
201
|
+
"required": true,
|
|
202
|
+
"content": {
|
|
203
|
+
"application/json": {
|
|
204
|
+
"schema": {
|
|
205
|
+
"type": "object",
|
|
206
|
+
"properties": {
|
|
207
|
+
"key": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"description": "Name of the key to press or a character to generate, such as `ArrowLeft` or `a`"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"required": ["key"]
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"responses": {
|
|
218
|
+
"200": {
|
|
219
|
+
"description": "Key pressed successfully",
|
|
220
|
+
"content": {
|
|
221
|
+
"application/json": {
|
|
222
|
+
"schema": {
|
|
223
|
+
"$ref": "#/components/schemas/ToolResponse"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"/mcp/browser_select_option": {
|
|
232
|
+
"post": {
|
|
233
|
+
"summary": "Select option",
|
|
234
|
+
"description": "Select an option in a dropdown",
|
|
235
|
+
"operationId": "browser_select_option",
|
|
236
|
+
"requestBody": {
|
|
237
|
+
"required": true,
|
|
238
|
+
"content": {
|
|
239
|
+
"application/json": {
|
|
240
|
+
"schema": {
|
|
241
|
+
"type": "object",
|
|
242
|
+
"properties": {
|
|
243
|
+
"element": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"description": "Human-readable element description used to obtain permission to interact with the element"
|
|
246
|
+
},
|
|
247
|
+
"ref": {
|
|
248
|
+
"type": "string",
|
|
249
|
+
"description": "Exact target element reference from the page snapshot"
|
|
250
|
+
},
|
|
251
|
+
"values": {
|
|
252
|
+
"type": "array",
|
|
253
|
+
"items": {
|
|
254
|
+
"type": "string"
|
|
255
|
+
},
|
|
256
|
+
"description": "Array of values to select in the dropdown. This can be a single value or multiple values."
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"required": ["element", "ref", "values"]
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"responses": {
|
|
265
|
+
"200": {
|
|
266
|
+
"description": "Option selected successfully",
|
|
267
|
+
"content": {
|
|
268
|
+
"application/json": {
|
|
269
|
+
"schema": {
|
|
270
|
+
"$ref": "#/components/schemas/ToolResponse"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
"/mcp/browser_wait_for": {
|
|
279
|
+
"post": {
|
|
280
|
+
"summary": "Wait for condition",
|
|
281
|
+
"description": "Wait for text to appear or disappear or a specified time to pass",
|
|
282
|
+
"operationId": "browser_wait_for",
|
|
283
|
+
"requestBody": {
|
|
284
|
+
"required": true,
|
|
285
|
+
"content": {
|
|
286
|
+
"application/json": {
|
|
287
|
+
"schema": {
|
|
288
|
+
"type": "object",
|
|
289
|
+
"properties": {
|
|
290
|
+
"text": {
|
|
291
|
+
"type": "string",
|
|
292
|
+
"description": "The text to wait for"
|
|
293
|
+
},
|
|
294
|
+
"textGone": {
|
|
295
|
+
"type": "string",
|
|
296
|
+
"description": "The text to wait for to disappear"
|
|
297
|
+
},
|
|
298
|
+
"time": {
|
|
299
|
+
"type": "number",
|
|
300
|
+
"description": "The time to wait in seconds"
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"responses": {
|
|
308
|
+
"200": {
|
|
309
|
+
"description": "Wait condition met",
|
|
310
|
+
"content": {
|
|
311
|
+
"application/json": {
|
|
312
|
+
"schema": {
|
|
313
|
+
"$ref": "#/components/schemas/ToolResponse"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"/mcp/browser_take_screenshot": {
|
|
322
|
+
"post": {
|
|
323
|
+
"summary": "Take screenshot",
|
|
324
|
+
"description": "Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.",
|
|
325
|
+
"operationId": "browser_take_screenshot",
|
|
326
|
+
"requestBody": {
|
|
327
|
+
"required": true,
|
|
328
|
+
"content": {
|
|
329
|
+
"application/json": {
|
|
330
|
+
"schema": {
|
|
331
|
+
"type": "object",
|
|
332
|
+
"properties": {
|
|
333
|
+
"element": {
|
|
334
|
+
"type": "string",
|
|
335
|
+
"description": "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."
|
|
336
|
+
},
|
|
337
|
+
"ref": {
|
|
338
|
+
"type": "string",
|
|
339
|
+
"description": "Exact target element reference from the page snapshot. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too."
|
|
340
|
+
},
|
|
341
|
+
"filename": {
|
|
342
|
+
"type": "string",
|
|
343
|
+
"description": "File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified."
|
|
344
|
+
},
|
|
345
|
+
"fullPage": {
|
|
346
|
+
"type": "boolean",
|
|
347
|
+
"description": "When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots."
|
|
348
|
+
},
|
|
349
|
+
"raw": {
|
|
350
|
+
"type": "boolean",
|
|
351
|
+
"description": "Whether to return without compression (in PNG format). Default is false, which returns a JPEG image."
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"responses": {
|
|
359
|
+
"200": {
|
|
360
|
+
"description": "Screenshot taken successfully",
|
|
361
|
+
"content": {
|
|
362
|
+
"application/json": {
|
|
363
|
+
"schema": {
|
|
364
|
+
"$ref": "#/components/schemas/ToolResponse"
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"/mcp/browser_get_text": {
|
|
373
|
+
"post": {
|
|
374
|
+
"summary": "Get text content",
|
|
375
|
+
"description": "Get text content or attribute value from a specific element on the page",
|
|
376
|
+
"operationId": "browser_get_text",
|
|
377
|
+
"requestBody": {
|
|
378
|
+
"required": true,
|
|
379
|
+
"content": {
|
|
380
|
+
"application/json": {
|
|
381
|
+
"schema": {
|
|
382
|
+
"type": "object",
|
|
383
|
+
"properties": {
|
|
384
|
+
"element": {
|
|
385
|
+
"type": "string",
|
|
386
|
+
"description": "Human-readable element description used to obtain permission to interact with the element"
|
|
387
|
+
},
|
|
388
|
+
"ref": {
|
|
389
|
+
"type": "string",
|
|
390
|
+
"description": "Exact target element reference from the page snapshot"
|
|
391
|
+
},
|
|
392
|
+
"attribute": {
|
|
393
|
+
"type": "string",
|
|
394
|
+
"description": "Optional attribute to get instead of text content (e.g., \"href\", \"src\", \"value\")"
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
"required": ["element", "ref"]
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"responses": {
|
|
403
|
+
"200": {
|
|
404
|
+
"description": "Text content retrieved successfully",
|
|
405
|
+
"content": {
|
|
406
|
+
"application/json": {
|
|
407
|
+
"schema": {
|
|
408
|
+
"$ref": "#/components/schemas/ToolResponse"
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
"/mcp/browser_console_messages": {
|
|
417
|
+
"post": {
|
|
418
|
+
"summary": "Get console messages",
|
|
419
|
+
"description": "Returns all console messages",
|
|
420
|
+
"operationId": "browser_console_messages",
|
|
421
|
+
"requestBody": {
|
|
422
|
+
"required": true,
|
|
423
|
+
"content": {
|
|
424
|
+
"application/json": {
|
|
425
|
+
"schema": {
|
|
426
|
+
"type": "object",
|
|
427
|
+
"properties": {}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
"responses": {
|
|
433
|
+
"200": {
|
|
434
|
+
"description": "Console messages retrieved successfully",
|
|
435
|
+
"content": {
|
|
436
|
+
"application/json": {
|
|
437
|
+
"schema": {
|
|
438
|
+
"$ref": "#/components/schemas/ToolResponse"
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"/mcp/browser_network_requests": {
|
|
447
|
+
"post": {
|
|
448
|
+
"summary": "List network requests",
|
|
449
|
+
"description": "Returns all network requests since loading the page",
|
|
450
|
+
"operationId": "browser_network_requests",
|
|
451
|
+
"requestBody": {
|
|
452
|
+
"required": true,
|
|
453
|
+
"content": {
|
|
454
|
+
"application/json": {
|
|
455
|
+
"schema": {
|
|
456
|
+
"type": "object",
|
|
457
|
+
"properties": {}
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
"responses": {
|
|
463
|
+
"200": {
|
|
464
|
+
"description": "Network requests retrieved successfully",
|
|
465
|
+
"content": {
|
|
466
|
+
"application/json": {
|
|
467
|
+
"schema": {
|
|
468
|
+
"$ref": "#/components/schemas/ToolResponse"
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
"/mcp/browser_tab_list": {
|
|
477
|
+
"post": {
|
|
478
|
+
"summary": "List tabs",
|
|
479
|
+
"description": "List browser tabs",
|
|
480
|
+
"operationId": "browser_tab_list",
|
|
481
|
+
"requestBody": {
|
|
482
|
+
"required": true,
|
|
483
|
+
"content": {
|
|
484
|
+
"application/json": {
|
|
485
|
+
"schema": {
|
|
486
|
+
"type": "object",
|
|
487
|
+
"properties": {}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
"responses": {
|
|
493
|
+
"200": {
|
|
494
|
+
"description": "Tabs listed successfully",
|
|
495
|
+
"content": {
|
|
496
|
+
"application/json": {
|
|
497
|
+
"schema": {
|
|
498
|
+
"$ref": "#/components/schemas/ToolResponse"
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
"/mcp/browser_tab_new": {
|
|
507
|
+
"post": {
|
|
508
|
+
"summary": "Open new tab",
|
|
509
|
+
"description": "Open a new tab",
|
|
510
|
+
"operationId": "browser_tab_new",
|
|
511
|
+
"requestBody": {
|
|
512
|
+
"required": true,
|
|
513
|
+
"content": {
|
|
514
|
+
"application/json": {
|
|
515
|
+
"schema": {
|
|
516
|
+
"type": "object",
|
|
517
|
+
"properties": {
|
|
518
|
+
"url": {
|
|
519
|
+
"type": "string",
|
|
520
|
+
"description": "The URL to navigate to in the new tab. If not provided, the new tab will be blank."
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
"responses": {
|
|
528
|
+
"200": {
|
|
529
|
+
"description": "New tab opened successfully",
|
|
530
|
+
"content": {
|
|
531
|
+
"application/json": {
|
|
532
|
+
"schema": {
|
|
533
|
+
"$ref": "#/components/schemas/ToolResponse"
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
"/mcp/browser_tab_close": {
|
|
542
|
+
"post": {
|
|
543
|
+
"summary": "Close tab",
|
|
544
|
+
"description": "Close a tab",
|
|
545
|
+
"operationId": "browser_tab_close",
|
|
546
|
+
"requestBody": {
|
|
547
|
+
"required": true,
|
|
548
|
+
"content": {
|
|
549
|
+
"application/json": {
|
|
550
|
+
"schema": {
|
|
551
|
+
"type": "object",
|
|
552
|
+
"properties": {
|
|
553
|
+
"index": {
|
|
554
|
+
"type": "number",
|
|
555
|
+
"description": "The index of the tab to close. Closes current tab if not provided."
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
"responses": {
|
|
563
|
+
"200": {
|
|
564
|
+
"description": "Tab closed successfully",
|
|
565
|
+
"content": {
|
|
566
|
+
"application/json": {
|
|
567
|
+
"schema": {
|
|
568
|
+
"$ref": "#/components/schemas/ToolResponse"
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
"/mcp/browser_tab_select": {
|
|
577
|
+
"post": {
|
|
578
|
+
"summary": "Select tab",
|
|
579
|
+
"description": "Select a tab by index",
|
|
580
|
+
"operationId": "browser_tab_select",
|
|
581
|
+
"requestBody": {
|
|
582
|
+
"required": true,
|
|
583
|
+
"content": {
|
|
584
|
+
"application/json": {
|
|
585
|
+
"schema": {
|
|
586
|
+
"type": "object",
|
|
587
|
+
"properties": {
|
|
588
|
+
"index": {
|
|
589
|
+
"type": "number",
|
|
590
|
+
"description": "The index of the tab to select"
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
"required": ["index"]
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
},
|
|
598
|
+
"responses": {
|
|
599
|
+
"200": {
|
|
600
|
+
"description": "Tab selected successfully",
|
|
601
|
+
"content": {
|
|
602
|
+
"application/json": {
|
|
603
|
+
"schema": {
|
|
604
|
+
"$ref": "#/components/schemas/ToolResponse"
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
},
|
|
613
|
+
"components": {
|
|
614
|
+
"schemas": {
|
|
615
|
+
"ToolResponse": {
|
|
616
|
+
"type": "object",
|
|
617
|
+
"properties": {
|
|
618
|
+
"content": {
|
|
619
|
+
"type": "array",
|
|
620
|
+
"items": {
|
|
621
|
+
"oneOf": [
|
|
622
|
+
{
|
|
623
|
+
"$ref": "#/components/schemas/TextContent"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"$ref": "#/components/schemas/ImageContent"
|
|
627
|
+
}
|
|
628
|
+
]
|
|
629
|
+
},
|
|
630
|
+
"description": "The response content"
|
|
631
|
+
},
|
|
632
|
+
"isError": {
|
|
633
|
+
"type": "boolean",
|
|
634
|
+
"description": "Whether this is an error response"
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
"required": ["content"]
|
|
638
|
+
},
|
|
639
|
+
"TextContent": {
|
|
640
|
+
"type": "object",
|
|
641
|
+
"properties": {
|
|
642
|
+
"type": {
|
|
643
|
+
"type": "string",
|
|
644
|
+
"enum": ["text"]
|
|
645
|
+
},
|
|
646
|
+
"text": {
|
|
647
|
+
"type": "string"
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
"required": ["type", "text"]
|
|
651
|
+
},
|
|
652
|
+
"ImageContent": {
|
|
653
|
+
"type": "object",
|
|
654
|
+
"properties": {
|
|
655
|
+
"type": {
|
|
656
|
+
"type": "string",
|
|
657
|
+
"enum": ["image"]
|
|
658
|
+
},
|
|
659
|
+
"data": {
|
|
660
|
+
"type": "string",
|
|
661
|
+
"description": "Base64 encoded image data"
|
|
662
|
+
},
|
|
663
|
+
"mimeType": {
|
|
664
|
+
"type": "string",
|
|
665
|
+
"description": "MIME type of the image"
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
"required": ["type", "data", "mimeType"]
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
"securitySchemes": {
|
|
672
|
+
"bearerAuth": {
|
|
673
|
+
"type": "http",
|
|
674
|
+
"scheme": "bearer"
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
"security": [
|
|
679
|
+
{
|
|
680
|
+
"bearerAuth": []
|
|
681
|
+
}
|
|
682
|
+
]
|
|
683
|
+
}
|