cdp-toolkit 1.9.7 → 1.10.0
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/CHANGELOG.md +16 -0
- package/dist/cli.js +252 -242
- package/dist/mcp.js +262 -244
- package/package.json +1 -1
- package/src/manifest.ts +252 -242
- package/src/mcp.ts +16 -2
package/src/manifest.ts
CHANGED
|
@@ -25,21 +25,21 @@ export interface ToolSpec {
|
|
|
25
25
|
export const MANIFEST: ToolSpec[] = [
|
|
26
26
|
{
|
|
27
27
|
"name": "list_pages",
|
|
28
|
-
"description": "Enumerate browser page targets
|
|
28
|
+
"description": "Enumerate browser page targets (GET /json/list); page-type tabs only unless all=true. Each entry carries its targetId plus an origin field: 'agent' means this toolkit created it (also carries the creating label/createdAt, and stays 'agent' after the lease is released or the creator dies, making stray agent tabs findable), 'unknown' means no creation record - it never says 'human', the honest word for any tab it did not create; a record that exists but won't read adds originUnreadable. An entry under an active, readable lease also carries a 'lease' object {label,pid,idleMs,expiresAt,stale}, with idleMs and expiresAt computed fresh every call (never off disk), independent of probe. Under CDP_REQUIRE_LEASE this call also reaps abandoned agent tabs into an additive reaped array - but a lease reads reclaimable the moment its TTL elapses, while the tab is CLOSED only after a further grace (CDP_REAP_GRACE_MS, default 2700000ms/45min, so 60min total after last use); a dead-pid lease is reaped at once, a tab with no lease never. With probe, each page-type entry also gets 'responsive' (and humanActiveMs where human input is seen); both are absent, never false/null, without probe.",
|
|
29
29
|
"inputSchema": {
|
|
30
30
|
"type": "object",
|
|
31
31
|
"properties": {
|
|
32
32
|
"lease": {
|
|
33
33
|
"type": "string",
|
|
34
|
-
"description": "
|
|
34
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
35
35
|
},
|
|
36
36
|
"all": {
|
|
37
37
|
"type": "boolean",
|
|
38
|
-
"description": "Include non-page targets (service/shared workers, background pages)
|
|
38
|
+
"description": "Include non-page targets (service/shared workers, background pages); default false lists page-type tabs only."
|
|
39
39
|
},
|
|
40
40
|
"probe": {
|
|
41
41
|
"type": "boolean",
|
|
42
|
-
"description": "Ping each page-type
|
|
42
|
+
"description": "Ping each page-type renderer before returning, one bounded 500ms check per target and never more, so a wedged tab can't stall the listing. Adds 'responsive' (false on timeout/exception/unreachable, never an error for the whole call) and, where the same round trip finds human input, humanActiveMs. Default false. On a backend that cannot answer the ping, responsive is absent too (not false)."
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"required": [],
|
|
@@ -54,7 +54,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
54
54
|
"properties": {
|
|
55
55
|
"lease": {
|
|
56
56
|
"type": "string",
|
|
57
|
-
"description": "
|
|
57
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
58
58
|
},
|
|
59
59
|
"url": {
|
|
60
60
|
"type": "string",
|
|
@@ -62,15 +62,15 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
62
62
|
},
|
|
63
63
|
"claim": {
|
|
64
64
|
"type": "boolean",
|
|
65
|
-
"description": "Claim the new tab atomically
|
|
65
|
+
"description": "Claim the new tab atomically and return a lease token alongside {targetId,url}. Under CDP_REQUIRE_LEASE the tab is claimed and a lease returned even without claim:true; claim:true makes it an EXPLICIT lease that demands its token on every later call, even from this process. Default false."
|
|
66
66
|
},
|
|
67
67
|
"label": {
|
|
68
68
|
"type": "string",
|
|
69
|
-
"description": "Agent label recorded on the lease when
|
|
69
|
+
"description": "Agent label recorded on the lease when the tab is claimed; surfaced in conflict errors and list_leases. Defaults to pid-<pid>."
|
|
70
70
|
},
|
|
71
71
|
"ttlMs": {
|
|
72
72
|
"type": "number",
|
|
73
|
-
"description": "How long
|
|
73
|
+
"description": "How long a claimed lease survives without use before it is reclaimable. Defaults to CDP_LEASE_TTL_MS, else 900000 (15min); every checked call refreshes it. Ignored when not claiming."
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
"required": [],
|
|
@@ -79,17 +79,17 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"name": "close_page",
|
|
82
|
-
"description": "Close a page target via Target.closeTarget. Requires an explicit, resolvable target;
|
|
82
|
+
"description": "Close a page target via Target.closeTarget. Requires an explicit, resolvable target; errors rather than guessing when the selector matches nothing.",
|
|
83
83
|
"inputSchema": {
|
|
84
84
|
"type": "object",
|
|
85
85
|
"properties": {
|
|
86
86
|
"lease": {
|
|
87
87
|
"type": "string",
|
|
88
|
-
"description": "
|
|
88
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
89
89
|
},
|
|
90
90
|
"target": {
|
|
91
91
|
"type": "string",
|
|
92
|
-
"description": "
|
|
92
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
93
93
|
}
|
|
94
94
|
},
|
|
95
95
|
"required": [
|
|
@@ -106,11 +106,11 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
106
106
|
"properties": {
|
|
107
107
|
"lease": {
|
|
108
108
|
"type": "string",
|
|
109
|
-
"description": "
|
|
109
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
110
110
|
},
|
|
111
111
|
"target": {
|
|
112
112
|
"type": "string",
|
|
113
|
-
"description": "
|
|
113
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
116
|
"required": [
|
|
@@ -127,11 +127,11 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
127
127
|
"properties": {
|
|
128
128
|
"lease": {
|
|
129
129
|
"type": "string",
|
|
130
|
-
"description": "
|
|
130
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
131
131
|
},
|
|
132
132
|
"target": {
|
|
133
133
|
"type": "string",
|
|
134
|
-
"description": "
|
|
134
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
135
135
|
},
|
|
136
136
|
"url": {
|
|
137
137
|
"type": "string",
|
|
@@ -147,7 +147,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
147
147
|
"back",
|
|
148
148
|
"forward"
|
|
149
149
|
],
|
|
150
|
-
"description": "Traverse this tab's session history instead of loading a url: 'back' and 'forward' are the browser's Back and Forward buttons. Mutually exclusive with 'url' and 'reload' — passing two of the three is refused by name
|
|
150
|
+
"description": "Traverse this tab's session history instead of loading a url: 'back' and 'forward' are the browser's Back and Forward buttons. Mutually exclusive with 'url' and 'reload' — passing two of the three is refused by name, not resolved by precedence. Works on BOTH backends and waits for the same load milestone as an ordinary navigation. Going back from the first entry, or forward from the last, is an ERROR naming the direction — never a silent no-op. The result carries traversed:'back'|'forward' alongside the resulting url."
|
|
151
151
|
},
|
|
152
152
|
"ignoreCache": {
|
|
153
153
|
"type": "boolean",
|
|
@@ -171,17 +171,17 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
"name": "wait_for",
|
|
174
|
-
"description": "Poll
|
|
174
|
+
"description": "Poll the target until the substring appears in document.body.innerText (Runtime.evaluate on a fixed interval), or throw on timeout. Text-substring only -- no aria/role/selector or event variants; throws rather than returning {found:false}.",
|
|
175
175
|
"inputSchema": {
|
|
176
176
|
"type": "object",
|
|
177
177
|
"properties": {
|
|
178
178
|
"lease": {
|
|
179
179
|
"type": "string",
|
|
180
|
-
"description": "
|
|
180
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
181
181
|
},
|
|
182
182
|
"target": {
|
|
183
183
|
"type": "string",
|
|
184
|
-
"description": "
|
|
184
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
185
185
|
},
|
|
186
186
|
"text": {
|
|
187
187
|
"type": "string",
|
|
@@ -189,11 +189,11 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
189
189
|
},
|
|
190
190
|
"timeoutMs": {
|
|
191
191
|
"type": "number",
|
|
192
|
-
"description": "Total time budget in
|
|
192
|
+
"description": "Total time budget in ms. Default 15000."
|
|
193
193
|
},
|
|
194
194
|
"pollMs": {
|
|
195
195
|
"type": "number",
|
|
196
|
-
"description": "Poll interval in
|
|
196
|
+
"description": "Poll interval in ms. Default 250."
|
|
197
197
|
}
|
|
198
198
|
},
|
|
199
199
|
"required": [
|
|
@@ -204,37 +204,37 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
204
204
|
},
|
|
205
205
|
{
|
|
206
206
|
"name": "evaluate_script",
|
|
207
|
-
"description": "Run arbitrary JavaScript in the target
|
|
207
|
+
"description": "Run arbitrary JavaScript in the target's main-world context over raw CDP and return the evaluated value (returnByValue). With no 'args', 'expression' is a raw expression; with 'args' it must be a function literal (arrow or classic) invoked on globalThis with args passed positionally. A thrown exception surfaces as an error; non-serializable returns (DOM nodes, functions) come back as their CDP description string. savePath writes the value to a JSON file instead -- the response then carries only {path,bytes,type,target} and the value never appears in it, the way to read a credential (a JWT/session token from localStorage) without putting the secret in the transcript. This is the one tool that EVALUATES inside an MV3 extension's background SERVICE WORKER rather than OBSERVING it (Chrome, Capability 'worker.targets'): a worker: target reads chrome.storage.local, chrome.runtime and the worker's own globals directly, with an idle-evicted worker started first (see 'wake').",
|
|
208
208
|
"inputSchema": {
|
|
209
209
|
"type": "object",
|
|
210
210
|
"properties": {
|
|
211
211
|
"lease": {
|
|
212
212
|
"type": "string",
|
|
213
|
-
"description": "
|
|
213
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
214
214
|
},
|
|
215
215
|
"target": {
|
|
216
216
|
"type": "string",
|
|
217
|
-
"description": "Page selector: 'active' (
|
|
217
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', '<targetId>'; plus 'worker:<substring>' to reach a service/shared worker (e.g. an MV3 extension background worker). The worker: arm is CHROME-ONLY (Capability 'worker.targets'). Grammar: see server instructions."
|
|
218
218
|
},
|
|
219
219
|
"wake": {
|
|
220
220
|
"type": "boolean",
|
|
221
|
-
"description": "
|
|
221
|
+
"description": "Worker targets only, when starting a capture. Default true: an idle-evicted MV3 service worker exists in no target listing, so it is started first (ServiceWorker.startWorker) and re-confirmed; false fails fast. Rejected on a page target, a bare target id, or a read-only call. See server instructions."
|
|
222
222
|
},
|
|
223
223
|
"expression": {
|
|
224
224
|
"type": "string",
|
|
225
|
-
"description": "JavaScript to run. Evaluated as an expression when 'args' is omitted; must be a function literal (arrow or classic) whose parameters receive 'args' when
|
|
225
|
+
"description": "JavaScript to run. Evaluated as an expression when 'args' is omitted; must be a function literal (arrow or classic) whose parameters receive 'args' when provided. REQUIRED -- the code always goes in this key, never in 'function', 'code', 'js', 'script', 'fn' or 'body'; a call using one of those is rejected with an error naming the wrong key."
|
|
226
226
|
},
|
|
227
227
|
"awaitPromise": {
|
|
228
228
|
"type": "boolean",
|
|
229
|
-
"description": "Await the result if it is a Promise
|
|
229
|
+
"description": "Await the result if it is a Promise. Default true."
|
|
230
230
|
},
|
|
231
231
|
"args": {
|
|
232
232
|
"type": "array",
|
|
233
|
-
"description": "Positional JSON-serializable arguments
|
|
233
|
+
"description": "Positional JSON-serializable arguments passed to the expression (treated as a function). No live element/page handle is bound."
|
|
234
234
|
},
|
|
235
235
|
"savePath": {
|
|
236
236
|
"type": "string",
|
|
237
|
-
"description": "Write the evaluated value to this file as JSON and KEEP IT OUT OF THE RESPONSE:
|
|
237
|
+
"description": "Write the evaluated value to this file as JSON and KEEP IT OUT OF THE RESPONSE: the result is {path,bytes,type,target} only, with no copy, preview or truncation of the value -- read credentials without putting them in a transcript. An absolute path (starting with /) is used as-is; a relative path resolves under the artifact dir (/tmp/cdp-toolkit); missing parents are created. Omit to get the value back inline."
|
|
238
238
|
}
|
|
239
239
|
},
|
|
240
240
|
"required": [
|
|
@@ -245,21 +245,21 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
245
245
|
},
|
|
246
246
|
{
|
|
247
247
|
"name": "list_cookies",
|
|
248
|
-
"description": "Read the cookie store
|
|
248
|
+
"description": "Read the target page's cookie store INCLUDING httpOnly cookies, which document.cookie (and therefore evaluate_script) cannot see. Page-scoped, not browser-wide: returns cookies of the resolved tab, so point at a page on the site you want. Each cookie carries name, value, domain, path, expires (Unix seconds, -1 for a session cookie), size, httpOnly, secure, sameSite ('strict'|'lax'|'none'|'default'), session. Filter with 'domain' and/or 'name'. Pass 'savePath' to write the array to a JSON file instead: the response is then {path,bytes,count,target} with no cookie value in any form, the way to capture a session cookie without putting the credential in the transcript.",
|
|
249
249
|
"inputSchema": {
|
|
250
250
|
"type": "object",
|
|
251
251
|
"properties": {
|
|
252
252
|
"lease": {
|
|
253
253
|
"type": "string",
|
|
254
|
-
"description": "
|
|
254
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
255
255
|
},
|
|
256
256
|
"target": {
|
|
257
257
|
"type": "string",
|
|
258
|
-
"description": "
|
|
258
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
259
259
|
},
|
|
260
260
|
"domain": {
|
|
261
261
|
"type": "string",
|
|
262
|
-
"description": "Keep only cookies for this domain. A leading dot is ignored on both sides and subdomains
|
|
262
|
+
"description": "Keep only cookies for this domain. A leading dot is ignored on both sides and subdomains match too, so 'example.test' matches '.example.test' and 'app.example.test'. No wildcards."
|
|
263
263
|
},
|
|
264
264
|
"name": {
|
|
265
265
|
"type": "string",
|
|
@@ -267,7 +267,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
267
267
|
},
|
|
268
268
|
"savePath": {
|
|
269
269
|
"type": "string",
|
|
270
|
-
"description": "Write the cookie array
|
|
270
|
+
"description": "Write the cookie array here as JSON and KEEP THE VALUES OUT OF THE RESPONSE: the result is {path,bytes,count,target} only, with no preview or truncation of any value. An absolute path (starting with /) is used as-is; a relative path resolves under the artifact dir (/tmp/cdp-toolkit); missing parents are created. Omit to get the cookies back inline."
|
|
271
271
|
}
|
|
272
272
|
},
|
|
273
273
|
"required": [],
|
|
@@ -276,17 +276,17 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
276
276
|
},
|
|
277
277
|
{
|
|
278
278
|
"name": "set_cookie",
|
|
279
|
-
"description": "Write one cookie into the target page's cookie store, INCLUDING
|
|
279
|
+
"description": "Write one cookie into the target page's cookie store, INCLUDING httpOnly or secure cookies that document.cookie (and therefore evaluate_script) cannot create. Either 'url' or 'domain' is REQUIRED: the call is refused when neither is given, rather than guessing the page origin. The response is {set:true,target} and never echoes the value back. A 'set:true' is earned, not assumed: Chrome raises an error when it declines the cookie (a domain the url does not belong to, a secure cookie on an insecure origin, an oversized value). On Firefox 'domain' is derived from 'url' when only the url was given (BiDi has no url parameter), and a url with no host such as about:blank or a data URL is an error, not a silent no-op. Read the result back with list_cookies when you need proof.",
|
|
280
280
|
"inputSchema": {
|
|
281
281
|
"type": "object",
|
|
282
282
|
"properties": {
|
|
283
283
|
"lease": {
|
|
284
284
|
"type": "string",
|
|
285
|
-
"description": "
|
|
285
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
286
286
|
},
|
|
287
287
|
"target": {
|
|
288
288
|
"type": "string",
|
|
289
|
-
"description": "
|
|
289
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
290
290
|
},
|
|
291
291
|
"name": {
|
|
292
292
|
"type": "string",
|
|
@@ -298,19 +298,19 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
298
298
|
},
|
|
299
299
|
"url": {
|
|
300
300
|
"type": "string",
|
|
301
|
-
"description": "
|
|
301
|
+
"description": "URL the cookie is set for, e.g. 'https://example.com/'. Chrome derives domain, path and secure from it; Firefox derives only the domain from its host. Give this or 'domain'."
|
|
302
302
|
},
|
|
303
303
|
"domain": {
|
|
304
304
|
"type": "string",
|
|
305
|
-
"description": "Cookie domain,
|
|
305
|
+
"description": "Cookie domain, e.g. 'example.com' or '.example.com' for subdomains. Give this or 'url'. When both are given, this wins on Firefox and Chrome applies its own url plus domain consistency rule."
|
|
306
306
|
},
|
|
307
307
|
"path": {
|
|
308
308
|
"type": "string",
|
|
309
|
-
"description": "Cookie path
|
|
309
|
+
"description": "Cookie path, passed through exactly as given and NOT defaulted to '/': with a 'url' Chrome derives the path from it, so an invented default here would widen a cookie you meant to scope narrowly."
|
|
310
310
|
},
|
|
311
311
|
"expires": {
|
|
312
312
|
"type": "number",
|
|
313
|
-
"description": "Expiry as Unix time in SECONDS, matching what list_cookies reports. Omit
|
|
313
|
+
"description": "Expiry as Unix time in SECONDS, matching what list_cookies reports. Omit for a session cookie, which is what both backends do when no expiry is supplied."
|
|
314
314
|
},
|
|
315
315
|
"httpOnly": {
|
|
316
316
|
"type": "boolean",
|
|
@@ -322,27 +322,35 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
322
322
|
},
|
|
323
323
|
"sameSite": {
|
|
324
324
|
"type": "string",
|
|
325
|
-
"enum": [
|
|
325
|
+
"enum": [
|
|
326
|
+
"strict",
|
|
327
|
+
"lax",
|
|
328
|
+
"none",
|
|
329
|
+
"default"
|
|
330
|
+
],
|
|
326
331
|
"description": "SameSite attribute, lowercase, matching what list_cookies reports. 'default' means the attribute is not set at all."
|
|
327
332
|
}
|
|
328
333
|
},
|
|
329
|
-
"required": [
|
|
334
|
+
"required": [
|
|
335
|
+
"name",
|
|
336
|
+
"value"
|
|
337
|
+
],
|
|
330
338
|
"additionalProperties": false
|
|
331
339
|
}
|
|
332
340
|
},
|
|
333
341
|
{
|
|
334
342
|
"name": "delete_cookies",
|
|
335
|
-
"description": "Delete the named cookie from the target page's cookie store, httpOnly cookies included.
|
|
343
|
+
"description": "Delete the named cookie from the target page's cookie store, httpOnly cookies included. Both 'name' and one of 'url' or 'domain' are REQUIRED: without a site constraint it would delete by name across the whole partition, so it is refused with an error instead. Narrow further with 'path'. The response is {deleted:true,target} and carries NO count, because neither protocol reports how many cookies it removed and a number here would be invented; call list_cookies before and after for a real count. 'deleted:true' means the backend accepted and performed the deletion, not that a matching cookie existed, since deleting an absent cookie succeeds on both backends.",
|
|
336
344
|
"inputSchema": {
|
|
337
345
|
"type": "object",
|
|
338
346
|
"properties": {
|
|
339
347
|
"lease": {
|
|
340
348
|
"type": "string",
|
|
341
|
-
"description": "
|
|
349
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
342
350
|
},
|
|
343
351
|
"target": {
|
|
344
352
|
"type": "string",
|
|
345
|
-
"description": "
|
|
353
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
346
354
|
},
|
|
347
355
|
"name": {
|
|
348
356
|
"type": "string",
|
|
@@ -350,7 +358,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
350
358
|
},
|
|
351
359
|
"url": {
|
|
352
360
|
"type": "string",
|
|
353
|
-
"description": "Delete cookies matching this URL,
|
|
361
|
+
"description": "Delete cookies matching this URL, e.g. 'https://example.com/'. Give this or 'domain'. On Firefox only the host is used, because BiDi's filter has no url field."
|
|
354
362
|
},
|
|
355
363
|
"domain": {
|
|
356
364
|
"type": "string",
|
|
@@ -361,27 +369,29 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
361
369
|
"description": "Narrow the deletion to cookies with this exact path. Omit to match any path allowed by the other constraints."
|
|
362
370
|
}
|
|
363
371
|
},
|
|
364
|
-
"required": [
|
|
372
|
+
"required": [
|
|
373
|
+
"name"
|
|
374
|
+
],
|
|
365
375
|
"additionalProperties": false
|
|
366
376
|
}
|
|
367
377
|
},
|
|
368
378
|
{
|
|
369
379
|
"name": "take_snapshot",
|
|
370
|
-
"description": "
|
|
380
|
+
"description": "Captures the page's accessibility tree as an indented text tree, each line prefixed [uid] (a CDP backendDOMNodeId). Every interaction tool (click/hover/fill/etc.) resolves that uid via DOM.resolveNode — run this first to discover uids to act on.",
|
|
371
381
|
"inputSchema": {
|
|
372
382
|
"type": "object",
|
|
373
383
|
"properties": {
|
|
374
384
|
"lease": {
|
|
375
385
|
"type": "string",
|
|
376
|
-
"description": "
|
|
386
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
377
387
|
},
|
|
378
388
|
"target": {
|
|
379
389
|
"type": "string",
|
|
380
|
-
"description": "
|
|
390
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
381
391
|
},
|
|
382
392
|
"interactiveOnly": {
|
|
383
393
|
"type": "boolean",
|
|
384
|
-
"description": "When true, emit only interactive/meaningful nodes
|
|
394
|
+
"description": "When true, emit only interactive/meaningful nodes as a flat list; default false returns the full hierarchical tree."
|
|
385
395
|
}
|
|
386
396
|
},
|
|
387
397
|
"required": [],
|
|
@@ -390,25 +400,25 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
390
400
|
},
|
|
391
401
|
{
|
|
392
402
|
"name": "click",
|
|
393
|
-
"description": "Click an element via a synthetic mouse press/release at
|
|
403
|
+
"description": "Click an element via a synthetic mouse press/release at its scrolled-into-view center. Give exactly one of uid or selector. modifiers (Alt/Control/Meta/Shift) throws on the Firefox backend — use --browser chrome for a modifier-click. clickCount:3 triple-clicks (selects a line/paragraph in most editors).",
|
|
394
404
|
"inputSchema": {
|
|
395
405
|
"type": "object",
|
|
396
406
|
"properties": {
|
|
397
407
|
"lease": {
|
|
398
408
|
"type": "string",
|
|
399
|
-
"description": "
|
|
409
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
400
410
|
},
|
|
401
411
|
"target": {
|
|
402
412
|
"type": "string",
|
|
403
|
-
"description": "
|
|
413
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
404
414
|
},
|
|
405
415
|
"uid": {
|
|
406
416
|
"type": "number",
|
|
407
|
-
"description": "CDP backendDOMNodeId of the element to click,
|
|
417
|
+
"description": "CDP backendDOMNodeId of the element to click, from take_snapshot. Exactly one of uid or selector."
|
|
408
418
|
},
|
|
409
419
|
"selector": {
|
|
410
420
|
"type": "string",
|
|
411
|
-
"description": "CSS selector for the element to click (
|
|
421
|
+
"description": "CSS selector for the element to click (document.querySelector). Exactly one of uid or selector."
|
|
412
422
|
},
|
|
413
423
|
"button": {
|
|
414
424
|
"type": "string",
|
|
@@ -421,7 +431,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
421
431
|
},
|
|
422
432
|
"clickCount": {
|
|
423
433
|
"type": "number",
|
|
424
|
-
"description": "Number of clicks: 1
|
|
434
|
+
"description": "Number of clicks: 1 (default), 2 = double-click, 3 = triple-click."
|
|
425
435
|
},
|
|
426
436
|
"modifiers": {
|
|
427
437
|
"type": "array",
|
|
@@ -434,7 +444,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
434
444
|
"Shift"
|
|
435
445
|
]
|
|
436
446
|
},
|
|
437
|
-
"description": "Modifier keys held for the click's press and release, e.g. ['Shift']
|
|
447
|
+
"description": "Modifier keys held for the click's press and release, e.g. ['Shift']. Non-empty on the Firefox backend throws — not supported over BiDi."
|
|
438
448
|
}
|
|
439
449
|
},
|
|
440
450
|
"required": [],
|
|
@@ -443,25 +453,25 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
443
453
|
},
|
|
444
454
|
{
|
|
445
455
|
"name": "hover",
|
|
446
|
-
"description": "
|
|
456
|
+
"description": "Hovers the mouse over an element by dispatching a mouseMoved event at its scrolled-into-view center, firing framework hover handlers. Give exactly one of uid or selector.",
|
|
447
457
|
"inputSchema": {
|
|
448
458
|
"type": "object",
|
|
449
459
|
"properties": {
|
|
450
460
|
"lease": {
|
|
451
461
|
"type": "string",
|
|
452
|
-
"description": "
|
|
462
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
453
463
|
},
|
|
454
464
|
"target": {
|
|
455
465
|
"type": "string",
|
|
456
|
-
"description": "
|
|
466
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
457
467
|
},
|
|
458
468
|
"uid": {
|
|
459
469
|
"type": "number",
|
|
460
|
-
"description": "CDP backendDOMNodeId of the element to hover,
|
|
470
|
+
"description": "CDP backendDOMNodeId of the element to hover, from take_snapshot. Exactly one of uid or selector."
|
|
461
471
|
},
|
|
462
472
|
"selector": {
|
|
463
473
|
"type": "string",
|
|
464
|
-
"description": "CSS selector for the element to hover (
|
|
474
|
+
"description": "CSS selector for the element to hover (document.querySelector). Exactly one of uid or selector."
|
|
465
475
|
}
|
|
466
476
|
},
|
|
467
477
|
"required": [],
|
|
@@ -470,21 +480,21 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
470
480
|
},
|
|
471
481
|
{
|
|
472
482
|
"name": "drag",
|
|
473
|
-
"description": "
|
|
483
|
+
"description": "Drags from a source element to a destination or by an offset. mode:'mouse' (default) dispatches synthetic mouse press/move/release; at the default steps:2 an HTML5 drop zone (dragover preventDefault) gets ZERO dragover events and refuses the drop. mode:'html5' replays real dragstart/dragEnter/dragOver/drop with the page's own dataTransfer instead — deterministic regardless of pointer path, but CHROME-ONLY (rejected with a clear error on the Firefox backend). 'from' takes uid or selector; destination is exactly one of 'to' (uid/selector/x+y) or 'by' ({dx,dy} offset — sliders, map panning, resize handles).",
|
|
474
484
|
"inputSchema": {
|
|
475
485
|
"type": "object",
|
|
476
486
|
"properties": {
|
|
477
487
|
"lease": {
|
|
478
488
|
"type": "string",
|
|
479
|
-
"description": "
|
|
489
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
480
490
|
},
|
|
481
491
|
"target": {
|
|
482
492
|
"type": "string",
|
|
483
|
-
"description": "
|
|
493
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
484
494
|
},
|
|
485
495
|
"from": {
|
|
486
496
|
"type": "object",
|
|
487
|
-
"description": "Source element to drag from.
|
|
497
|
+
"description": "Source element to drag from. Exactly one of uid or selector.",
|
|
488
498
|
"properties": {
|
|
489
499
|
"uid": {
|
|
490
500
|
"type": "number",
|
|
@@ -499,7 +509,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
499
509
|
},
|
|
500
510
|
"to": {
|
|
501
511
|
"type": "object",
|
|
502
|
-
"description": "Where the drag ends: exactly one of uid, selector, or x+y. Mutually exclusive with 'by'; exactly one of to/by
|
|
512
|
+
"description": "Where the drag ends: exactly one of uid, selector, or x+y. Mutually exclusive with 'by'; exactly one of to/by required.",
|
|
503
513
|
"properties": {
|
|
504
514
|
"uid": {
|
|
505
515
|
"type": "number",
|
|
@@ -522,7 +532,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
522
532
|
},
|
|
523
533
|
"by": {
|
|
524
534
|
"type": "object",
|
|
525
|
-
"description": "
|
|
535
|
+
"description": "Offset from the source element's center: at least one of dx/dy (other defaults to 0). Mutually exclusive with 'to'; exactly one of to/by required. For sliders (by:{dx:40}), map panning, resize handles.",
|
|
526
536
|
"properties": {
|
|
527
537
|
"dx": {
|
|
528
538
|
"type": "number",
|
|
@@ -541,11 +551,11 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
541
551
|
"mouse",
|
|
542
552
|
"html5"
|
|
543
553
|
],
|
|
544
|
-
"description": "'mouse' (default): synthetic mouse press/move/release
|
|
554
|
+
"description": "'mouse' (default): synthetic mouse press/move/release — at steps:2 an HTML5 drop zone sees zero dragover events and refuses the drop. 'html5': real HTML5 drag-and-drop, deterministic regardless of pointer path, CHROME-ONLY (rejected on Firefox)."
|
|
545
555
|
},
|
|
546
556
|
"steps": {
|
|
547
557
|
"type": "number",
|
|
548
|
-
"description": "Number of interpolated mouse-move events
|
|
558
|
+
"description": "Number of interpolated mouse-move events between source and destination, evenly spaced, last landing on the destination. Integer 1-500, default 2. Raise for DnD libraries with a movement threshold or per-frame sampling."
|
|
549
559
|
}
|
|
550
560
|
},
|
|
551
561
|
"required": [
|
|
@@ -556,41 +566,41 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
556
566
|
},
|
|
557
567
|
{
|
|
558
568
|
"name": "scroll",
|
|
559
|
-
"description": "
|
|
569
|
+
"description": "Dispatches a wheel/scroll event at an anchor point — element (uid/selector) or x+y, scrolled into view first if an element; omit all three for viewport center. At least one of deltaX/deltaY required: positive deltaY scrolls DOWN, positive deltaX scrolls RIGHT (wheel-event convention — easy to invert). Returns the resolved anchor {x,y} plus the delta actually dispatched.",
|
|
560
570
|
"inputSchema": {
|
|
561
571
|
"type": "object",
|
|
562
572
|
"properties": {
|
|
563
573
|
"lease": {
|
|
564
574
|
"type": "string",
|
|
565
|
-
"description": "
|
|
575
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
566
576
|
},
|
|
567
577
|
"target": {
|
|
568
578
|
"type": "string",
|
|
569
|
-
"description": "
|
|
579
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
570
580
|
},
|
|
571
581
|
"uid": {
|
|
572
582
|
"type": "number",
|
|
573
|
-
"description": "CDP backendDOMNodeId of the element to scroll into view and anchor at,
|
|
583
|
+
"description": "CDP backendDOMNodeId of the element to scroll into view and anchor at, from take_snapshot. At most one of uid, selector, or x+y."
|
|
574
584
|
},
|
|
575
585
|
"selector": {
|
|
576
586
|
"type": "string",
|
|
577
|
-
"description": "CSS selector for the element to
|
|
587
|
+
"description": "CSS selector for the element to anchor at (document.querySelector). At most one of uid, selector, or x+y."
|
|
578
588
|
},
|
|
579
589
|
"x": {
|
|
580
590
|
"type": "number",
|
|
581
|
-
"description": "Absolute viewport x-coordinate to anchor
|
|
591
|
+
"description": "Absolute viewport x-coordinate to anchor at; must be given with y. At most one of uid, selector, or x+y."
|
|
582
592
|
},
|
|
583
593
|
"y": {
|
|
584
594
|
"type": "number",
|
|
585
|
-
"description": "Absolute viewport y-coordinate to anchor
|
|
595
|
+
"description": "Absolute viewport y-coordinate to anchor at; must be given with x. At most one of uid, selector, or x+y."
|
|
586
596
|
},
|
|
587
597
|
"deltaX": {
|
|
588
598
|
"type": "number",
|
|
589
|
-
"description": "Horizontal scroll delta; positive scrolls RIGHT. At least one of deltaX/deltaY
|
|
599
|
+
"description": "Horizontal scroll delta; positive scrolls RIGHT. At least one of deltaX/deltaY required."
|
|
590
600
|
},
|
|
591
601
|
"deltaY": {
|
|
592
602
|
"type": "number",
|
|
593
|
-
"description": "Vertical scroll delta; positive scrolls DOWN. At least one of deltaX/deltaY
|
|
603
|
+
"description": "Vertical scroll delta; positive scrolls DOWN. At least one of deltaX/deltaY required."
|
|
594
604
|
}
|
|
595
605
|
},
|
|
596
606
|
"required": [],
|
|
@@ -599,17 +609,17 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
599
609
|
},
|
|
600
610
|
{
|
|
601
611
|
"name": "dispatch_mouse",
|
|
602
|
-
"description": "
|
|
612
|
+
"description": "Dispatches one raw mouse event (move/down/up) at absolute viewport coordinates — the toolkit's lowest-level input primitive. Compose move/down/move/up calls yourself for anything click/drag's fixed sequences can't reach: canvas drag-painting, marquee/rubber-band selection, custom hit-testing widgets. Chrome-only: absent from tools/list under the Firefox backend, never present-and-throwing.",
|
|
603
613
|
"inputSchema": {
|
|
604
614
|
"type": "object",
|
|
605
615
|
"properties": {
|
|
606
616
|
"lease": {
|
|
607
617
|
"type": "string",
|
|
608
|
-
"description": "
|
|
618
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
609
619
|
},
|
|
610
620
|
"target": {
|
|
611
621
|
"type": "string",
|
|
612
|
-
"description": "
|
|
622
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
613
623
|
},
|
|
614
624
|
"action": {
|
|
615
625
|
"type": "string",
|
|
@@ -622,11 +632,11 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
622
632
|
},
|
|
623
633
|
"x": {
|
|
624
634
|
"type": "number",
|
|
625
|
-
"description": "Viewport x-coordinate. Required
|
|
635
|
+
"description": "Viewport x-coordinate. Required every call — CDP has no 'current pointer position' to default from."
|
|
626
636
|
},
|
|
627
637
|
"y": {
|
|
628
638
|
"type": "number",
|
|
629
|
-
"description": "Viewport y-coordinate. Required
|
|
639
|
+
"description": "Viewport y-coordinate. Required every call."
|
|
630
640
|
},
|
|
631
641
|
"button": {
|
|
632
642
|
"type": "string",
|
|
@@ -639,7 +649,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
639
649
|
},
|
|
640
650
|
"clickCount": {
|
|
641
651
|
"type": "number",
|
|
642
|
-
"description": "Click-run length for a 'down' or 'up' event (2 =
|
|
652
|
+
"description": "Click-run length for a 'down' or 'up' event (2 = second half of a double-click, 3 = triple-click). Ignored for 'move'; defaults to 1."
|
|
643
653
|
},
|
|
644
654
|
"modifiers": {
|
|
645
655
|
"type": "array",
|
|
@@ -665,17 +675,17 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
665
675
|
},
|
|
666
676
|
{
|
|
667
677
|
"name": "wait_for_download",
|
|
668
|
-
"description": "Wait for a file download to finish and return it as a real file on disk: {path,suggestedFilename,bytes,url,target}
|
|
678
|
+
"description": "Wait for a file download to finish and return it as a real file on disk: {path,suggestedFilename,bytes,url,target}, written under the artifact dir's downloads/. ORDERING RULE, not optional: capture must be ARMED BEFORE the click that starts the download — call wait_for_download{arm:true} first (returns {armed:true,downloadPath,pending}), then click, then call again to collect the file. The download-behavior override is per-connection state Chrome REVERTS the moment the arming client disconnects, and an unarmed headless Chrome denies the download outright, so one triggered before arming is lost. SIDE EFFECT, browser-global: arming redirects EVERY download in this browser (all tabs, all origins) into the toolkit's downloads dir until this server exits — they no longer land in the user's normal Downloads folder. The arm lives on a connection this server holds open (an MCP-server capability): under the one-shot CLI the connection dies with the process and nothing is captured. Chrome-only (capability 'browser.downloads'): absent from tools/list under Firefox.",
|
|
669
679
|
"inputSchema": {
|
|
670
680
|
"type": "object",
|
|
671
681
|
"properties": {
|
|
672
682
|
"lease": {
|
|
673
683
|
"type": "string",
|
|
674
|
-
"description": "
|
|
684
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
675
685
|
},
|
|
676
686
|
"target": {
|
|
677
687
|
"type": "string",
|
|
678
|
-
"description": "
|
|
688
|
+
"description": "Names the tab for the lease check and the echoed target — a download is browser-scoped, so this does not pick which download is returned. Grammar: server instructions."
|
|
679
689
|
},
|
|
680
690
|
"arm": {
|
|
681
691
|
"type": "boolean",
|
|
@@ -683,7 +693,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
683
693
|
},
|
|
684
694
|
"timeoutMs": {
|
|
685
695
|
"type": "number",
|
|
686
|
-
"description": "How long to wait for a download to complete, in milliseconds. Default 30000. Ignored with arm:true. A download that already completed and was not yet collected is returned immediately, so this only bounds the wait for
|
|
696
|
+
"description": "How long to wait for a download to complete, in milliseconds. Default 30000. Ignored with arm:true. A download that already completed and was not yet collected is returned immediately, so this only bounds the wait for one still in flight."
|
|
687
697
|
}
|
|
688
698
|
},
|
|
689
699
|
"required": [],
|
|
@@ -692,17 +702,17 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
692
702
|
},
|
|
693
703
|
{
|
|
694
704
|
"name": "grant_permissions",
|
|
695
|
-
"description": "Grant browser permissions for an origin up front, so a page asking for geolocation / notifications / clipboard gets an answer instead of
|
|
705
|
+
"description": "Grant browser permissions for an origin up front, so a page asking for geolocation / notifications / clipboard gets an answer instead of a prompt no agent can click. 'permissions' takes CDP PermissionType values ('geolocation','notifications','clipboardReadWrite','camera',...); an unknown name is refused by Chrome, quoting the bad value. Returns {granted,origin,target}, or {reset:true,target} for a reset-only call. Grants are keyed by ORIGIN, not by tab: every tab on that origin is affected, including ones opened later. reset:true clears this server's previous grants first (or instead, when no permissions are given) — CDP's reset is not origin-scoped, so it clears them for every origin at once. The grant lives on a connection this server holds open and Chrome DISCARDS IT when that connection closes: an MCP-server capability, so under the one-shot CLI the grant dies with the process. Chrome-only (capability 'browser.permissions'): absent from tools/list under Firefox, never present-and-throwing.",
|
|
696
706
|
"inputSchema": {
|
|
697
707
|
"type": "object",
|
|
698
708
|
"properties": {
|
|
699
709
|
"lease": {
|
|
700
710
|
"type": "string",
|
|
701
|
-
"description": "
|
|
711
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
702
712
|
},
|
|
703
713
|
"target": {
|
|
704
714
|
"type": "string",
|
|
705
|
-
"description": "
|
|
715
|
+
"description": "Also the origin source when 'origin' is omitted. Grammar: server instructions."
|
|
706
716
|
},
|
|
707
717
|
"permissions": {
|
|
708
718
|
"type": "array",
|
|
@@ -726,29 +736,29 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
726
736
|
},
|
|
727
737
|
{
|
|
728
738
|
"name": "fill",
|
|
729
|
-
"description": "
|
|
739
|
+
"description": "Fills an element by focusing it, clearing existing content, then inserting value via Input.insertText (atomic paste-like commit, not per-character keystrokes — won't fire per-keypress handlers). Give exactly one of uid or selector.",
|
|
730
740
|
"inputSchema": {
|
|
731
741
|
"type": "object",
|
|
732
742
|
"properties": {
|
|
733
743
|
"lease": {
|
|
734
744
|
"type": "string",
|
|
735
|
-
"description": "
|
|
745
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
736
746
|
},
|
|
737
747
|
"target": {
|
|
738
748
|
"type": "string",
|
|
739
|
-
"description": "
|
|
749
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
740
750
|
},
|
|
741
751
|
"uid": {
|
|
742
752
|
"type": "number",
|
|
743
|
-
"description": "CDP backendDOMNodeId of the field to fill,
|
|
753
|
+
"description": "CDP backendDOMNodeId of the field to fill, from take_snapshot. Exactly one of uid or selector."
|
|
744
754
|
},
|
|
745
755
|
"selector": {
|
|
746
756
|
"type": "string",
|
|
747
|
-
"description": "CSS selector for the field to fill (
|
|
757
|
+
"description": "CSS selector for the field to fill (document.querySelector). Exactly one of uid or selector."
|
|
748
758
|
},
|
|
749
759
|
"value": {
|
|
750
760
|
"type": "string",
|
|
751
|
-
"description": "
|
|
761
|
+
"description": "Text value to set; the field is cleared first, overwriting existing content."
|
|
752
762
|
}
|
|
753
763
|
},
|
|
754
764
|
"required": [
|
|
@@ -759,17 +769,17 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
759
769
|
},
|
|
760
770
|
{
|
|
761
771
|
"name": "fill_form",
|
|
762
|
-
"description": "
|
|
772
|
+
"description": "Fills multiple form fields in one call; each is focused, cleared, then set via Input.insertText (overwrites existing content, same as fill). Each entry in the non-empty 'fields' array takes exactly one of uid or selector plus a string value.",
|
|
763
773
|
"inputSchema": {
|
|
764
774
|
"type": "object",
|
|
765
775
|
"properties": {
|
|
766
776
|
"lease": {
|
|
767
777
|
"type": "string",
|
|
768
|
-
"description": "
|
|
778
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
769
779
|
},
|
|
770
780
|
"target": {
|
|
771
781
|
"type": "string",
|
|
772
|
-
"description": "
|
|
782
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
773
783
|
},
|
|
774
784
|
"fields": {
|
|
775
785
|
"type": "array",
|
|
@@ -805,29 +815,29 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
805
815
|
},
|
|
806
816
|
{
|
|
807
817
|
"name": "type_text",
|
|
808
|
-
"description": "
|
|
818
|
+
"description": "Focuses an element and appends text via Input.insertText without clearing first — closest primitive to typing, but still atomic (not per-character keystrokes). Give exactly one of uid or selector.",
|
|
809
819
|
"inputSchema": {
|
|
810
820
|
"type": "object",
|
|
811
821
|
"properties": {
|
|
812
822
|
"lease": {
|
|
813
823
|
"type": "string",
|
|
814
|
-
"description": "
|
|
824
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
815
825
|
},
|
|
816
826
|
"target": {
|
|
817
827
|
"type": "string",
|
|
818
|
-
"description": "
|
|
828
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
819
829
|
},
|
|
820
830
|
"uid": {
|
|
821
831
|
"type": "number",
|
|
822
|
-
"description": "CDP backendDOMNodeId of the element to type into,
|
|
832
|
+
"description": "CDP backendDOMNodeId of the element to type into, from take_snapshot. Exactly one of uid or selector."
|
|
823
833
|
},
|
|
824
834
|
"selector": {
|
|
825
835
|
"type": "string",
|
|
826
|
-
"description": "CSS selector for the element to type into (
|
|
836
|
+
"description": "CSS selector for the element to type into (document.querySelector). Exactly one of uid or selector."
|
|
827
837
|
},
|
|
828
838
|
"text": {
|
|
829
839
|
"type": "string",
|
|
830
|
-
"description": "
|
|
840
|
+
"description": "Text to insert; appended to existing content rather than overwriting it."
|
|
831
841
|
}
|
|
832
842
|
},
|
|
833
843
|
"required": [
|
|
@@ -838,25 +848,25 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
838
848
|
},
|
|
839
849
|
{
|
|
840
850
|
"name": "press_key",
|
|
841
|
-
"description": "
|
|
851
|
+
"description": "Dispatches a keyDown/keyUp pair for one key with optional modifiers. 'key' is a named key (Enter, Tab, Escape, ArrowDown, Backspace, etc.) or a single printable character — the named-key table is curated, with no F-keys, numpad, or IME support.",
|
|
842
852
|
"inputSchema": {
|
|
843
853
|
"type": "object",
|
|
844
854
|
"properties": {
|
|
845
855
|
"lease": {
|
|
846
856
|
"type": "string",
|
|
847
|
-
"description": "
|
|
857
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
848
858
|
},
|
|
849
859
|
"target": {
|
|
850
860
|
"type": "string",
|
|
851
|
-
"description": "
|
|
861
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
852
862
|
},
|
|
853
863
|
"key": {
|
|
854
864
|
"type": "string",
|
|
855
|
-
"description": "Key to press: a named key
|
|
865
|
+
"description": "Key to press: a named key (Enter, Tab, Escape, ArrowDown, Backspace, ...) or a single printable character."
|
|
856
866
|
},
|
|
857
867
|
"modifiers": {
|
|
858
868
|
"type": "array",
|
|
859
|
-
"description": "
|
|
869
|
+
"description": "Modifier names held during the press: 'Control'/'Ctrl', 'Shift', 'Alt', 'Meta'/'Cmd'.",
|
|
860
870
|
"items": {
|
|
861
871
|
"type": "string"
|
|
862
872
|
}
|
|
@@ -870,32 +880,32 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
870
880
|
},
|
|
871
881
|
{
|
|
872
882
|
"name": "upload_file",
|
|
873
|
-
"description": "
|
|
883
|
+
"description": "Attaches one or more files to an <input type=file> element via DOM.setFileInputFiles. Give exactly one of uid or selector for the input; 'files' is an array of absolute path(s) — wrap a single path in an array too.",
|
|
874
884
|
"inputSchema": {
|
|
875
885
|
"type": "object",
|
|
876
886
|
"properties": {
|
|
877
887
|
"lease": {
|
|
878
888
|
"type": "string",
|
|
879
|
-
"description": "
|
|
889
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
880
890
|
},
|
|
881
891
|
"target": {
|
|
882
892
|
"type": "string",
|
|
883
|
-
"description": "
|
|
893
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
884
894
|
},
|
|
885
895
|
"uid": {
|
|
886
896
|
"type": "number",
|
|
887
|
-
"description": "CDP backendDOMNodeId of the file input element,
|
|
897
|
+
"description": "CDP backendDOMNodeId of the file input element, from take_snapshot. Exactly one of uid or selector."
|
|
888
898
|
},
|
|
889
899
|
"selector": {
|
|
890
900
|
"type": "string",
|
|
891
|
-
"description": "CSS selector for the file input element (
|
|
901
|
+
"description": "CSS selector for the file input element (document.querySelector). Exactly one of uid or selector."
|
|
892
902
|
},
|
|
893
903
|
"files": {
|
|
894
904
|
"type": "array",
|
|
895
905
|
"items": {
|
|
896
906
|
"type": "string"
|
|
897
907
|
},
|
|
898
|
-
"description": "Absolute path(s) to
|
|
908
|
+
"description": "Absolute path(s) to attach to the <input type=file>, as an array — wrap a single path too, e.g. [\"/tmp/a.pdf\"]. Array-only because some model APIs (Google Gemini function calling) reject union-typed parameters."
|
|
899
909
|
}
|
|
900
910
|
},
|
|
901
911
|
"required": [
|
|
@@ -906,17 +916,17 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
906
916
|
},
|
|
907
917
|
{
|
|
908
918
|
"name": "take_screenshot",
|
|
909
|
-
"description": "
|
|
919
|
+
"description": "Captures the viewport (default), the full scrollable page (fullPage), or one element (uid or selector, mutually exclusive) via CDP Page.captureScreenshot. Past 16384 device px per side Chrome can hang rather than refuse, so size is checked first via Page.getLayoutMetrics; an oversized capture is auto-tiled into vertical bands stitched losslessly into one PNG (see tile) instead of wedging the tab. Writes PNG/JPEG to /tmp/cdp-toolkit (override savePath, dir auto-created); returns {path,bytes,format,target,scale} plus width/height measured from the encoded bytes (omitted if undecodable). renderSize/renderRestored(+renderRestoreError) accompany a renderWidth/renderHeight capture, tiled/bands a banded one. returnBase64 adds raw bytes to the result but is refused on a banded capture. quality applies to jpeg only.",
|
|
910
920
|
"inputSchema": {
|
|
911
921
|
"type": "object",
|
|
912
922
|
"properties": {
|
|
913
923
|
"lease": {
|
|
914
924
|
"type": "string",
|
|
915
|
-
"description": "
|
|
925
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
916
926
|
},
|
|
917
927
|
"target": {
|
|
918
928
|
"type": "string",
|
|
919
|
-
"description": "
|
|
929
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
920
930
|
},
|
|
921
931
|
"format": {
|
|
922
932
|
"type": "string",
|
|
@@ -924,35 +934,35 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
924
934
|
"png",
|
|
925
935
|
"jpeg"
|
|
926
936
|
],
|
|
927
|
-
"description": "Image format
|
|
937
|
+
"description": "Image format, default png. quality applies only to jpeg."
|
|
928
938
|
},
|
|
929
939
|
"quality": {
|
|
930
940
|
"type": "number",
|
|
931
|
-
"description": "JPEG quality 0-100
|
|
941
|
+
"description": "JPEG quality 0-100, default 80; ignored for png."
|
|
932
942
|
},
|
|
933
943
|
"fullPage": {
|
|
934
944
|
"type": "boolean",
|
|
935
|
-
"description": "Capture the full scrollable
|
|
945
|
+
"description": "Capture the full scrollable height (via Page.getLayoutMetrics), not just the viewport."
|
|
936
946
|
},
|
|
937
947
|
"scale": {
|
|
938
948
|
"type": "number",
|
|
939
|
-
"description": "Output-pixel multiplier for this
|
|
949
|
+
"description": "Output-pixel multiplier for this capture only (0<scale<=8, default 1): output px = ceil(css px x scale x devicePixelRatio); the page is never told anything changed. Chrome only (screenshot.scale) — Firefox BiDi has no scale param, use emulate{deviceScaleFactor} then scale:1. A projection over 16384 device px/side is refused up front, naming the largest scale that fits."
|
|
940
950
|
},
|
|
941
951
|
"renderWidth": {
|
|
942
952
|
"type": "number",
|
|
943
|
-
"description": "
|
|
953
|
+
"description": "Emulates this viewport width (CSS px, 1-16384) for one capture, then restores it. Required with renderHeight. Unlike scale, this changes what the page believes (media queries re-flow) — e.g. capture a responsive page at 1920x1080 from a differently-sized tab. Restore only works for an override this toolkit itself set; check result.renderRestored (false = still emulated, fix via emulate). Works on both backends (capability screenshot.renderSize)."
|
|
944
954
|
},
|
|
945
955
|
"renderHeight": {
|
|
946
956
|
"type": "number",
|
|
947
|
-
"description": "
|
|
957
|
+
"description": "Emulates this viewport height (CSS px, 1-16384) for one capture. Required with renderWidth — a viewport is two numbers. A narrow renderWidth often reflows pages TALLER, which is the usual way a render-size capture trips the 16384px encode limit."
|
|
948
958
|
},
|
|
949
959
|
"tile": {
|
|
950
960
|
"type": "boolean",
|
|
951
|
-
"description": "Whether
|
|
961
|
+
"description": "Whether to allow vertical-band stitching: omitted=AUTO (band only if a single shot wouldn't fit), false=never band (refuse instead), true=always band (Chrome-only capability). Banded output is PNG-only, can't returnBase64, and only bands on HEIGHT (oversized WIDTH is refused, not split). Bands are a faithful crop, but lazy/virtualized content the real viewport never scrolled to renders blank."
|
|
952
962
|
},
|
|
953
963
|
"uid": {
|
|
954
964
|
"type": "number",
|
|
955
|
-
"description": "Element to clip to: a
|
|
965
|
+
"description": "Element to clip to: a backendDOMNodeId from take_snapshot. Mutually exclusive with selector."
|
|
956
966
|
},
|
|
957
967
|
"selector": {
|
|
958
968
|
"type": "string",
|
|
@@ -960,11 +970,11 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
960
970
|
},
|
|
961
971
|
"savePath": {
|
|
962
972
|
"type": "string",
|
|
963
|
-
"description": "Override the output
|
|
973
|
+
"description": "Override the output path (default /tmp/cdp-toolkit/screenshot-<id>-<stamp>.<ext>, stamped at capture START). Directory is created from this path's dirname."
|
|
964
974
|
},
|
|
965
975
|
"returnBase64": {
|
|
966
976
|
"type": "boolean",
|
|
967
|
-
"description": "Also return
|
|
977
|
+
"description": "Also return raw base64 bytes in the result. Refused on a banded capture (see tile) — a stitched image can run to hundreds of MB; read the file at the returned path instead."
|
|
968
978
|
}
|
|
969
979
|
},
|
|
970
980
|
"required": [],
|
|
@@ -973,41 +983,41 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
973
983
|
},
|
|
974
984
|
{
|
|
975
985
|
"name": "emulate",
|
|
976
|
-
"description": "
|
|
986
|
+
"description": "Applies any subset of Chrome emulation overrides in one call: device metrics (width+height together, +deviceScaleFactor/mobile), userAgent, cpuThrottlingRate(>=1), media type+features, networkConditions. Device-metrics overrides PERSIST on the target until cleared or the renderer navigates/reloads; every other override is session-scoped and resets when this call's connection closes. clearOverrides:true resets everything (ignoring other fields) and, as of 1.9.2, genuinely clears a device-metrics override set by a DIFFERENT process — Chrome's clearDeviceMetricsOverride is normally a no-op unless the clearing connection also set the override, so the driver re-asserts the tab's current size first, then clears, throwing rather than reporting cleared:true if it can't verify.",
|
|
977
987
|
"inputSchema": {
|
|
978
988
|
"type": "object",
|
|
979
989
|
"properties": {
|
|
980
990
|
"lease": {
|
|
981
991
|
"type": "string",
|
|
982
|
-
"description": "
|
|
992
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
983
993
|
},
|
|
984
994
|
"target": {
|
|
985
995
|
"type": "string",
|
|
986
|
-
"description": "
|
|
996
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
987
997
|
},
|
|
988
998
|
"width": {
|
|
989
999
|
"type": "number",
|
|
990
|
-
"description": "Device-metrics viewport width in CSS
|
|
1000
|
+
"description": "Device-metrics viewport width in CSS px. Must be paired with height."
|
|
991
1001
|
},
|
|
992
1002
|
"height": {
|
|
993
1003
|
"type": "number",
|
|
994
|
-
"description": "Device-metrics viewport height in CSS
|
|
1004
|
+
"description": "Device-metrics viewport height in CSS px. Must be paired with width."
|
|
995
1005
|
},
|
|
996
1006
|
"deviceScaleFactor": {
|
|
997
1007
|
"type": "number",
|
|
998
|
-
"description": "Device pixel ratio
|
|
1008
|
+
"description": "Device pixel ratio for the device-metrics override; 0 = platform default."
|
|
999
1009
|
},
|
|
1000
1010
|
"mobile": {
|
|
1001
1011
|
"type": "boolean",
|
|
1002
|
-
"description": "
|
|
1012
|
+
"description": "Emulate a mobile device (viewport meta, scrollbars, etc.) for the device-metrics override."
|
|
1003
1013
|
},
|
|
1004
1014
|
"userAgent": {
|
|
1005
1015
|
"type": "string",
|
|
1006
|
-
"description": "User-Agent string
|
|
1016
|
+
"description": "User-Agent string override (Emulation.setUserAgentOverride)."
|
|
1007
1017
|
},
|
|
1008
1018
|
"cpuThrottlingRate": {
|
|
1009
1019
|
"type": "number",
|
|
1010
|
-
"description": "CPU throttling multiplier: 1
|
|
1020
|
+
"description": "CPU throttling multiplier: 1=none, 2=2x slower, etc. Must be >=1."
|
|
1011
1021
|
},
|
|
1012
1022
|
"media": {
|
|
1013
1023
|
"type": "string",
|
|
@@ -1015,7 +1025,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1015
1025
|
},
|
|
1016
1026
|
"mediaFeatures": {
|
|
1017
1027
|
"type": "array",
|
|
1018
|
-
"description": "Emulated media features, e.g. [{
|
|
1028
|
+
"description": "Emulated media features, e.g. [{name:'prefers-color-scheme', value:'dark'}].",
|
|
1019
1029
|
"items": {
|
|
1020
1030
|
"type": "object",
|
|
1021
1031
|
"properties": {
|
|
@@ -1037,7 +1047,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1037
1047
|
},
|
|
1038
1048
|
"networkConditions": {
|
|
1039
1049
|
"type": "object",
|
|
1040
|
-
"description": "Network
|
|
1050
|
+
"description": "Network overrides applied via Network.emulateNetworkConditions.",
|
|
1041
1051
|
"properties": {
|
|
1042
1052
|
"offline": {
|
|
1043
1053
|
"type": "boolean",
|
|
@@ -1064,7 +1074,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1064
1074
|
},
|
|
1065
1075
|
"clearOverrides": {
|
|
1066
1076
|
"type": "boolean",
|
|
1067
|
-
"description": "Reset every override (
|
|
1077
|
+
"description": "Reset every override (metrics, UA, CPU, media, network) to browser default; ignores all other fields when true."
|
|
1068
1078
|
}
|
|
1069
1079
|
},
|
|
1070
1080
|
"required": [],
|
|
@@ -1073,33 +1083,33 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1073
1083
|
},
|
|
1074
1084
|
{
|
|
1075
1085
|
"name": "resize_page",
|
|
1076
|
-
"description": "
|
|
1086
|
+
"description": "Sets the page's device-metrics width/height (the narrow case of emulate), optionally deviceScaleFactor/mobile, then verifies by reading back window.innerWidth/innerHeight after applying. Requires positive width and height. The override PERSISTS on the target until cleared (emulate{clearOverrides:true}) or the renderer navigates/reloads.",
|
|
1077
1087
|
"inputSchema": {
|
|
1078
1088
|
"type": "object",
|
|
1079
1089
|
"properties": {
|
|
1080
1090
|
"lease": {
|
|
1081
1091
|
"type": "string",
|
|
1082
|
-
"description": "
|
|
1092
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1083
1093
|
},
|
|
1084
1094
|
"target": {
|
|
1085
1095
|
"type": "string",
|
|
1086
|
-
"description": "
|
|
1096
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
1087
1097
|
},
|
|
1088
1098
|
"width": {
|
|
1089
1099
|
"type": "number",
|
|
1090
|
-
"description": "Viewport width in CSS
|
|
1100
|
+
"description": "Viewport width in CSS px (required, must be positive)."
|
|
1091
1101
|
},
|
|
1092
1102
|
"height": {
|
|
1093
1103
|
"type": "number",
|
|
1094
|
-
"description": "Viewport height in CSS
|
|
1104
|
+
"description": "Viewport height in CSS px (required, must be positive)."
|
|
1095
1105
|
},
|
|
1096
1106
|
"deviceScaleFactor": {
|
|
1097
1107
|
"type": "number",
|
|
1098
|
-
"description": "Device pixel ratio
|
|
1108
|
+
"description": "Device pixel ratio; 0 = platform default."
|
|
1099
1109
|
},
|
|
1100
1110
|
"mobile": {
|
|
1101
1111
|
"type": "boolean",
|
|
1102
|
-
"description": "
|
|
1112
|
+
"description": "Emulate a mobile device for the device-metrics override."
|
|
1103
1113
|
}
|
|
1104
1114
|
},
|
|
1105
1115
|
"required": [
|
|
@@ -1111,17 +1121,17 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1111
1121
|
},
|
|
1112
1122
|
{
|
|
1113
1123
|
"name": "handle_dialog",
|
|
1114
|
-
"description": "Wait for the next JavaScript dialog (alert/confirm/prompt/beforeunload) on a page and respond via Page.handleJavaScriptDialog, accepting or dismissing it. Default mode resolves with the first handled dialog or throws on timeout; set autoMs to handle every dialog opening during a fixed window and resolve with the list.
|
|
1124
|
+
"description": "Wait for the next JavaScript dialog (alert/confirm/prompt/beforeunload) on a page and respond via Page.handleJavaScriptDialog, accepting or dismissing it. Default mode resolves with the first handled dialog or throws on timeout; set autoMs to handle every dialog opening during a fixed window and resolve with the list. Trigger the dialog out-of-band (e.g. click a button) — a blocking dialog freezes the renderer, so it cannot be triggered inline.",
|
|
1115
1125
|
"inputSchema": {
|
|
1116
1126
|
"type": "object",
|
|
1117
1127
|
"properties": {
|
|
1118
1128
|
"lease": {
|
|
1119
1129
|
"type": "string",
|
|
1120
|
-
"description": "
|
|
1130
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1121
1131
|
},
|
|
1122
1132
|
"target": {
|
|
1123
1133
|
"type": "string",
|
|
1124
|
-
"description": "
|
|
1134
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
1125
1135
|
},
|
|
1126
1136
|
"accept": {
|
|
1127
1137
|
"type": "boolean",
|
|
@@ -1133,7 +1143,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1133
1143
|
},
|
|
1134
1144
|
"timeoutMs": {
|
|
1135
1145
|
"type": "number",
|
|
1136
|
-
"description": "How long to wait for the next dialog in milliseconds (default 15000)."
|
|
1146
|
+
"description": "How long to wait for the next dialog, in milliseconds (default 15000)."
|
|
1137
1147
|
},
|
|
1138
1148
|
"autoMs": {
|
|
1139
1149
|
"type": "number",
|
|
@@ -1148,29 +1158,29 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1148
1158
|
},
|
|
1149
1159
|
{
|
|
1150
1160
|
"name": "list_console_messages",
|
|
1151
|
-
"description": "Read console output (logs, warnings, exceptions) captured for the target
|
|
1161
|
+
"description": "Read console output (logs, warnings, exceptions) captured for the target. Reads the existing shared buffer by default (empty if no capture ran); reload:true reloads and records a fresh capture (console+network together, so a network reload never wipes console history). WORKER capture (Chrome, Capability 'worker.targets'): a worker: target records an MV3 background service worker -- its console.log arrives as Runtime.consoleAPICalled, its outbound requests from CDP's Network domain on the worker's own session -- so the two tricks callers try first fail for plain JS reasons, not worker ones: a value bound at module top level is not visible from evaluate_script's global scope, and assigning self.fetch cannot rebind a fetch the module already captured. A worker has no reload: reload:true means 'listen for durationMs while it runs', so trigger its work (tool call, message, alarm) during the window; a worker woken by the call already ran its top-level code, so a startup message can be missed. SIDE EFFECT: the CDP session KEEPS THE WORKER ALIVE for the capture (an idle MV3 worker is evicted in seconds); Chrome resumes evicting after.",
|
|
1152
1162
|
"inputSchema": {
|
|
1153
1163
|
"type": "object",
|
|
1154
1164
|
"properties": {
|
|
1155
1165
|
"lease": {
|
|
1156
1166
|
"type": "string",
|
|
1157
|
-
"description": "
|
|
1167
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1158
1168
|
},
|
|
1159
1169
|
"target": {
|
|
1160
1170
|
"type": "string",
|
|
1161
|
-
"description": "
|
|
1171
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', '<targetId>'; plus 'worker:<substring>' to reach a service/shared worker (e.g. an MV3 extension background worker). The worker: arm is CHROME-ONLY (Capability 'worker.targets'). Grammar: see server instructions."
|
|
1162
1172
|
},
|
|
1163
1173
|
"reload": {
|
|
1164
1174
|
"type": "boolean",
|
|
1165
|
-
"description": "Record fresh by reloading the page and capturing
|
|
1175
|
+
"description": "Record fresh by reloading the page and capturing a window. Default false (read existing buffer). With a worker: target nothing reloads -- records for durationMs while the worker runs and keeps it alive until the capture stops."
|
|
1166
1176
|
},
|
|
1167
1177
|
"durationMs": {
|
|
1168
1178
|
"type": "number",
|
|
1169
|
-
"description": "Capture window for reload mode, in
|
|
1179
|
+
"description": "Capture window for reload mode, in ms. Default 2500."
|
|
1170
1180
|
},
|
|
1171
1181
|
"wake": {
|
|
1172
1182
|
"type": "boolean",
|
|
1173
|
-
"description": "Worker targets only,
|
|
1183
|
+
"description": "Worker targets only, when starting a capture. Default true: an idle-evicted MV3 service worker exists in no target listing, so it is started first (ServiceWorker.startWorker) and re-confirmed; false fails fast. Rejected on a page target, a bare target id, or a read-only call. See server instructions."
|
|
1174
1184
|
}
|
|
1175
1185
|
},
|
|
1176
1186
|
"required": [],
|
|
@@ -1179,17 +1189,17 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1179
1189
|
},
|
|
1180
1190
|
{
|
|
1181
1191
|
"name": "get_console_message",
|
|
1182
|
-
"description": "Return
|
|
1192
|
+
"description": "Return one console entry by zero-based index from the target's existing console buffer. Throws if the index is out of range; run list_console_messages (optionally reload:true) first to populate the buffer.",
|
|
1183
1193
|
"inputSchema": {
|
|
1184
1194
|
"type": "object",
|
|
1185
1195
|
"properties": {
|
|
1186
1196
|
"lease": {
|
|
1187
1197
|
"type": "string",
|
|
1188
|
-
"description": "
|
|
1198
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1189
1199
|
},
|
|
1190
1200
|
"target": {
|
|
1191
1201
|
"type": "string",
|
|
1192
|
-
"description": "
|
|
1202
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
1193
1203
|
},
|
|
1194
1204
|
"index": {
|
|
1195
1205
|
"type": "number",
|
|
@@ -1202,33 +1212,33 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1202
1212
|
},
|
|
1203
1213
|
{
|
|
1204
1214
|
"name": "list_network_requests",
|
|
1205
|
-
"description": "Return correlated network
|
|
1215
|
+
"description": "Return correlated network rows (one per requestId; status/headers/state) for the target. Reads the existing buffer by default; reload:true records a fresh both-domains capture window. filterUrl keeps only URLs containing a substring. WORKER capture (Chrome, Capability 'worker.targets'): a worker: target records an MV3 background service worker's outbound requests from CDP's Network domain on the worker's own session -- what the code ACTUALLY SENT -- so the two tricks callers try first fail for plain JS reasons, not worker ones: a value bound at module top level is not visible from evaluate_script's global scope, and assigning self.fetch cannot rebind a fetch the module already captured. A worker has no reload: reload:true means 'listen for durationMs while it runs', so trigger its work (tool call, message, alarm) during the window; a worker woken by the call already ran its top-level code, so a startup request can be missed. SIDE EFFECT: the CDP session KEEPS THE WORKER ALIVE for the capture (an idle MV3 worker is evicted in seconds); Chrome resumes evicting after.",
|
|
1206
1216
|
"inputSchema": {
|
|
1207
1217
|
"type": "object",
|
|
1208
1218
|
"properties": {
|
|
1209
1219
|
"lease": {
|
|
1210
1220
|
"type": "string",
|
|
1211
|
-
"description": "
|
|
1221
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1212
1222
|
},
|
|
1213
1223
|
"target": {
|
|
1214
1224
|
"type": "string",
|
|
1215
|
-
"description": "
|
|
1225
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', '<targetId>'; plus 'worker:<substring>' to reach a service/shared worker (e.g. an MV3 extension background worker). The worker: arm is CHROME-ONLY (Capability 'worker.targets'). Grammar: see server instructions."
|
|
1216
1226
|
},
|
|
1217
1227
|
"reload": {
|
|
1218
1228
|
"type": "boolean",
|
|
1219
|
-
"description": "Record fresh by reloading the page and capturing
|
|
1229
|
+
"description": "Record fresh by reloading the page and capturing a window. Default false (read existing buffer). With a worker: target nothing reloads -- records for durationMs while the worker runs and keeps it alive until the capture stops."
|
|
1220
1230
|
},
|
|
1221
1231
|
"durationMs": {
|
|
1222
1232
|
"type": "number",
|
|
1223
|
-
"description": "Capture window for reload mode, in
|
|
1233
|
+
"description": "Capture window for reload mode, in ms. Default 2500."
|
|
1224
1234
|
},
|
|
1225
1235
|
"filterUrl": {
|
|
1226
1236
|
"type": "string",
|
|
1227
|
-
"description": "
|
|
1237
|
+
"description": "Return only requests whose URL contains this substring."
|
|
1228
1238
|
},
|
|
1229
1239
|
"wake": {
|
|
1230
1240
|
"type": "boolean",
|
|
1231
|
-
"description": "Worker targets only,
|
|
1241
|
+
"description": "Worker targets only, when starting a capture. Default true: an idle-evicted MV3 service worker exists in no target listing, so it is started first (ServiceWorker.startWorker) and re-confirmed; false fails fast. Rejected on a page target, a bare target id, or a read-only call. See server instructions."
|
|
1232
1242
|
}
|
|
1233
1243
|
},
|
|
1234
1244
|
"required": [],
|
|
@@ -1237,21 +1247,21 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1237
1247
|
},
|
|
1238
1248
|
{
|
|
1239
1249
|
"name": "get_network_request",
|
|
1240
|
-
"description": "Return one network request (matched by exact requestId, else
|
|
1250
|
+
"description": "Return one network request (matched by exact requestId, else url substring) with status/headers. Requires requestId or url (throws otherwise). includeBody:true drives a fresh capture (page reload, or worker listen window) matched by url ONLY -- a fresh capture re-mints requestIds, so a carried-over requestId returns metadata plus bodyUnavailableReason. WORKER capture (Chrome, Capability 'worker.targets'): a worker: target records an MV3 background service worker's outbound requests from CDP's Network domain on the worker's own session -- what the code ACTUALLY SENT -- so the two tricks callers try first fail for plain JS reasons, not worker ones: a value bound at module top level is not visible from evaluate_script's global scope, and assigning self.fetch cannot rebind a fetch the module already captured. A worker has no reload: reload means 'listen for durationMs while it runs', so trigger its work (tool call, message, alarm) during the window; a worker woken by the call already ran its top-level code, so a startup request can be missed. SIDE EFFECT: the CDP session KEEPS THE WORKER ALIVE for the capture (an idle MV3 worker is evicted in seconds); Chrome resumes evicting after.",
|
|
1241
1251
|
"inputSchema": {
|
|
1242
1252
|
"type": "object",
|
|
1243
1253
|
"properties": {
|
|
1244
1254
|
"lease": {
|
|
1245
1255
|
"type": "string",
|
|
1246
|
-
"description": "
|
|
1256
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1247
1257
|
},
|
|
1248
1258
|
"target": {
|
|
1249
1259
|
"type": "string",
|
|
1250
|
-
"description": "
|
|
1260
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', '<targetId>'; plus 'worker:<substring>' to reach a service/shared worker (e.g. an MV3 extension background worker). The worker: arm is CHROME-ONLY (Capability 'worker.targets'). Grammar: see server instructions."
|
|
1251
1261
|
},
|
|
1252
1262
|
"requestId": {
|
|
1253
1263
|
"type": "string",
|
|
1254
|
-
"description": "Match by exact requestId (metadata only
|
|
1264
|
+
"description": "Match by exact requestId (metadata only; cannot fetch a body, since a reload re-mints requestIds)."
|
|
1255
1265
|
},
|
|
1256
1266
|
"url": {
|
|
1257
1267
|
"type": "string",
|
|
@@ -1259,15 +1269,15 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1259
1269
|
},
|
|
1260
1270
|
"includeBody": {
|
|
1261
1271
|
"type": "boolean",
|
|
1262
|
-
"description": "Also fetch the response body; drives a fresh
|
|
1272
|
+
"description": "Also fetch the response body; drives a fresh capture and requires the url selector."
|
|
1263
1273
|
},
|
|
1264
1274
|
"durationMs": {
|
|
1265
1275
|
"type": "number",
|
|
1266
|
-
"description": "Capture window for the
|
|
1276
|
+
"description": "Capture window for the body-fetch reload, in ms. Default 2500."
|
|
1267
1277
|
},
|
|
1268
1278
|
"wake": {
|
|
1269
1279
|
"type": "boolean",
|
|
1270
|
-
"description": "Worker targets only,
|
|
1280
|
+
"description": "Worker targets only, when starting a capture. Default true: an idle-evicted MV3 service worker exists in no target listing, so it is started first (ServiceWorker.startWorker) and re-confirmed; false fails fast. Rejected on a page target, a bare target id, or a read-only call. See server instructions."
|
|
1271
1281
|
}
|
|
1272
1282
|
},
|
|
1273
1283
|
"required": [],
|
|
@@ -1276,24 +1286,24 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1276
1286
|
},
|
|
1277
1287
|
{
|
|
1278
1288
|
"name": "performance_start_trace",
|
|
1279
|
-
"description": "
|
|
1289
|
+
"description": "Starts a CDP trace recording on the target and holds the recording connection in-process; you MUST call performance_stop_trace from the SAME PROCESS to end it, or use performance_trace instead for a robust cross-call trace. Throws if a trace is already in progress for this target.",
|
|
1280
1290
|
"inputSchema": {
|
|
1281
1291
|
"type": "object",
|
|
1282
1292
|
"properties": {
|
|
1283
1293
|
"lease": {
|
|
1284
1294
|
"type": "string",
|
|
1285
|
-
"description": "
|
|
1295
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1286
1296
|
},
|
|
1287
1297
|
"target": {
|
|
1288
1298
|
"type": "string",
|
|
1289
|
-
"description": "
|
|
1299
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
1290
1300
|
},
|
|
1291
1301
|
"categories": {
|
|
1292
1302
|
"type": "array",
|
|
1293
1303
|
"items": {
|
|
1294
1304
|
"type": "string"
|
|
1295
1305
|
},
|
|
1296
|
-
"description": "Trace categories to
|
|
1306
|
+
"description": "Trace categories to record. Defaults to timeline + user-timing + loading + disabled-by-default timeline tracks carrying LCP/LayoutShift/RunTask."
|
|
1297
1307
|
}
|
|
1298
1308
|
},
|
|
1299
1309
|
"required": [],
|
|
@@ -1302,17 +1312,17 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1302
1312
|
},
|
|
1303
1313
|
{
|
|
1304
1314
|
"name": "performance_stop_trace",
|
|
1305
|
-
"description": "
|
|
1315
|
+
"description": "Stops the in-process trace started by performance_start_trace and writes it as JSON under /tmp/cdp-toolkit, returning {path,bytes,events,metrics}. Throws if no live trace exists in THIS process (e.g. start ran in a different process) — use performance_trace instead. The target arg is accepted only for API symmetry; at most one trace is ever live per process.",
|
|
1306
1316
|
"inputSchema": {
|
|
1307
1317
|
"type": "object",
|
|
1308
1318
|
"properties": {
|
|
1309
1319
|
"lease": {
|
|
1310
1320
|
"type": "string",
|
|
1311
|
-
"description": "
|
|
1321
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1312
1322
|
},
|
|
1313
1323
|
"target": {
|
|
1314
1324
|
"type": "string",
|
|
1315
|
-
"description": "
|
|
1325
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
1316
1326
|
}
|
|
1317
1327
|
},
|
|
1318
1328
|
"required": [],
|
|
@@ -1321,17 +1331,17 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1321
1331
|
},
|
|
1322
1332
|
{
|
|
1323
1333
|
"name": "performance_analyze_insight",
|
|
1324
|
-
"description": "
|
|
1334
|
+
"description": "Reads a trace JSON file (from performance_trace/performance_stop_trace) at tracePath and returns headline metrics: FCP/LCP/CLS/TBT, long tasks, layout shifts. Requires an EXPLICIT tracePath — there is no implicit 'latest trace'. Numbers approximate DevTools's insight analyzer (no main-thread attribution or frame-scoped LCP).",
|
|
1325
1335
|
"inputSchema": {
|
|
1326
1336
|
"type": "object",
|
|
1327
1337
|
"properties": {
|
|
1328
1338
|
"lease": {
|
|
1329
1339
|
"type": "string",
|
|
1330
|
-
"description": "
|
|
1340
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1331
1341
|
},
|
|
1332
1342
|
"tracePath": {
|
|
1333
1343
|
"type": "string",
|
|
1334
|
-
"description": "
|
|
1344
|
+
"description": "Path to a trace JSON file (bare array or {traceEvents:[...]}) written by performance_trace or performance_stop_trace. Required."
|
|
1335
1345
|
}
|
|
1336
1346
|
},
|
|
1337
1347
|
"required": [],
|
|
@@ -1340,25 +1350,25 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1340
1350
|
},
|
|
1341
1351
|
{
|
|
1342
1352
|
"name": "performance_trace",
|
|
1343
|
-
"description": "
|
|
1353
|
+
"description": "RECOMMENDED entry point: one-shot trace that starts tracing, optionally reloads or navigates the page, waits durationMs (default 3000ms), stops, and writes JSON under /tmp/cdp-toolkit — returns {path,bytes,events,metrics,target}. Holds one connection open for the whole window, so unlike start/stop it is NOT limited to a single process.",
|
|
1344
1354
|
"inputSchema": {
|
|
1345
1355
|
"type": "object",
|
|
1346
1356
|
"properties": {
|
|
1347
1357
|
"lease": {
|
|
1348
1358
|
"type": "string",
|
|
1349
|
-
"description": "
|
|
1359
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1350
1360
|
},
|
|
1351
1361
|
"target": {
|
|
1352
1362
|
"type": "string",
|
|
1353
|
-
"description": "
|
|
1363
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
1354
1364
|
},
|
|
1355
1365
|
"durationMs": {
|
|
1356
1366
|
"type": "number",
|
|
1357
|
-
"description": "How long to record after the optional reload/navigate, in
|
|
1367
|
+
"description": "How long to record after the optional reload/navigate, in ms. Default 3000."
|
|
1358
1368
|
},
|
|
1359
1369
|
"reload": {
|
|
1360
1370
|
"type": "boolean",
|
|
1361
|
-
"description": "Reload the page after starting the trace to capture full navigation timing."
|
|
1371
|
+
"description": "Reload the page after starting the trace, to capture full navigation timing."
|
|
1362
1372
|
},
|
|
1363
1373
|
"navigateTo": {
|
|
1364
1374
|
"type": "string",
|
|
@@ -1369,7 +1379,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1369
1379
|
"items": {
|
|
1370
1380
|
"type": "string"
|
|
1371
1381
|
},
|
|
1372
|
-
"description": "Trace categories to
|
|
1382
|
+
"description": "Trace categories to record. Defaults to timeline + user-timing + loading + disabled-by-default timeline tracks carrying LCP/LayoutShift/RunTask."
|
|
1373
1383
|
}
|
|
1374
1384
|
},
|
|
1375
1385
|
"required": [],
|
|
@@ -1378,17 +1388,17 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1378
1388
|
},
|
|
1379
1389
|
{
|
|
1380
1390
|
"name": "start_screen_recording",
|
|
1381
|
-
"description": "
|
|
1391
|
+
"description": "Starts recording the target tab to video via CDP Page.startScreencast, holding one persistent connection and spooling every frame to disk — MUST be paired with stop_screen_recording WITHIN THE SAME PROCESS (frames are connection-scoped and cannot be reattached from another process, so this only works under the MCP server, not the one-process-per-call CLI). Chrome only: WebDriver BiDi has no screencast primitive, so both tools are absent under --browser firefox. Frames arrive ON REPAINT not on a clock (variable rate); each is timestamped into a ledger that stop_screen_recording turns into per-frame display durations, so a still page holds one long frame instead of racing. ffmpeg is probed here (not at stop) so a missing encoder fails before frames are captured and thrown away. Throws if the target already has a recording in progress; different targets record concurrently.",
|
|
1382
1392
|
"inputSchema": {
|
|
1383
1393
|
"type": "object",
|
|
1384
1394
|
"properties": {
|
|
1385
1395
|
"lease": {
|
|
1386
1396
|
"type": "string",
|
|
1387
|
-
"description": "
|
|
1397
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1388
1398
|
},
|
|
1389
1399
|
"target": {
|
|
1390
1400
|
"type": "string",
|
|
1391
|
-
"description": "
|
|
1401
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
1392
1402
|
},
|
|
1393
1403
|
"format": {
|
|
1394
1404
|
"type": "string",
|
|
@@ -1396,27 +1406,27 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1396
1406
|
"jpeg",
|
|
1397
1407
|
"png"
|
|
1398
1408
|
],
|
|
1399
|
-
"description": "Frame
|
|
1409
|
+
"description": "Frame format, default jpeg (much smaller per repaint); png is lossless. quality applies to jpeg only."
|
|
1400
1410
|
},
|
|
1401
1411
|
"quality": {
|
|
1402
1412
|
"type": "number",
|
|
1403
|
-
"description": "JPEG frame quality 0-100. Ignored for png
|
|
1413
|
+
"description": "JPEG frame quality 0-100. Ignored for png; omitted leaves Chrome's own default."
|
|
1404
1414
|
},
|
|
1405
1415
|
"maxWidth": {
|
|
1406
1416
|
"type": "number",
|
|
1407
|
-
"description": "
|
|
1417
|
+
"description": "Caps the streamed frame width in px; also pins frame size if the viewport may change mid-recording."
|
|
1408
1418
|
},
|
|
1409
1419
|
"maxHeight": {
|
|
1410
1420
|
"type": "number",
|
|
1411
|
-
"description": "
|
|
1421
|
+
"description": "Caps the streamed frame height in px."
|
|
1412
1422
|
},
|
|
1413
1423
|
"everyNthFrame": {
|
|
1414
1424
|
"type": "number",
|
|
1415
|
-
"description": "Capture only every Nth repaint (1
|
|
1425
|
+
"description": "Capture only every Nth repaint (1=every frame), to shrink spool size on a busy page; per-frame durations keep playback at wallclock speed either way."
|
|
1416
1426
|
},
|
|
1417
1427
|
"bringToFront": {
|
|
1418
1428
|
"type": "boolean",
|
|
1419
|
-
"description": "Activate the tab (Page.bringToFront) before recording
|
|
1429
|
+
"description": "Activate the tab (Page.bringToFront) before recording, default false. A backgrounded/occluded tab may never repaint, yielding a 0-frame recording."
|
|
1420
1430
|
}
|
|
1421
1431
|
},
|
|
1422
1432
|
"required": [],
|
|
@@ -1425,21 +1435,21 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1425
1435
|
},
|
|
1426
1436
|
{
|
|
1427
1437
|
"name": "stop_screen_recording",
|
|
1428
|
-
"description": "
|
|
1438
|
+
"description": "Stops the recording started by start_screen_recording, assembling spooled frames into an MP4 via ffmpeg with PER-FRAME durations (frame N held until N+1 painted; last frame held until this call) — capped at 25fps by ffmpeg's concat demuxer, so frames under 40ms apart are deliberately coalesced (frameCount=captured, encodedFrames=what reached the video, never silently dropped). Returns {path,bytes,durationMs,frameCount,encodedFrames,codec,encoder,width,height,droppedFrames,target}; durationMs sums encoded durations, the file runs one 40ms step longer (final frame repeated). Encoder ladder (probed at start): hevc_videotoolbox>h264_videotoolbox>libx265>libx264 (+hvc1 tag, faststart, yuv420p, even dims). target: omit with one recording in flight, required with several (avoids guessing which to stop). Throws if nothing is recording in this process, or if 0 frames arrived (no silent empty video). On ffmpeg failure the spooled frames are KEPT — spool path + exact command are in the error.",
|
|
1429
1439
|
"inputSchema": {
|
|
1430
1440
|
"type": "object",
|
|
1431
1441
|
"properties": {
|
|
1432
1442
|
"lease": {
|
|
1433
1443
|
"type": "string",
|
|
1434
|
-
"description": "
|
|
1444
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1435
1445
|
},
|
|
1436
1446
|
"target": {
|
|
1437
1447
|
"type": "string",
|
|
1438
|
-
"description": "Which recording to stop
|
|
1448
|
+
"description": "Which recording to stop — 'active' valid only when exactly one recording is in flight. Grammar: server instructions."
|
|
1439
1449
|
},
|
|
1440
1450
|
"savePath": {
|
|
1441
1451
|
"type": "string",
|
|
1442
|
-
"description": "Override the output
|
|
1452
|
+
"description": "Override the output path (default /tmp/cdp-toolkit/screen-recording-<targetIdShort>-<stamp>.mp4)."
|
|
1443
1453
|
}
|
|
1444
1454
|
},
|
|
1445
1455
|
"required": [],
|
|
@@ -1448,21 +1458,21 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1448
1458
|
},
|
|
1449
1459
|
{
|
|
1450
1460
|
"name": "take_heapsnapshot",
|
|
1451
|
-
"description": "
|
|
1461
|
+
"description": "Captures a V8 heap snapshot of the target page over CDP and writes it as a .heapsnapshot JSON file (loadable in the DevTools Memory panel) under /tmp/cdp-toolkit unless savePath is given. Returns {path,bytes,chunks,target} only — does NOT parse or summarize the snapshot.",
|
|
1452
1462
|
"inputSchema": {
|
|
1453
1463
|
"type": "object",
|
|
1454
1464
|
"properties": {
|
|
1455
1465
|
"lease": {
|
|
1456
1466
|
"type": "string",
|
|
1457
|
-
"description": "
|
|
1467
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1458
1468
|
},
|
|
1459
1469
|
"target": {
|
|
1460
1470
|
"type": "string",
|
|
1461
|
-
"description": "
|
|
1471
|
+
"description": "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
1462
1472
|
},
|
|
1463
1473
|
"savePath": {
|
|
1464
1474
|
"type": "string",
|
|
1465
|
-
"description": "Override the output path.
|
|
1475
|
+
"description": "Override the output path. Absolute paths (starting with /) are used as-is; relative paths resolve under the artifact dir (/tmp/cdp-toolkit). Defaults to an auto-named take_heapsnapshot-<targetId>-<timestamp>.heapsnapshot file."
|
|
1466
1476
|
}
|
|
1467
1477
|
},
|
|
1468
1478
|
"required": [],
|
|
@@ -1471,24 +1481,24 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1471
1481
|
},
|
|
1472
1482
|
{
|
|
1473
1483
|
"name": "lighthouse_audit",
|
|
1474
|
-
"description": "
|
|
1484
|
+
"description": "Runs a Lighthouse audit against a URL by shelling out to `npx --yes lighthouse` (the toolkit's only non-CDP tool) — it attaches to the already-running Chrome and audits its OWN about:blank tab, NOT any live user tab you've navigated. Writes a JSON report under /tmp/cdp-toolkit; returns {path,bytes} plus per-category scores (0..1 or null).",
|
|
1475
1485
|
"inputSchema": {
|
|
1476
1486
|
"type": "object",
|
|
1477
1487
|
"properties": {
|
|
1478
1488
|
"lease": {
|
|
1479
1489
|
"type": "string",
|
|
1480
|
-
"description": "
|
|
1490
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1481
1491
|
},
|
|
1482
1492
|
"url": {
|
|
1483
1493
|
"type": "string",
|
|
1484
|
-
"description": "The URL to audit. Required
|
|
1494
|
+
"description": "The URL to audit. Required — never points at a user tab implicitly."
|
|
1485
1495
|
},
|
|
1486
1496
|
"categories": {
|
|
1487
1497
|
"type": "array",
|
|
1488
1498
|
"items": {
|
|
1489
1499
|
"type": "string"
|
|
1490
1500
|
},
|
|
1491
|
-
"description": "Lighthouse categories to run (
|
|
1501
|
+
"description": "Lighthouse categories to run (--only-categories). Defaults to the full set, e.g. [\"performance\"] or [\"performance\",\"accessibility\",\"seo\"]."
|
|
1492
1502
|
},
|
|
1493
1503
|
"savePath": {
|
|
1494
1504
|
"type": "string",
|
|
@@ -1500,11 +1510,11 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1500
1510
|
"desktop",
|
|
1501
1511
|
"mobile"
|
|
1502
1512
|
],
|
|
1503
|
-
"description": "
|
|
1513
|
+
"description": "\"desktop\" (default, uses --preset=desktop to avoid heavy mobile throttling) or \"mobile\"."
|
|
1504
1514
|
},
|
|
1505
1515
|
"timeoutMs": {
|
|
1506
1516
|
"type": "number",
|
|
1507
|
-
"description": "Overall budget for the lighthouse process in
|
|
1517
|
+
"description": "Overall budget for the lighthouse process, in ms. Default 120000."
|
|
1508
1518
|
}
|
|
1509
1519
|
},
|
|
1510
1520
|
"required": [
|
|
@@ -1515,21 +1525,21 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1515
1525
|
},
|
|
1516
1526
|
{
|
|
1517
1527
|
"name": "mock_request",
|
|
1518
|
-
"description": "Register a mock rule on a target's persistent fake-backend session (CDP Fetch domain):
|
|
1528
|
+
"description": "Register a mock rule on a target's persistent fake-backend session (CDP Fetch domain): match requests by urlPattern and fulfill with a canned response, fail (abort), or continue -- optionally with fault injection (delayMs/failRate). The session survives reloads/navigations and lives until clear_mocks; call repeatedly to mock several endpoints on one target. reload:true applies it immediately. Persistent across calls only via the MCP server, not the one-shot CLI.",
|
|
1519
1529
|
"inputSchema": {
|
|
1520
1530
|
"type": "object",
|
|
1521
1531
|
"properties": {
|
|
1522
1532
|
"lease": {
|
|
1523
1533
|
"type": "string",
|
|
1524
|
-
"description": "
|
|
1534
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1525
1535
|
},
|
|
1526
1536
|
"target": {
|
|
1527
1537
|
"type": "string",
|
|
1528
|
-
"description": "
|
|
1538
|
+
"description": "Which page's mock session. Defaults to the active page. Grammar: server instructions."
|
|
1529
1539
|
},
|
|
1530
1540
|
"urlPattern": {
|
|
1531
1541
|
"type": "string",
|
|
1532
|
-
"description": "CDP Fetch urlPattern glob: '*'
|
|
1542
|
+
"description": "CDP Fetch urlPattern glob: '*' any run of chars, '?' exactly one, '\\' escapes. Only matching URLs are paused. e.g. \"*/api/users*\"."
|
|
1533
1543
|
},
|
|
1534
1544
|
"action": {
|
|
1535
1545
|
"type": "string",
|
|
@@ -1542,7 +1552,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1542
1552
|
},
|
|
1543
1553
|
"status": {
|
|
1544
1554
|
"type": "number",
|
|
1545
|
-
"description": "fulfill: HTTP status
|
|
1555
|
+
"description": "fulfill: HTTP status for the canned response. Default 200."
|
|
1546
1556
|
},
|
|
1547
1557
|
"body": {
|
|
1548
1558
|
"type": "string",
|
|
@@ -1562,7 +1572,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1562
1572
|
},
|
|
1563
1573
|
"method": {
|
|
1564
1574
|
"type": "string",
|
|
1565
|
-
"description": "Only mock
|
|
1575
|
+
"description": "Only mock this HTTP method (e.g. \"POST\"); others pass through."
|
|
1566
1576
|
},
|
|
1567
1577
|
"delayMs": {
|
|
1568
1578
|
"type": "number",
|
|
@@ -1570,11 +1580,11 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1570
1580
|
},
|
|
1571
1581
|
"failRate": {
|
|
1572
1582
|
"type": "number",
|
|
1573
|
-
"description": "Fault injection: probability 0..1 of failing a matched request regardless of action
|
|
1583
|
+
"description": "Fault injection: probability 0..1 of failing a matched request regardless of action."
|
|
1574
1584
|
},
|
|
1575
1585
|
"reload": {
|
|
1576
1586
|
"type": "boolean",
|
|
1577
|
-
"description": "Reload the target after arming so the mock
|
|
1587
|
+
"description": "Reload the target after arming so the mock catches traffic immediately."
|
|
1578
1588
|
}
|
|
1579
1589
|
},
|
|
1580
1590
|
"required": [
|
|
@@ -1585,17 +1595,17 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1585
1595
|
},
|
|
1586
1596
|
{
|
|
1587
1597
|
"name": "list_mocks",
|
|
1588
|
-
"description": "List active fake-backend sessions (one per target) with their rules and hit counts. Prunes sessions whose tab has closed.
|
|
1598
|
+
"description": "List active fake-backend sessions (one per target) with their rules and hit counts. Prunes sessions whose tab has closed.",
|
|
1589
1599
|
"inputSchema": {
|
|
1590
1600
|
"type": "object",
|
|
1591
1601
|
"properties": {
|
|
1592
1602
|
"lease": {
|
|
1593
1603
|
"type": "string",
|
|
1594
|
-
"description": "
|
|
1604
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1595
1605
|
},
|
|
1596
1606
|
"target": {
|
|
1597
1607
|
"type": "string",
|
|
1598
|
-
"description": "Unused filter placeholder;
|
|
1608
|
+
"description": "Unused filter placeholder; returns all active sessions."
|
|
1599
1609
|
}
|
|
1600
1610
|
},
|
|
1601
1611
|
"required": [],
|
|
@@ -1610,11 +1620,11 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1610
1620
|
"properties": {
|
|
1611
1621
|
"lease": {
|
|
1612
1622
|
"type": "string",
|
|
1613
|
-
"description": "
|
|
1623
|
+
"description": "Lease token from claim_page. Omit for a tab this process holds; required for a tab held by another process or one claimed explicitly. Auto-acquired under CDP_REQUIRE_LEASE (then pass target, not lease). See server instructions."
|
|
1614
1624
|
},
|
|
1615
1625
|
"target": {
|
|
1616
1626
|
"type": "string",
|
|
1617
|
-
"description": "
|
|
1627
|
+
"description": "Which page's mock session to clear. Defaults to the active page; ignored when all:true. Grammar: server instructions."
|
|
1618
1628
|
},
|
|
1619
1629
|
"all": {
|
|
1620
1630
|
"type": "boolean",
|
|
@@ -1627,29 +1637,29 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1627
1637
|
},
|
|
1628
1638
|
{
|
|
1629
1639
|
"name": "claim_page",
|
|
1630
|
-
"description": "Take exclusive ownership of a browser tab
|
|
1640
|
+
"description": "Take exclusive ownership of a browser tab, returning an opaque lease token (needed once under CDP_REQUIRE_LEASE for any tab you drive). Two modes: FRESH TAB (no target - opens one, optionally at url, and claims it: 'give me my own tab' in one call) and TAKEOVER (target - claims an already-open tab, e.g. the human's, resolving the selector against the live page list, creating nothing). The opened flag is true only when this call created the tab, and release_page consults that record, so a taken-over tab is left open on release. Refused from the CLI (its per-call process would make the lease instantly reclaimable). The answer carries humanActiveMs, ms since input this server did not dispatch; null is NO DATA (no activity beacon, or every input was this server's own) and never means 'no human'; absent on a backend that cannot answer. On takeover of a tab a human used within 30s it adds contention, a warning - but THE CLAIM IS NEVER REFUSED FOR THIS: takeover is its purpose, you already hold the lease; it only warns you're fighting a live person, so open your own tab or ask first. Limits: input inside a cross-origin iframe is invisible, and a second MCP server's clicks read as human.",
|
|
1631
1641
|
"inputSchema": {
|
|
1632
1642
|
"type": "object",
|
|
1633
1643
|
"properties": {
|
|
1634
1644
|
"target": {
|
|
1635
1645
|
"type": "string",
|
|
1636
|
-
"description": "Take over an already-open tab
|
|
1646
|
+
"description": "Take over an already-open tab (e.g. one the human has open). Resolved against the LIVE page list only, so it never opens a tab — a selector matching nothing is an error. Left open on release. Refused if another live process holds it (including a lease auto-acquired under CDP_REQUIRE_LEASE): takes over unleased human tabs, never steals from a live agent. Mutually exclusive with targetId. Selector grammar: server instructions."
|
|
1637
1647
|
},
|
|
1638
1648
|
"targetId": {
|
|
1639
1649
|
"type": "string",
|
|
1640
|
-
"description": "
|
|
1650
|
+
"description": "Exact target id (not a selector) of an already-open page to claim instead of opening one. Back-compat only; prefer target, which also accepts an exact id. Mutually exclusive with target."
|
|
1641
1651
|
},
|
|
1642
1652
|
"url": {
|
|
1643
1653
|
"type": "string",
|
|
1644
|
-
"description": "When opening a fresh tab, navigate it here. Ignored when target or targetId is given
|
|
1654
|
+
"description": "When opening a fresh tab, navigate it here. Ignored when target or targetId is given."
|
|
1645
1655
|
},
|
|
1646
1656
|
"label": {
|
|
1647
1657
|
"type": "string",
|
|
1648
|
-
"description": "Agent label recorded on the lease
|
|
1658
|
+
"description": "Agent label recorded on the lease; surfaced in conflict errors and list_leases. Defaults to pid-<pid>."
|
|
1649
1659
|
},
|
|
1650
1660
|
"ttlMs": {
|
|
1651
1661
|
"type": "number",
|
|
1652
|
-
"description": "How long the lease survives without use before it is reclaimable. Defaults to CDP_LEASE_TTL_MS, else 900000 (
|
|
1662
|
+
"description": "How long the lease survives without use before it is reclaimable. Defaults to CDP_LEASE_TTL_MS, else 900000 (15min); every checked call refreshes it."
|
|
1653
1663
|
}
|
|
1654
1664
|
},
|
|
1655
1665
|
"required": [],
|
|
@@ -1658,21 +1668,21 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1658
1668
|
},
|
|
1659
1669
|
{
|
|
1660
1670
|
"name": "release_page",
|
|
1661
|
-
"description": "Give a lease back,
|
|
1671
|
+
"description": "Give a lease back, closing the tab only if this toolkit opened it. Take exactly one of lease (the token) or target (a selector for a tab this process holds - use this to release a lease the gate acquired for you automatically, since that path never handed you a token). A tab with a creation record from this toolkit is closed; a tab that was already open and merely claimed is released and left alone - override either way with close. Idempotent: an already-released, reclaimed, or expired lease reports released:false and closes nothing (by then the tab may belong to another agent). Answers {released, closed, targetId}.",
|
|
1662
1672
|
"inputSchema": {
|
|
1663
1673
|
"type": "object",
|
|
1664
1674
|
"properties": {
|
|
1665
1675
|
"lease": {
|
|
1666
1676
|
"type": "string",
|
|
1667
|
-
"description": "
|
|
1677
|
+
"description": "Token from claim_page / new_page{claim:true}. Mutually exclusive with 'target'. Under CDP_REQUIRE_LEASE an auto-acquired lease never produced a token — give 'target' instead."
|
|
1668
1678
|
},
|
|
1669
1679
|
"target": {
|
|
1670
1680
|
"type": "string",
|
|
1671
|
-
"description": "
|
|
1681
|
+
"description": "A tab THIS process holds (grammar: server instructions). Mutually exclusive with 'lease'. Refused if another process holds the tab."
|
|
1672
1682
|
},
|
|
1673
1683
|
"close": {
|
|
1674
1684
|
"type": "boolean",
|
|
1675
|
-
"description": "Force the close decision instead of letting the creation
|
|
1685
|
+
"description": "Force the close decision instead of letting the creation record decide: true closes even a tab this toolkit did not open; false keeps an agent-created tab open. Omit to close only tabs this toolkit created."
|
|
1676
1686
|
}
|
|
1677
1687
|
},
|
|
1678
1688
|
"required": [],
|
|
@@ -1681,7 +1691,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1681
1691
|
},
|
|
1682
1692
|
{
|
|
1683
1693
|
"name": "list_leases",
|
|
1684
|
-
"description": "Enumerate every active lease for diagnosis
|
|
1694
|
+
"description": "Enumerate every active lease for diagnosis - backend, target id, label, pid, createdAt, lastUsedAt, ttlMs, whether the owning process is alive, and whether the lease is reclaimable and why. No token required; it never returns the lease nonce, so it cannot be used to forge one. An unreadable or unparseable lease row instead carries unreadable, with label, pid and timestamps zeroed and stale forced false (an unreadable lease must never read as free to take). Under CDP_REQUIRE_LEASE it reaps abandoned agent tabs exactly as list_pages does, into an additive reaped array, omitting their rows. Where the tab can answer, a row also carries humanActiveMs, ms since input this server did not dispatch - note lastUsedAt tracks TOOLKIT calls only, so a tab a person has typed in for ten minutes looks idle, which is what this exposes; the field is absent, never null, when the tab cannot answer, and that absence means 'no answer', never 'nobody is there'. idleMs (now - lastUsedAt) and expiresAt (lastUsedAt + ttlMs) are computed fresh each call and omitted on an unreadable row.",
|
|
1685
1695
|
"inputSchema": {
|
|
1686
1696
|
"type": "object",
|
|
1687
1697
|
"properties": {},
|