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/dist/cli.js
CHANGED
|
@@ -7210,21 +7210,21 @@ var FIREFOX_TOOLS = {
|
|
|
7210
7210
|
var MANIFEST = [
|
|
7211
7211
|
{
|
|
7212
7212
|
name: "list_pages",
|
|
7213
|
-
description: "Enumerate browser page targets
|
|
7213
|
+
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.",
|
|
7214
7214
|
inputSchema: {
|
|
7215
7215
|
type: "object",
|
|
7216
7216
|
properties: {
|
|
7217
7217
|
lease: {
|
|
7218
7218
|
type: "string",
|
|
7219
|
-
description: "
|
|
7219
|
+
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."
|
|
7220
7220
|
},
|
|
7221
7221
|
all: {
|
|
7222
7222
|
type: "boolean",
|
|
7223
|
-
description: "Include non-page targets (service/shared workers, background pages)
|
|
7223
|
+
description: "Include non-page targets (service/shared workers, background pages); default false lists page-type tabs only."
|
|
7224
7224
|
},
|
|
7225
7225
|
probe: {
|
|
7226
7226
|
type: "boolean",
|
|
7227
|
-
description: "Ping each page-type
|
|
7227
|
+
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)."
|
|
7228
7228
|
}
|
|
7229
7229
|
},
|
|
7230
7230
|
required: [],
|
|
@@ -7239,7 +7239,7 @@ var MANIFEST = [
|
|
|
7239
7239
|
properties: {
|
|
7240
7240
|
lease: {
|
|
7241
7241
|
type: "string",
|
|
7242
|
-
description: "
|
|
7242
|
+
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."
|
|
7243
7243
|
},
|
|
7244
7244
|
url: {
|
|
7245
7245
|
type: "string",
|
|
@@ -7247,15 +7247,15 @@ var MANIFEST = [
|
|
|
7247
7247
|
},
|
|
7248
7248
|
claim: {
|
|
7249
7249
|
type: "boolean",
|
|
7250
|
-
description: "Claim the new tab atomically
|
|
7250
|
+
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."
|
|
7251
7251
|
},
|
|
7252
7252
|
label: {
|
|
7253
7253
|
type: "string",
|
|
7254
|
-
description: "Agent label recorded on the lease when
|
|
7254
|
+
description: "Agent label recorded on the lease when the tab is claimed; surfaced in conflict errors and list_leases. Defaults to pid-<pid>."
|
|
7255
7255
|
},
|
|
7256
7256
|
ttlMs: {
|
|
7257
7257
|
type: "number",
|
|
7258
|
-
description: "How long
|
|
7258
|
+
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."
|
|
7259
7259
|
}
|
|
7260
7260
|
},
|
|
7261
7261
|
required: [],
|
|
@@ -7264,17 +7264,17 @@ var MANIFEST = [
|
|
|
7264
7264
|
},
|
|
7265
7265
|
{
|
|
7266
7266
|
name: "close_page",
|
|
7267
|
-
description: "Close a page target via Target.closeTarget. Requires an explicit, resolvable target;
|
|
7267
|
+
description: "Close a page target via Target.closeTarget. Requires an explicit, resolvable target; errors rather than guessing when the selector matches nothing.",
|
|
7268
7268
|
inputSchema: {
|
|
7269
7269
|
type: "object",
|
|
7270
7270
|
properties: {
|
|
7271
7271
|
lease: {
|
|
7272
7272
|
type: "string",
|
|
7273
|
-
description: "
|
|
7273
|
+
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."
|
|
7274
7274
|
},
|
|
7275
7275
|
target: {
|
|
7276
7276
|
type: "string",
|
|
7277
|
-
description: "
|
|
7277
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
7278
7278
|
}
|
|
7279
7279
|
},
|
|
7280
7280
|
required: [
|
|
@@ -7291,11 +7291,11 @@ var MANIFEST = [
|
|
|
7291
7291
|
properties: {
|
|
7292
7292
|
lease: {
|
|
7293
7293
|
type: "string",
|
|
7294
|
-
description: "
|
|
7294
|
+
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."
|
|
7295
7295
|
},
|
|
7296
7296
|
target: {
|
|
7297
7297
|
type: "string",
|
|
7298
|
-
description: "
|
|
7298
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
7299
7299
|
}
|
|
7300
7300
|
},
|
|
7301
7301
|
required: [
|
|
@@ -7312,11 +7312,11 @@ var MANIFEST = [
|
|
|
7312
7312
|
properties: {
|
|
7313
7313
|
lease: {
|
|
7314
7314
|
type: "string",
|
|
7315
|
-
description: "
|
|
7315
|
+
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."
|
|
7316
7316
|
},
|
|
7317
7317
|
target: {
|
|
7318
7318
|
type: "string",
|
|
7319
|
-
description: "
|
|
7319
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
7320
7320
|
},
|
|
7321
7321
|
url: {
|
|
7322
7322
|
type: "string",
|
|
@@ -7332,7 +7332,7 @@ var MANIFEST = [
|
|
|
7332
7332
|
"back",
|
|
7333
7333
|
"forward"
|
|
7334
7334
|
],
|
|
7335
|
-
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
|
|
7335
|
+
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."
|
|
7336
7336
|
},
|
|
7337
7337
|
ignoreCache: {
|
|
7338
7338
|
type: "boolean",
|
|
@@ -7356,17 +7356,17 @@ var MANIFEST = [
|
|
|
7356
7356
|
},
|
|
7357
7357
|
{
|
|
7358
7358
|
name: "wait_for",
|
|
7359
|
-
description: "Poll
|
|
7359
|
+
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}.",
|
|
7360
7360
|
inputSchema: {
|
|
7361
7361
|
type: "object",
|
|
7362
7362
|
properties: {
|
|
7363
7363
|
lease: {
|
|
7364
7364
|
type: "string",
|
|
7365
|
-
description: "
|
|
7365
|
+
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."
|
|
7366
7366
|
},
|
|
7367
7367
|
target: {
|
|
7368
7368
|
type: "string",
|
|
7369
|
-
description: "
|
|
7369
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
7370
7370
|
},
|
|
7371
7371
|
text: {
|
|
7372
7372
|
type: "string",
|
|
@@ -7374,11 +7374,11 @@ var MANIFEST = [
|
|
|
7374
7374
|
},
|
|
7375
7375
|
timeoutMs: {
|
|
7376
7376
|
type: "number",
|
|
7377
|
-
description: "Total time budget in
|
|
7377
|
+
description: "Total time budget in ms. Default 15000."
|
|
7378
7378
|
},
|
|
7379
7379
|
pollMs: {
|
|
7380
7380
|
type: "number",
|
|
7381
|
-
description: "Poll interval in
|
|
7381
|
+
description: "Poll interval in ms. Default 250."
|
|
7382
7382
|
}
|
|
7383
7383
|
},
|
|
7384
7384
|
required: [
|
|
@@ -7389,37 +7389,37 @@ var MANIFEST = [
|
|
|
7389
7389
|
},
|
|
7390
7390
|
{
|
|
7391
7391
|
name: "evaluate_script",
|
|
7392
|
-
description: "Run arbitrary JavaScript in the target
|
|
7392
|
+
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').",
|
|
7393
7393
|
inputSchema: {
|
|
7394
7394
|
type: "object",
|
|
7395
7395
|
properties: {
|
|
7396
7396
|
lease: {
|
|
7397
7397
|
type: "string",
|
|
7398
|
-
description: "
|
|
7398
|
+
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."
|
|
7399
7399
|
},
|
|
7400
7400
|
target: {
|
|
7401
7401
|
type: "string",
|
|
7402
|
-
description: "Page selector: 'active' (
|
|
7402
|
+
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."
|
|
7403
7403
|
},
|
|
7404
7404
|
wake: {
|
|
7405
7405
|
type: "boolean",
|
|
7406
|
-
description: "
|
|
7406
|
+
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."
|
|
7407
7407
|
},
|
|
7408
7408
|
expression: {
|
|
7409
7409
|
type: "string",
|
|
7410
|
-
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
|
|
7410
|
+
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."
|
|
7411
7411
|
},
|
|
7412
7412
|
awaitPromise: {
|
|
7413
7413
|
type: "boolean",
|
|
7414
|
-
description: "Await the result if it is a Promise
|
|
7414
|
+
description: "Await the result if it is a Promise. Default true."
|
|
7415
7415
|
},
|
|
7416
7416
|
args: {
|
|
7417
7417
|
type: "array",
|
|
7418
|
-
description: "Positional JSON-serializable arguments
|
|
7418
|
+
description: "Positional JSON-serializable arguments passed to the expression (treated as a function). No live element/page handle is bound."
|
|
7419
7419
|
},
|
|
7420
7420
|
savePath: {
|
|
7421
7421
|
type: "string",
|
|
7422
|
-
description: "Write the evaluated value to this file as JSON and KEEP IT OUT OF THE RESPONSE:
|
|
7422
|
+
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."
|
|
7423
7423
|
}
|
|
7424
7424
|
},
|
|
7425
7425
|
required: [
|
|
@@ -7430,21 +7430,21 @@ var MANIFEST = [
|
|
|
7430
7430
|
},
|
|
7431
7431
|
{
|
|
7432
7432
|
name: "list_cookies",
|
|
7433
|
-
description: "Read the cookie store
|
|
7433
|
+
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.",
|
|
7434
7434
|
inputSchema: {
|
|
7435
7435
|
type: "object",
|
|
7436
7436
|
properties: {
|
|
7437
7437
|
lease: {
|
|
7438
7438
|
type: "string",
|
|
7439
|
-
description: "
|
|
7439
|
+
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."
|
|
7440
7440
|
},
|
|
7441
7441
|
target: {
|
|
7442
7442
|
type: "string",
|
|
7443
|
-
description: "
|
|
7443
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
7444
7444
|
},
|
|
7445
7445
|
domain: {
|
|
7446
7446
|
type: "string",
|
|
7447
|
-
description: "Keep only cookies for this domain. A leading dot is ignored on both sides and subdomains
|
|
7447
|
+
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."
|
|
7448
7448
|
},
|
|
7449
7449
|
name: {
|
|
7450
7450
|
type: "string",
|
|
@@ -7452,7 +7452,7 @@ var MANIFEST = [
|
|
|
7452
7452
|
},
|
|
7453
7453
|
savePath: {
|
|
7454
7454
|
type: "string",
|
|
7455
|
-
description: "Write the cookie array
|
|
7455
|
+
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."
|
|
7456
7456
|
}
|
|
7457
7457
|
},
|
|
7458
7458
|
required: [],
|
|
@@ -7461,17 +7461,17 @@ var MANIFEST = [
|
|
|
7461
7461
|
},
|
|
7462
7462
|
{
|
|
7463
7463
|
name: "set_cookie",
|
|
7464
|
-
description: "Write one cookie into the target page's cookie store, INCLUDING
|
|
7464
|
+
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.",
|
|
7465
7465
|
inputSchema: {
|
|
7466
7466
|
type: "object",
|
|
7467
7467
|
properties: {
|
|
7468
7468
|
lease: {
|
|
7469
7469
|
type: "string",
|
|
7470
|
-
description: "
|
|
7470
|
+
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."
|
|
7471
7471
|
},
|
|
7472
7472
|
target: {
|
|
7473
7473
|
type: "string",
|
|
7474
|
-
description: "
|
|
7474
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
7475
7475
|
},
|
|
7476
7476
|
name: {
|
|
7477
7477
|
type: "string",
|
|
@@ -7483,19 +7483,19 @@ var MANIFEST = [
|
|
|
7483
7483
|
},
|
|
7484
7484
|
url: {
|
|
7485
7485
|
type: "string",
|
|
7486
|
-
description: "
|
|
7486
|
+
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'."
|
|
7487
7487
|
},
|
|
7488
7488
|
domain: {
|
|
7489
7489
|
type: "string",
|
|
7490
|
-
description: "Cookie domain,
|
|
7490
|
+
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."
|
|
7491
7491
|
},
|
|
7492
7492
|
path: {
|
|
7493
7493
|
type: "string",
|
|
7494
|
-
description: "Cookie path
|
|
7494
|
+
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."
|
|
7495
7495
|
},
|
|
7496
7496
|
expires: {
|
|
7497
7497
|
type: "number",
|
|
7498
|
-
description: "Expiry as Unix time in SECONDS, matching what list_cookies reports. Omit
|
|
7498
|
+
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."
|
|
7499
7499
|
},
|
|
7500
7500
|
httpOnly: {
|
|
7501
7501
|
type: "boolean",
|
|
@@ -7507,27 +7507,35 @@ var MANIFEST = [
|
|
|
7507
7507
|
},
|
|
7508
7508
|
sameSite: {
|
|
7509
7509
|
type: "string",
|
|
7510
|
-
enum: [
|
|
7510
|
+
enum: [
|
|
7511
|
+
"strict",
|
|
7512
|
+
"lax",
|
|
7513
|
+
"none",
|
|
7514
|
+
"default"
|
|
7515
|
+
],
|
|
7511
7516
|
description: "SameSite attribute, lowercase, matching what list_cookies reports. 'default' means the attribute is not set at all."
|
|
7512
7517
|
}
|
|
7513
7518
|
},
|
|
7514
|
-
required: [
|
|
7519
|
+
required: [
|
|
7520
|
+
"name",
|
|
7521
|
+
"value"
|
|
7522
|
+
],
|
|
7515
7523
|
additionalProperties: false
|
|
7516
7524
|
}
|
|
7517
7525
|
},
|
|
7518
7526
|
{
|
|
7519
7527
|
name: "delete_cookies",
|
|
7520
|
-
description: "Delete the named cookie from the target page's cookie store, httpOnly cookies included.
|
|
7528
|
+
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.",
|
|
7521
7529
|
inputSchema: {
|
|
7522
7530
|
type: "object",
|
|
7523
7531
|
properties: {
|
|
7524
7532
|
lease: {
|
|
7525
7533
|
type: "string",
|
|
7526
|
-
description: "
|
|
7534
|
+
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."
|
|
7527
7535
|
},
|
|
7528
7536
|
target: {
|
|
7529
7537
|
type: "string",
|
|
7530
|
-
description: "
|
|
7538
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
7531
7539
|
},
|
|
7532
7540
|
name: {
|
|
7533
7541
|
type: "string",
|
|
@@ -7535,7 +7543,7 @@ var MANIFEST = [
|
|
|
7535
7543
|
},
|
|
7536
7544
|
url: {
|
|
7537
7545
|
type: "string",
|
|
7538
|
-
description: "Delete cookies matching this URL,
|
|
7546
|
+
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."
|
|
7539
7547
|
},
|
|
7540
7548
|
domain: {
|
|
7541
7549
|
type: "string",
|
|
@@ -7546,27 +7554,29 @@ var MANIFEST = [
|
|
|
7546
7554
|
description: "Narrow the deletion to cookies with this exact path. Omit to match any path allowed by the other constraints."
|
|
7547
7555
|
}
|
|
7548
7556
|
},
|
|
7549
|
-
required: [
|
|
7557
|
+
required: [
|
|
7558
|
+
"name"
|
|
7559
|
+
],
|
|
7550
7560
|
additionalProperties: false
|
|
7551
7561
|
}
|
|
7552
7562
|
},
|
|
7553
7563
|
{
|
|
7554
7564
|
name: "take_snapshot",
|
|
7555
|
-
description: "
|
|
7565
|
+
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.",
|
|
7556
7566
|
inputSchema: {
|
|
7557
7567
|
type: "object",
|
|
7558
7568
|
properties: {
|
|
7559
7569
|
lease: {
|
|
7560
7570
|
type: "string",
|
|
7561
|
-
description: "
|
|
7571
|
+
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."
|
|
7562
7572
|
},
|
|
7563
7573
|
target: {
|
|
7564
7574
|
type: "string",
|
|
7565
|
-
description: "
|
|
7575
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
7566
7576
|
},
|
|
7567
7577
|
interactiveOnly: {
|
|
7568
7578
|
type: "boolean",
|
|
7569
|
-
description: "When true, emit only interactive/meaningful nodes
|
|
7579
|
+
description: "When true, emit only interactive/meaningful nodes as a flat list; default false returns the full hierarchical tree."
|
|
7570
7580
|
}
|
|
7571
7581
|
},
|
|
7572
7582
|
required: [],
|
|
@@ -7575,25 +7585,25 @@ var MANIFEST = [
|
|
|
7575
7585
|
},
|
|
7576
7586
|
{
|
|
7577
7587
|
name: "click",
|
|
7578
|
-
description: "Click an element via a synthetic mouse press/release at
|
|
7588
|
+
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).",
|
|
7579
7589
|
inputSchema: {
|
|
7580
7590
|
type: "object",
|
|
7581
7591
|
properties: {
|
|
7582
7592
|
lease: {
|
|
7583
7593
|
type: "string",
|
|
7584
|
-
description: "
|
|
7594
|
+
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."
|
|
7585
7595
|
},
|
|
7586
7596
|
target: {
|
|
7587
7597
|
type: "string",
|
|
7588
|
-
description: "
|
|
7598
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
7589
7599
|
},
|
|
7590
7600
|
uid: {
|
|
7591
7601
|
type: "number",
|
|
7592
|
-
description: "CDP backendDOMNodeId of the element to click,
|
|
7602
|
+
description: "CDP backendDOMNodeId of the element to click, from take_snapshot. Exactly one of uid or selector."
|
|
7593
7603
|
},
|
|
7594
7604
|
selector: {
|
|
7595
7605
|
type: "string",
|
|
7596
|
-
description: "CSS selector for the element to click (
|
|
7606
|
+
description: "CSS selector for the element to click (document.querySelector). Exactly one of uid or selector."
|
|
7597
7607
|
},
|
|
7598
7608
|
button: {
|
|
7599
7609
|
type: "string",
|
|
@@ -7606,7 +7616,7 @@ var MANIFEST = [
|
|
|
7606
7616
|
},
|
|
7607
7617
|
clickCount: {
|
|
7608
7618
|
type: "number",
|
|
7609
|
-
description: "Number of clicks: 1
|
|
7619
|
+
description: "Number of clicks: 1 (default), 2 = double-click, 3 = triple-click."
|
|
7610
7620
|
},
|
|
7611
7621
|
modifiers: {
|
|
7612
7622
|
type: "array",
|
|
@@ -7619,7 +7629,7 @@ var MANIFEST = [
|
|
|
7619
7629
|
"Shift"
|
|
7620
7630
|
]
|
|
7621
7631
|
},
|
|
7622
|
-
description: "Modifier keys held for the click's press and release, e.g. ['Shift']
|
|
7632
|
+
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."
|
|
7623
7633
|
}
|
|
7624
7634
|
},
|
|
7625
7635
|
required: [],
|
|
@@ -7628,25 +7638,25 @@ var MANIFEST = [
|
|
|
7628
7638
|
},
|
|
7629
7639
|
{
|
|
7630
7640
|
name: "hover",
|
|
7631
|
-
description: "
|
|
7641
|
+
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.",
|
|
7632
7642
|
inputSchema: {
|
|
7633
7643
|
type: "object",
|
|
7634
7644
|
properties: {
|
|
7635
7645
|
lease: {
|
|
7636
7646
|
type: "string",
|
|
7637
|
-
description: "
|
|
7647
|
+
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."
|
|
7638
7648
|
},
|
|
7639
7649
|
target: {
|
|
7640
7650
|
type: "string",
|
|
7641
|
-
description: "
|
|
7651
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
7642
7652
|
},
|
|
7643
7653
|
uid: {
|
|
7644
7654
|
type: "number",
|
|
7645
|
-
description: "CDP backendDOMNodeId of the element to hover,
|
|
7655
|
+
description: "CDP backendDOMNodeId of the element to hover, from take_snapshot. Exactly one of uid or selector."
|
|
7646
7656
|
},
|
|
7647
7657
|
selector: {
|
|
7648
7658
|
type: "string",
|
|
7649
|
-
description: "CSS selector for the element to hover (
|
|
7659
|
+
description: "CSS selector for the element to hover (document.querySelector). Exactly one of uid or selector."
|
|
7650
7660
|
}
|
|
7651
7661
|
},
|
|
7652
7662
|
required: [],
|
|
@@ -7655,21 +7665,21 @@ var MANIFEST = [
|
|
|
7655
7665
|
},
|
|
7656
7666
|
{
|
|
7657
7667
|
name: "drag",
|
|
7658
|
-
description:
|
|
7668
|
+
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).",
|
|
7659
7669
|
inputSchema: {
|
|
7660
7670
|
type: "object",
|
|
7661
7671
|
properties: {
|
|
7662
7672
|
lease: {
|
|
7663
7673
|
type: "string",
|
|
7664
|
-
description: "
|
|
7674
|
+
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."
|
|
7665
7675
|
},
|
|
7666
7676
|
target: {
|
|
7667
7677
|
type: "string",
|
|
7668
|
-
description: "
|
|
7678
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
7669
7679
|
},
|
|
7670
7680
|
from: {
|
|
7671
7681
|
type: "object",
|
|
7672
|
-
description: "Source element to drag from.
|
|
7682
|
+
description: "Source element to drag from. Exactly one of uid or selector.",
|
|
7673
7683
|
properties: {
|
|
7674
7684
|
uid: {
|
|
7675
7685
|
type: "number",
|
|
@@ -7684,7 +7694,7 @@ var MANIFEST = [
|
|
|
7684
7694
|
},
|
|
7685
7695
|
to: {
|
|
7686
7696
|
type: "object",
|
|
7687
|
-
description: "Where the drag ends: exactly one of uid, selector, or x+y. Mutually exclusive with 'by'; exactly one of to/by
|
|
7697
|
+
description: "Where the drag ends: exactly one of uid, selector, or x+y. Mutually exclusive with 'by'; exactly one of to/by required.",
|
|
7688
7698
|
properties: {
|
|
7689
7699
|
uid: {
|
|
7690
7700
|
type: "number",
|
|
@@ -7707,7 +7717,7 @@ var MANIFEST = [
|
|
|
7707
7717
|
},
|
|
7708
7718
|
by: {
|
|
7709
7719
|
type: "object",
|
|
7710
|
-
description: "
|
|
7720
|
+
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.",
|
|
7711
7721
|
properties: {
|
|
7712
7722
|
dx: {
|
|
7713
7723
|
type: "number",
|
|
@@ -7726,11 +7736,11 @@ var MANIFEST = [
|
|
|
7726
7736
|
"mouse",
|
|
7727
7737
|
"html5"
|
|
7728
7738
|
],
|
|
7729
|
-
description: "'mouse' (default): synthetic mouse press/move/release
|
|
7739
|
+
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)."
|
|
7730
7740
|
},
|
|
7731
7741
|
steps: {
|
|
7732
7742
|
type: "number",
|
|
7733
|
-
description: "Number of interpolated mouse-move events
|
|
7743
|
+
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."
|
|
7734
7744
|
}
|
|
7735
7745
|
},
|
|
7736
7746
|
required: [
|
|
@@ -7741,41 +7751,41 @@ var MANIFEST = [
|
|
|
7741
7751
|
},
|
|
7742
7752
|
{
|
|
7743
7753
|
name: "scroll",
|
|
7744
|
-
description: "
|
|
7754
|
+
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.",
|
|
7745
7755
|
inputSchema: {
|
|
7746
7756
|
type: "object",
|
|
7747
7757
|
properties: {
|
|
7748
7758
|
lease: {
|
|
7749
7759
|
type: "string",
|
|
7750
|
-
description: "
|
|
7760
|
+
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."
|
|
7751
7761
|
},
|
|
7752
7762
|
target: {
|
|
7753
7763
|
type: "string",
|
|
7754
|
-
description: "
|
|
7764
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
7755
7765
|
},
|
|
7756
7766
|
uid: {
|
|
7757
7767
|
type: "number",
|
|
7758
|
-
description: "CDP backendDOMNodeId of the element to scroll into view and anchor at,
|
|
7768
|
+
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."
|
|
7759
7769
|
},
|
|
7760
7770
|
selector: {
|
|
7761
7771
|
type: "string",
|
|
7762
|
-
description: "CSS selector for the element to
|
|
7772
|
+
description: "CSS selector for the element to anchor at (document.querySelector). At most one of uid, selector, or x+y."
|
|
7763
7773
|
},
|
|
7764
7774
|
x: {
|
|
7765
7775
|
type: "number",
|
|
7766
|
-
description: "Absolute viewport x-coordinate to anchor
|
|
7776
|
+
description: "Absolute viewport x-coordinate to anchor at; must be given with y. At most one of uid, selector, or x+y."
|
|
7767
7777
|
},
|
|
7768
7778
|
y: {
|
|
7769
7779
|
type: "number",
|
|
7770
|
-
description: "Absolute viewport y-coordinate to anchor
|
|
7780
|
+
description: "Absolute viewport y-coordinate to anchor at; must be given with x. At most one of uid, selector, or x+y."
|
|
7771
7781
|
},
|
|
7772
7782
|
deltaX: {
|
|
7773
7783
|
type: "number",
|
|
7774
|
-
description: "Horizontal scroll delta; positive scrolls RIGHT. At least one of deltaX/deltaY
|
|
7784
|
+
description: "Horizontal scroll delta; positive scrolls RIGHT. At least one of deltaX/deltaY required."
|
|
7775
7785
|
},
|
|
7776
7786
|
deltaY: {
|
|
7777
7787
|
type: "number",
|
|
7778
|
-
description: "Vertical scroll delta; positive scrolls DOWN. At least one of deltaX/deltaY
|
|
7788
|
+
description: "Vertical scroll delta; positive scrolls DOWN. At least one of deltaX/deltaY required."
|
|
7779
7789
|
}
|
|
7780
7790
|
},
|
|
7781
7791
|
required: [],
|
|
@@ -7784,17 +7794,17 @@ var MANIFEST = [
|
|
|
7784
7794
|
},
|
|
7785
7795
|
{
|
|
7786
7796
|
name: "dispatch_mouse",
|
|
7787
|
-
description: "
|
|
7797
|
+
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.",
|
|
7788
7798
|
inputSchema: {
|
|
7789
7799
|
type: "object",
|
|
7790
7800
|
properties: {
|
|
7791
7801
|
lease: {
|
|
7792
7802
|
type: "string",
|
|
7793
|
-
description: "
|
|
7803
|
+
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."
|
|
7794
7804
|
},
|
|
7795
7805
|
target: {
|
|
7796
7806
|
type: "string",
|
|
7797
|
-
description: "
|
|
7807
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
7798
7808
|
},
|
|
7799
7809
|
action: {
|
|
7800
7810
|
type: "string",
|
|
@@ -7807,11 +7817,11 @@ var MANIFEST = [
|
|
|
7807
7817
|
},
|
|
7808
7818
|
x: {
|
|
7809
7819
|
type: "number",
|
|
7810
|
-
description: "Viewport x-coordinate. Required
|
|
7820
|
+
description: "Viewport x-coordinate. Required every call — CDP has no 'current pointer position' to default from."
|
|
7811
7821
|
},
|
|
7812
7822
|
y: {
|
|
7813
7823
|
type: "number",
|
|
7814
|
-
description: "Viewport y-coordinate. Required
|
|
7824
|
+
description: "Viewport y-coordinate. Required every call."
|
|
7815
7825
|
},
|
|
7816
7826
|
button: {
|
|
7817
7827
|
type: "string",
|
|
@@ -7824,7 +7834,7 @@ var MANIFEST = [
|
|
|
7824
7834
|
},
|
|
7825
7835
|
clickCount: {
|
|
7826
7836
|
type: "number",
|
|
7827
|
-
description: "Click-run length for a 'down' or 'up' event (2 =
|
|
7837
|
+
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."
|
|
7828
7838
|
},
|
|
7829
7839
|
modifiers: {
|
|
7830
7840
|
type: "array",
|
|
@@ -7850,17 +7860,17 @@ var MANIFEST = [
|
|
|
7850
7860
|
},
|
|
7851
7861
|
{
|
|
7852
7862
|
name: "wait_for_download",
|
|
7853
|
-
description: "Wait for a file download to finish and return it as a real file on disk: {path,suggestedFilename,bytes,url,target}
|
|
7863
|
+
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.",
|
|
7854
7864
|
inputSchema: {
|
|
7855
7865
|
type: "object",
|
|
7856
7866
|
properties: {
|
|
7857
7867
|
lease: {
|
|
7858
7868
|
type: "string",
|
|
7859
|
-
description: "
|
|
7869
|
+
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."
|
|
7860
7870
|
},
|
|
7861
7871
|
target: {
|
|
7862
7872
|
type: "string",
|
|
7863
|
-
description: "
|
|
7873
|
+
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."
|
|
7864
7874
|
},
|
|
7865
7875
|
arm: {
|
|
7866
7876
|
type: "boolean",
|
|
@@ -7868,7 +7878,7 @@ var MANIFEST = [
|
|
|
7868
7878
|
},
|
|
7869
7879
|
timeoutMs: {
|
|
7870
7880
|
type: "number",
|
|
7871
|
-
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
|
|
7881
|
+
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."
|
|
7872
7882
|
}
|
|
7873
7883
|
},
|
|
7874
7884
|
required: [],
|
|
@@ -7877,17 +7887,17 @@ var MANIFEST = [
|
|
|
7877
7887
|
},
|
|
7878
7888
|
{
|
|
7879
7889
|
name: "grant_permissions",
|
|
7880
|
-
description: "Grant browser permissions for an origin up front, so a page asking for geolocation / notifications / clipboard gets an answer instead of
|
|
7890
|
+
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.",
|
|
7881
7891
|
inputSchema: {
|
|
7882
7892
|
type: "object",
|
|
7883
7893
|
properties: {
|
|
7884
7894
|
lease: {
|
|
7885
7895
|
type: "string",
|
|
7886
|
-
description: "
|
|
7896
|
+
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."
|
|
7887
7897
|
},
|
|
7888
7898
|
target: {
|
|
7889
7899
|
type: "string",
|
|
7890
|
-
description: "
|
|
7900
|
+
description: "Also the origin source when 'origin' is omitted. Grammar: server instructions."
|
|
7891
7901
|
},
|
|
7892
7902
|
permissions: {
|
|
7893
7903
|
type: "array",
|
|
@@ -7911,29 +7921,29 @@ var MANIFEST = [
|
|
|
7911
7921
|
},
|
|
7912
7922
|
{
|
|
7913
7923
|
name: "fill",
|
|
7914
|
-
description: "
|
|
7924
|
+
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.",
|
|
7915
7925
|
inputSchema: {
|
|
7916
7926
|
type: "object",
|
|
7917
7927
|
properties: {
|
|
7918
7928
|
lease: {
|
|
7919
7929
|
type: "string",
|
|
7920
|
-
description: "
|
|
7930
|
+
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."
|
|
7921
7931
|
},
|
|
7922
7932
|
target: {
|
|
7923
7933
|
type: "string",
|
|
7924
|
-
description: "
|
|
7934
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
7925
7935
|
},
|
|
7926
7936
|
uid: {
|
|
7927
7937
|
type: "number",
|
|
7928
|
-
description: "CDP backendDOMNodeId of the field to fill,
|
|
7938
|
+
description: "CDP backendDOMNodeId of the field to fill, from take_snapshot. Exactly one of uid or selector."
|
|
7929
7939
|
},
|
|
7930
7940
|
selector: {
|
|
7931
7941
|
type: "string",
|
|
7932
|
-
description: "CSS selector for the field to fill (
|
|
7942
|
+
description: "CSS selector for the field to fill (document.querySelector). Exactly one of uid or selector."
|
|
7933
7943
|
},
|
|
7934
7944
|
value: {
|
|
7935
7945
|
type: "string",
|
|
7936
|
-
description: "
|
|
7946
|
+
description: "Text value to set; the field is cleared first, overwriting existing content."
|
|
7937
7947
|
}
|
|
7938
7948
|
},
|
|
7939
7949
|
required: [
|
|
@@ -7944,17 +7954,17 @@ var MANIFEST = [
|
|
|
7944
7954
|
},
|
|
7945
7955
|
{
|
|
7946
7956
|
name: "fill_form",
|
|
7947
|
-
description: "
|
|
7957
|
+
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.",
|
|
7948
7958
|
inputSchema: {
|
|
7949
7959
|
type: "object",
|
|
7950
7960
|
properties: {
|
|
7951
7961
|
lease: {
|
|
7952
7962
|
type: "string",
|
|
7953
|
-
description: "
|
|
7963
|
+
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."
|
|
7954
7964
|
},
|
|
7955
7965
|
target: {
|
|
7956
7966
|
type: "string",
|
|
7957
|
-
description: "
|
|
7967
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
7958
7968
|
},
|
|
7959
7969
|
fields: {
|
|
7960
7970
|
type: "array",
|
|
@@ -7990,29 +8000,29 @@ var MANIFEST = [
|
|
|
7990
8000
|
},
|
|
7991
8001
|
{
|
|
7992
8002
|
name: "type_text",
|
|
7993
|
-
description: "
|
|
8003
|
+
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.",
|
|
7994
8004
|
inputSchema: {
|
|
7995
8005
|
type: "object",
|
|
7996
8006
|
properties: {
|
|
7997
8007
|
lease: {
|
|
7998
8008
|
type: "string",
|
|
7999
|
-
description: "
|
|
8009
|
+
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."
|
|
8000
8010
|
},
|
|
8001
8011
|
target: {
|
|
8002
8012
|
type: "string",
|
|
8003
|
-
description: "
|
|
8013
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
8004
8014
|
},
|
|
8005
8015
|
uid: {
|
|
8006
8016
|
type: "number",
|
|
8007
|
-
description: "CDP backendDOMNodeId of the element to type into,
|
|
8017
|
+
description: "CDP backendDOMNodeId of the element to type into, from take_snapshot. Exactly one of uid or selector."
|
|
8008
8018
|
},
|
|
8009
8019
|
selector: {
|
|
8010
8020
|
type: "string",
|
|
8011
|
-
description: "CSS selector for the element to type into (
|
|
8021
|
+
description: "CSS selector for the element to type into (document.querySelector). Exactly one of uid or selector."
|
|
8012
8022
|
},
|
|
8013
8023
|
text: {
|
|
8014
8024
|
type: "string",
|
|
8015
|
-
description: "
|
|
8025
|
+
description: "Text to insert; appended to existing content rather than overwriting it."
|
|
8016
8026
|
}
|
|
8017
8027
|
},
|
|
8018
8028
|
required: [
|
|
@@ -8023,25 +8033,25 @@ var MANIFEST = [
|
|
|
8023
8033
|
},
|
|
8024
8034
|
{
|
|
8025
8035
|
name: "press_key",
|
|
8026
|
-
description: "
|
|
8036
|
+
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.",
|
|
8027
8037
|
inputSchema: {
|
|
8028
8038
|
type: "object",
|
|
8029
8039
|
properties: {
|
|
8030
8040
|
lease: {
|
|
8031
8041
|
type: "string",
|
|
8032
|
-
description: "
|
|
8042
|
+
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."
|
|
8033
8043
|
},
|
|
8034
8044
|
target: {
|
|
8035
8045
|
type: "string",
|
|
8036
|
-
description: "
|
|
8046
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
8037
8047
|
},
|
|
8038
8048
|
key: {
|
|
8039
8049
|
type: "string",
|
|
8040
|
-
description: "Key to press: a named key
|
|
8050
|
+
description: "Key to press: a named key (Enter, Tab, Escape, ArrowDown, Backspace, ...) or a single printable character."
|
|
8041
8051
|
},
|
|
8042
8052
|
modifiers: {
|
|
8043
8053
|
type: "array",
|
|
8044
|
-
description: "
|
|
8054
|
+
description: "Modifier names held during the press: 'Control'/'Ctrl', 'Shift', 'Alt', 'Meta'/'Cmd'.",
|
|
8045
8055
|
items: {
|
|
8046
8056
|
type: "string"
|
|
8047
8057
|
}
|
|
@@ -8055,32 +8065,32 @@ var MANIFEST = [
|
|
|
8055
8065
|
},
|
|
8056
8066
|
{
|
|
8057
8067
|
name: "upload_file",
|
|
8058
|
-
description: "
|
|
8068
|
+
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.",
|
|
8059
8069
|
inputSchema: {
|
|
8060
8070
|
type: "object",
|
|
8061
8071
|
properties: {
|
|
8062
8072
|
lease: {
|
|
8063
8073
|
type: "string",
|
|
8064
|
-
description: "
|
|
8074
|
+
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."
|
|
8065
8075
|
},
|
|
8066
8076
|
target: {
|
|
8067
8077
|
type: "string",
|
|
8068
|
-
description: "
|
|
8078
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
8069
8079
|
},
|
|
8070
8080
|
uid: {
|
|
8071
8081
|
type: "number",
|
|
8072
|
-
description: "CDP backendDOMNodeId of the file input element,
|
|
8082
|
+
description: "CDP backendDOMNodeId of the file input element, from take_snapshot. Exactly one of uid or selector."
|
|
8073
8083
|
},
|
|
8074
8084
|
selector: {
|
|
8075
8085
|
type: "string",
|
|
8076
|
-
description: "CSS selector for the file input element (
|
|
8086
|
+
description: "CSS selector for the file input element (document.querySelector). Exactly one of uid or selector."
|
|
8077
8087
|
},
|
|
8078
8088
|
files: {
|
|
8079
8089
|
type: "array",
|
|
8080
8090
|
items: {
|
|
8081
8091
|
type: "string"
|
|
8082
8092
|
},
|
|
8083
|
-
description: 'Absolute path(s) to
|
|
8093
|
+
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.'
|
|
8084
8094
|
}
|
|
8085
8095
|
},
|
|
8086
8096
|
required: [
|
|
@@ -8091,17 +8101,17 @@ var MANIFEST = [
|
|
|
8091
8101
|
},
|
|
8092
8102
|
{
|
|
8093
8103
|
name: "take_screenshot",
|
|
8094
|
-
description: "
|
|
8104
|
+
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.",
|
|
8095
8105
|
inputSchema: {
|
|
8096
8106
|
type: "object",
|
|
8097
8107
|
properties: {
|
|
8098
8108
|
lease: {
|
|
8099
8109
|
type: "string",
|
|
8100
|
-
description: "
|
|
8110
|
+
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."
|
|
8101
8111
|
},
|
|
8102
8112
|
target: {
|
|
8103
8113
|
type: "string",
|
|
8104
|
-
description: "
|
|
8114
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
8105
8115
|
},
|
|
8106
8116
|
format: {
|
|
8107
8117
|
type: "string",
|
|
@@ -8109,35 +8119,35 @@ var MANIFEST = [
|
|
|
8109
8119
|
"png",
|
|
8110
8120
|
"jpeg"
|
|
8111
8121
|
],
|
|
8112
|
-
description: "Image format
|
|
8122
|
+
description: "Image format, default png. quality applies only to jpeg."
|
|
8113
8123
|
},
|
|
8114
8124
|
quality: {
|
|
8115
8125
|
type: "number",
|
|
8116
|
-
description: "JPEG quality 0-100
|
|
8126
|
+
description: "JPEG quality 0-100, default 80; ignored for png."
|
|
8117
8127
|
},
|
|
8118
8128
|
fullPage: {
|
|
8119
8129
|
type: "boolean",
|
|
8120
|
-
description: "Capture the full scrollable
|
|
8130
|
+
description: "Capture the full scrollable height (via Page.getLayoutMetrics), not just the viewport."
|
|
8121
8131
|
},
|
|
8122
8132
|
scale: {
|
|
8123
8133
|
type: "number",
|
|
8124
|
-
description: "Output-pixel multiplier for this
|
|
8134
|
+
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."
|
|
8125
8135
|
},
|
|
8126
8136
|
renderWidth: {
|
|
8127
8137
|
type: "number",
|
|
8128
|
-
description: "
|
|
8138
|
+
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)."
|
|
8129
8139
|
},
|
|
8130
8140
|
renderHeight: {
|
|
8131
8141
|
type: "number",
|
|
8132
|
-
description: "
|
|
8142
|
+
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."
|
|
8133
8143
|
},
|
|
8134
8144
|
tile: {
|
|
8135
8145
|
type: "boolean",
|
|
8136
|
-
description: "Whether
|
|
8146
|
+
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."
|
|
8137
8147
|
},
|
|
8138
8148
|
uid: {
|
|
8139
8149
|
type: "number",
|
|
8140
|
-
description: "Element to clip to: a
|
|
8150
|
+
description: "Element to clip to: a backendDOMNodeId from take_snapshot. Mutually exclusive with selector."
|
|
8141
8151
|
},
|
|
8142
8152
|
selector: {
|
|
8143
8153
|
type: "string",
|
|
@@ -8145,11 +8155,11 @@ var MANIFEST = [
|
|
|
8145
8155
|
},
|
|
8146
8156
|
savePath: {
|
|
8147
8157
|
type: "string",
|
|
8148
|
-
description: "Override the output
|
|
8158
|
+
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."
|
|
8149
8159
|
},
|
|
8150
8160
|
returnBase64: {
|
|
8151
8161
|
type: "boolean",
|
|
8152
|
-
description: "Also return
|
|
8162
|
+
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."
|
|
8153
8163
|
}
|
|
8154
8164
|
},
|
|
8155
8165
|
required: [],
|
|
@@ -8158,41 +8168,41 @@ var MANIFEST = [
|
|
|
8158
8168
|
},
|
|
8159
8169
|
{
|
|
8160
8170
|
name: "emulate",
|
|
8161
|
-
description: "
|
|
8171
|
+
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.",
|
|
8162
8172
|
inputSchema: {
|
|
8163
8173
|
type: "object",
|
|
8164
8174
|
properties: {
|
|
8165
8175
|
lease: {
|
|
8166
8176
|
type: "string",
|
|
8167
|
-
description: "
|
|
8177
|
+
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."
|
|
8168
8178
|
},
|
|
8169
8179
|
target: {
|
|
8170
8180
|
type: "string",
|
|
8171
|
-
description: "
|
|
8181
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
8172
8182
|
},
|
|
8173
8183
|
width: {
|
|
8174
8184
|
type: "number",
|
|
8175
|
-
description: "Device-metrics viewport width in CSS
|
|
8185
|
+
description: "Device-metrics viewport width in CSS px. Must be paired with height."
|
|
8176
8186
|
},
|
|
8177
8187
|
height: {
|
|
8178
8188
|
type: "number",
|
|
8179
|
-
description: "Device-metrics viewport height in CSS
|
|
8189
|
+
description: "Device-metrics viewport height in CSS px. Must be paired with width."
|
|
8180
8190
|
},
|
|
8181
8191
|
deviceScaleFactor: {
|
|
8182
8192
|
type: "number",
|
|
8183
|
-
description: "Device pixel ratio
|
|
8193
|
+
description: "Device pixel ratio for the device-metrics override; 0 = platform default."
|
|
8184
8194
|
},
|
|
8185
8195
|
mobile: {
|
|
8186
8196
|
type: "boolean",
|
|
8187
|
-
description: "
|
|
8197
|
+
description: "Emulate a mobile device (viewport meta, scrollbars, etc.) for the device-metrics override."
|
|
8188
8198
|
},
|
|
8189
8199
|
userAgent: {
|
|
8190
8200
|
type: "string",
|
|
8191
|
-
description: "User-Agent string
|
|
8201
|
+
description: "User-Agent string override (Emulation.setUserAgentOverride)."
|
|
8192
8202
|
},
|
|
8193
8203
|
cpuThrottlingRate: {
|
|
8194
8204
|
type: "number",
|
|
8195
|
-
description: "CPU throttling multiplier: 1
|
|
8205
|
+
description: "CPU throttling multiplier: 1=none, 2=2x slower, etc. Must be >=1."
|
|
8196
8206
|
},
|
|
8197
8207
|
media: {
|
|
8198
8208
|
type: "string",
|
|
@@ -8200,7 +8210,7 @@ var MANIFEST = [
|
|
|
8200
8210
|
},
|
|
8201
8211
|
mediaFeatures: {
|
|
8202
8212
|
type: "array",
|
|
8203
|
-
description: "Emulated media features, e.g. [{
|
|
8213
|
+
description: "Emulated media features, e.g. [{name:'prefers-color-scheme', value:'dark'}].",
|
|
8204
8214
|
items: {
|
|
8205
8215
|
type: "object",
|
|
8206
8216
|
properties: {
|
|
@@ -8222,7 +8232,7 @@ var MANIFEST = [
|
|
|
8222
8232
|
},
|
|
8223
8233
|
networkConditions: {
|
|
8224
8234
|
type: "object",
|
|
8225
|
-
description: "Network
|
|
8235
|
+
description: "Network overrides applied via Network.emulateNetworkConditions.",
|
|
8226
8236
|
properties: {
|
|
8227
8237
|
offline: {
|
|
8228
8238
|
type: "boolean",
|
|
@@ -8249,7 +8259,7 @@ var MANIFEST = [
|
|
|
8249
8259
|
},
|
|
8250
8260
|
clearOverrides: {
|
|
8251
8261
|
type: "boolean",
|
|
8252
|
-
description: "Reset every override (
|
|
8262
|
+
description: "Reset every override (metrics, UA, CPU, media, network) to browser default; ignores all other fields when true."
|
|
8253
8263
|
}
|
|
8254
8264
|
},
|
|
8255
8265
|
required: [],
|
|
@@ -8258,33 +8268,33 @@ var MANIFEST = [
|
|
|
8258
8268
|
},
|
|
8259
8269
|
{
|
|
8260
8270
|
name: "resize_page",
|
|
8261
|
-
description: "
|
|
8271
|
+
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.",
|
|
8262
8272
|
inputSchema: {
|
|
8263
8273
|
type: "object",
|
|
8264
8274
|
properties: {
|
|
8265
8275
|
lease: {
|
|
8266
8276
|
type: "string",
|
|
8267
|
-
description: "
|
|
8277
|
+
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."
|
|
8268
8278
|
},
|
|
8269
8279
|
target: {
|
|
8270
8280
|
type: "string",
|
|
8271
|
-
description: "
|
|
8281
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
8272
8282
|
},
|
|
8273
8283
|
width: {
|
|
8274
8284
|
type: "number",
|
|
8275
|
-
description: "Viewport width in CSS
|
|
8285
|
+
description: "Viewport width in CSS px (required, must be positive)."
|
|
8276
8286
|
},
|
|
8277
8287
|
height: {
|
|
8278
8288
|
type: "number",
|
|
8279
|
-
description: "Viewport height in CSS
|
|
8289
|
+
description: "Viewport height in CSS px (required, must be positive)."
|
|
8280
8290
|
},
|
|
8281
8291
|
deviceScaleFactor: {
|
|
8282
8292
|
type: "number",
|
|
8283
|
-
description: "Device pixel ratio
|
|
8293
|
+
description: "Device pixel ratio; 0 = platform default."
|
|
8284
8294
|
},
|
|
8285
8295
|
mobile: {
|
|
8286
8296
|
type: "boolean",
|
|
8287
|
-
description: "
|
|
8297
|
+
description: "Emulate a mobile device for the device-metrics override."
|
|
8288
8298
|
}
|
|
8289
8299
|
},
|
|
8290
8300
|
required: [
|
|
@@ -8296,17 +8306,17 @@ var MANIFEST = [
|
|
|
8296
8306
|
},
|
|
8297
8307
|
{
|
|
8298
8308
|
name: "handle_dialog",
|
|
8299
|
-
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.
|
|
8309
|
+
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.",
|
|
8300
8310
|
inputSchema: {
|
|
8301
8311
|
type: "object",
|
|
8302
8312
|
properties: {
|
|
8303
8313
|
lease: {
|
|
8304
8314
|
type: "string",
|
|
8305
|
-
description: "
|
|
8315
|
+
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."
|
|
8306
8316
|
},
|
|
8307
8317
|
target: {
|
|
8308
8318
|
type: "string",
|
|
8309
|
-
description: "
|
|
8319
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
8310
8320
|
},
|
|
8311
8321
|
accept: {
|
|
8312
8322
|
type: "boolean",
|
|
@@ -8318,7 +8328,7 @@ var MANIFEST = [
|
|
|
8318
8328
|
},
|
|
8319
8329
|
timeoutMs: {
|
|
8320
8330
|
type: "number",
|
|
8321
|
-
description: "How long to wait for the next dialog in milliseconds (default 15000)."
|
|
8331
|
+
description: "How long to wait for the next dialog, in milliseconds (default 15000)."
|
|
8322
8332
|
},
|
|
8323
8333
|
autoMs: {
|
|
8324
8334
|
type: "number",
|
|
@@ -8333,29 +8343,29 @@ var MANIFEST = [
|
|
|
8333
8343
|
},
|
|
8334
8344
|
{
|
|
8335
8345
|
name: "list_console_messages",
|
|
8336
|
-
description: "Read console output (logs, warnings, exceptions) captured for the target
|
|
8346
|
+
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.",
|
|
8337
8347
|
inputSchema: {
|
|
8338
8348
|
type: "object",
|
|
8339
8349
|
properties: {
|
|
8340
8350
|
lease: {
|
|
8341
8351
|
type: "string",
|
|
8342
|
-
description: "
|
|
8352
|
+
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."
|
|
8343
8353
|
},
|
|
8344
8354
|
target: {
|
|
8345
8355
|
type: "string",
|
|
8346
|
-
description: "
|
|
8356
|
+
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."
|
|
8347
8357
|
},
|
|
8348
8358
|
reload: {
|
|
8349
8359
|
type: "boolean",
|
|
8350
|
-
description: "Record fresh by reloading the page and capturing
|
|
8360
|
+
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."
|
|
8351
8361
|
},
|
|
8352
8362
|
durationMs: {
|
|
8353
8363
|
type: "number",
|
|
8354
|
-
description: "Capture window for reload mode, in
|
|
8364
|
+
description: "Capture window for reload mode, in ms. Default 2500."
|
|
8355
8365
|
},
|
|
8356
8366
|
wake: {
|
|
8357
8367
|
type: "boolean",
|
|
8358
|
-
description: "Worker targets only,
|
|
8368
|
+
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."
|
|
8359
8369
|
}
|
|
8360
8370
|
},
|
|
8361
8371
|
required: [],
|
|
@@ -8364,17 +8374,17 @@ var MANIFEST = [
|
|
|
8364
8374
|
},
|
|
8365
8375
|
{
|
|
8366
8376
|
name: "get_console_message",
|
|
8367
|
-
description: "Return
|
|
8377
|
+
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.",
|
|
8368
8378
|
inputSchema: {
|
|
8369
8379
|
type: "object",
|
|
8370
8380
|
properties: {
|
|
8371
8381
|
lease: {
|
|
8372
8382
|
type: "string",
|
|
8373
|
-
description: "
|
|
8383
|
+
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."
|
|
8374
8384
|
},
|
|
8375
8385
|
target: {
|
|
8376
8386
|
type: "string",
|
|
8377
|
-
description: "
|
|
8387
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
8378
8388
|
},
|
|
8379
8389
|
index: {
|
|
8380
8390
|
type: "number",
|
|
@@ -8387,33 +8397,33 @@ var MANIFEST = [
|
|
|
8387
8397
|
},
|
|
8388
8398
|
{
|
|
8389
8399
|
name: "list_network_requests",
|
|
8390
|
-
description: "Return correlated network
|
|
8400
|
+
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.",
|
|
8391
8401
|
inputSchema: {
|
|
8392
8402
|
type: "object",
|
|
8393
8403
|
properties: {
|
|
8394
8404
|
lease: {
|
|
8395
8405
|
type: "string",
|
|
8396
|
-
description: "
|
|
8406
|
+
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."
|
|
8397
8407
|
},
|
|
8398
8408
|
target: {
|
|
8399
8409
|
type: "string",
|
|
8400
|
-
description: "
|
|
8410
|
+
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."
|
|
8401
8411
|
},
|
|
8402
8412
|
reload: {
|
|
8403
8413
|
type: "boolean",
|
|
8404
|
-
description: "Record fresh by reloading the page and capturing
|
|
8414
|
+
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."
|
|
8405
8415
|
},
|
|
8406
8416
|
durationMs: {
|
|
8407
8417
|
type: "number",
|
|
8408
|
-
description: "Capture window for reload mode, in
|
|
8418
|
+
description: "Capture window for reload mode, in ms. Default 2500."
|
|
8409
8419
|
},
|
|
8410
8420
|
filterUrl: {
|
|
8411
8421
|
type: "string",
|
|
8412
|
-
description: "
|
|
8422
|
+
description: "Return only requests whose URL contains this substring."
|
|
8413
8423
|
},
|
|
8414
8424
|
wake: {
|
|
8415
8425
|
type: "boolean",
|
|
8416
|
-
description: "Worker targets only,
|
|
8426
|
+
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."
|
|
8417
8427
|
}
|
|
8418
8428
|
},
|
|
8419
8429
|
required: [],
|
|
@@ -8422,21 +8432,21 @@ var MANIFEST = [
|
|
|
8422
8432
|
},
|
|
8423
8433
|
{
|
|
8424
8434
|
name: "get_network_request",
|
|
8425
|
-
description: "Return one network request (matched by exact requestId, else
|
|
8435
|
+
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.",
|
|
8426
8436
|
inputSchema: {
|
|
8427
8437
|
type: "object",
|
|
8428
8438
|
properties: {
|
|
8429
8439
|
lease: {
|
|
8430
8440
|
type: "string",
|
|
8431
|
-
description: "
|
|
8441
|
+
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."
|
|
8432
8442
|
},
|
|
8433
8443
|
target: {
|
|
8434
8444
|
type: "string",
|
|
8435
|
-
description: "
|
|
8445
|
+
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."
|
|
8436
8446
|
},
|
|
8437
8447
|
requestId: {
|
|
8438
8448
|
type: "string",
|
|
8439
|
-
description: "Match by exact requestId (metadata only
|
|
8449
|
+
description: "Match by exact requestId (metadata only; cannot fetch a body, since a reload re-mints requestIds)."
|
|
8440
8450
|
},
|
|
8441
8451
|
url: {
|
|
8442
8452
|
type: "string",
|
|
@@ -8444,15 +8454,15 @@ var MANIFEST = [
|
|
|
8444
8454
|
},
|
|
8445
8455
|
includeBody: {
|
|
8446
8456
|
type: "boolean",
|
|
8447
|
-
description: "Also fetch the response body; drives a fresh
|
|
8457
|
+
description: "Also fetch the response body; drives a fresh capture and requires the url selector."
|
|
8448
8458
|
},
|
|
8449
8459
|
durationMs: {
|
|
8450
8460
|
type: "number",
|
|
8451
|
-
description: "Capture window for the
|
|
8461
|
+
description: "Capture window for the body-fetch reload, in ms. Default 2500."
|
|
8452
8462
|
},
|
|
8453
8463
|
wake: {
|
|
8454
8464
|
type: "boolean",
|
|
8455
|
-
description: "Worker targets only,
|
|
8465
|
+
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."
|
|
8456
8466
|
}
|
|
8457
8467
|
},
|
|
8458
8468
|
required: [],
|
|
@@ -8461,24 +8471,24 @@ var MANIFEST = [
|
|
|
8461
8471
|
},
|
|
8462
8472
|
{
|
|
8463
8473
|
name: "performance_start_trace",
|
|
8464
|
-
description: "
|
|
8474
|
+
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.",
|
|
8465
8475
|
inputSchema: {
|
|
8466
8476
|
type: "object",
|
|
8467
8477
|
properties: {
|
|
8468
8478
|
lease: {
|
|
8469
8479
|
type: "string",
|
|
8470
|
-
description: "
|
|
8480
|
+
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."
|
|
8471
8481
|
},
|
|
8472
8482
|
target: {
|
|
8473
8483
|
type: "string",
|
|
8474
|
-
description: "
|
|
8484
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
8475
8485
|
},
|
|
8476
8486
|
categories: {
|
|
8477
8487
|
type: "array",
|
|
8478
8488
|
items: {
|
|
8479
8489
|
type: "string"
|
|
8480
8490
|
},
|
|
8481
|
-
description: "Trace categories to
|
|
8491
|
+
description: "Trace categories to record. Defaults to timeline + user-timing + loading + disabled-by-default timeline tracks carrying LCP/LayoutShift/RunTask."
|
|
8482
8492
|
}
|
|
8483
8493
|
},
|
|
8484
8494
|
required: [],
|
|
@@ -8487,17 +8497,17 @@ var MANIFEST = [
|
|
|
8487
8497
|
},
|
|
8488
8498
|
{
|
|
8489
8499
|
name: "performance_stop_trace",
|
|
8490
|
-
description: "
|
|
8500
|
+
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.",
|
|
8491
8501
|
inputSchema: {
|
|
8492
8502
|
type: "object",
|
|
8493
8503
|
properties: {
|
|
8494
8504
|
lease: {
|
|
8495
8505
|
type: "string",
|
|
8496
|
-
description: "
|
|
8506
|
+
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."
|
|
8497
8507
|
},
|
|
8498
8508
|
target: {
|
|
8499
8509
|
type: "string",
|
|
8500
|
-
description: "
|
|
8510
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
8501
8511
|
}
|
|
8502
8512
|
},
|
|
8503
8513
|
required: [],
|
|
@@ -8506,17 +8516,17 @@ var MANIFEST = [
|
|
|
8506
8516
|
},
|
|
8507
8517
|
{
|
|
8508
8518
|
name: "performance_analyze_insight",
|
|
8509
|
-
description: "
|
|
8519
|
+
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).",
|
|
8510
8520
|
inputSchema: {
|
|
8511
8521
|
type: "object",
|
|
8512
8522
|
properties: {
|
|
8513
8523
|
lease: {
|
|
8514
8524
|
type: "string",
|
|
8515
|
-
description: "
|
|
8525
|
+
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."
|
|
8516
8526
|
},
|
|
8517
8527
|
tracePath: {
|
|
8518
8528
|
type: "string",
|
|
8519
|
-
description: "
|
|
8529
|
+
description: "Path to a trace JSON file (bare array or {traceEvents:[...]}) written by performance_trace or performance_stop_trace. Required."
|
|
8520
8530
|
}
|
|
8521
8531
|
},
|
|
8522
8532
|
required: [],
|
|
@@ -8525,25 +8535,25 @@ var MANIFEST = [
|
|
|
8525
8535
|
},
|
|
8526
8536
|
{
|
|
8527
8537
|
name: "performance_trace",
|
|
8528
|
-
description: "
|
|
8538
|
+
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.",
|
|
8529
8539
|
inputSchema: {
|
|
8530
8540
|
type: "object",
|
|
8531
8541
|
properties: {
|
|
8532
8542
|
lease: {
|
|
8533
8543
|
type: "string",
|
|
8534
|
-
description: "
|
|
8544
|
+
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."
|
|
8535
8545
|
},
|
|
8536
8546
|
target: {
|
|
8537
8547
|
type: "string",
|
|
8538
|
-
description: "
|
|
8548
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
8539
8549
|
},
|
|
8540
8550
|
durationMs: {
|
|
8541
8551
|
type: "number",
|
|
8542
|
-
description: "How long to record after the optional reload/navigate, in
|
|
8552
|
+
description: "How long to record after the optional reload/navigate, in ms. Default 3000."
|
|
8543
8553
|
},
|
|
8544
8554
|
reload: {
|
|
8545
8555
|
type: "boolean",
|
|
8546
|
-
description: "Reload the page after starting the trace to capture full navigation timing."
|
|
8556
|
+
description: "Reload the page after starting the trace, to capture full navigation timing."
|
|
8547
8557
|
},
|
|
8548
8558
|
navigateTo: {
|
|
8549
8559
|
type: "string",
|
|
@@ -8554,7 +8564,7 @@ var MANIFEST = [
|
|
|
8554
8564
|
items: {
|
|
8555
8565
|
type: "string"
|
|
8556
8566
|
},
|
|
8557
|
-
description: "Trace categories to
|
|
8567
|
+
description: "Trace categories to record. Defaults to timeline + user-timing + loading + disabled-by-default timeline tracks carrying LCP/LayoutShift/RunTask."
|
|
8558
8568
|
}
|
|
8559
8569
|
},
|
|
8560
8570
|
required: [],
|
|
@@ -8563,17 +8573,17 @@ var MANIFEST = [
|
|
|
8563
8573
|
},
|
|
8564
8574
|
{
|
|
8565
8575
|
name: "start_screen_recording",
|
|
8566
|
-
description: "
|
|
8576
|
+
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.",
|
|
8567
8577
|
inputSchema: {
|
|
8568
8578
|
type: "object",
|
|
8569
8579
|
properties: {
|
|
8570
8580
|
lease: {
|
|
8571
8581
|
type: "string",
|
|
8572
|
-
description: "
|
|
8582
|
+
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."
|
|
8573
8583
|
},
|
|
8574
8584
|
target: {
|
|
8575
8585
|
type: "string",
|
|
8576
|
-
description: "
|
|
8586
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
8577
8587
|
},
|
|
8578
8588
|
format: {
|
|
8579
8589
|
type: "string",
|
|
@@ -8581,27 +8591,27 @@ var MANIFEST = [
|
|
|
8581
8591
|
"jpeg",
|
|
8582
8592
|
"png"
|
|
8583
8593
|
],
|
|
8584
|
-
description: "Frame
|
|
8594
|
+
description: "Frame format, default jpeg (much smaller per repaint); png is lossless. quality applies to jpeg only."
|
|
8585
8595
|
},
|
|
8586
8596
|
quality: {
|
|
8587
8597
|
type: "number",
|
|
8588
|
-
description: "JPEG frame quality 0-100. Ignored for png
|
|
8598
|
+
description: "JPEG frame quality 0-100. Ignored for png; omitted leaves Chrome's own default."
|
|
8589
8599
|
},
|
|
8590
8600
|
maxWidth: {
|
|
8591
8601
|
type: "number",
|
|
8592
|
-
description: "
|
|
8602
|
+
description: "Caps the streamed frame width in px; also pins frame size if the viewport may change mid-recording."
|
|
8593
8603
|
},
|
|
8594
8604
|
maxHeight: {
|
|
8595
8605
|
type: "number",
|
|
8596
|
-
description: "
|
|
8606
|
+
description: "Caps the streamed frame height in px."
|
|
8597
8607
|
},
|
|
8598
8608
|
everyNthFrame: {
|
|
8599
8609
|
type: "number",
|
|
8600
|
-
description: "Capture only every Nth repaint (1
|
|
8610
|
+
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."
|
|
8601
8611
|
},
|
|
8602
8612
|
bringToFront: {
|
|
8603
8613
|
type: "boolean",
|
|
8604
|
-
description: "Activate the tab (Page.bringToFront) before recording
|
|
8614
|
+
description: "Activate the tab (Page.bringToFront) before recording, default false. A backgrounded/occluded tab may never repaint, yielding a 0-frame recording."
|
|
8605
8615
|
}
|
|
8606
8616
|
},
|
|
8607
8617
|
required: [],
|
|
@@ -8610,21 +8620,21 @@ var MANIFEST = [
|
|
|
8610
8620
|
},
|
|
8611
8621
|
{
|
|
8612
8622
|
name: "stop_screen_recording",
|
|
8613
|
-
description: "
|
|
8623
|
+
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.",
|
|
8614
8624
|
inputSchema: {
|
|
8615
8625
|
type: "object",
|
|
8616
8626
|
properties: {
|
|
8617
8627
|
lease: {
|
|
8618
8628
|
type: "string",
|
|
8619
|
-
description: "
|
|
8629
|
+
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."
|
|
8620
8630
|
},
|
|
8621
8631
|
target: {
|
|
8622
8632
|
type: "string",
|
|
8623
|
-
description: "Which recording to stop
|
|
8633
|
+
description: "Which recording to stop — 'active' valid only when exactly one recording is in flight. Grammar: server instructions."
|
|
8624
8634
|
},
|
|
8625
8635
|
savePath: {
|
|
8626
8636
|
type: "string",
|
|
8627
|
-
description: "Override the output
|
|
8637
|
+
description: "Override the output path (default /tmp/cdp-toolkit/screen-recording-<targetIdShort>-<stamp>.mp4)."
|
|
8628
8638
|
}
|
|
8629
8639
|
},
|
|
8630
8640
|
required: [],
|
|
@@ -8633,21 +8643,21 @@ var MANIFEST = [
|
|
|
8633
8643
|
},
|
|
8634
8644
|
{
|
|
8635
8645
|
name: "take_heapsnapshot",
|
|
8636
|
-
description: "
|
|
8646
|
+
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.",
|
|
8637
8647
|
inputSchema: {
|
|
8638
8648
|
type: "object",
|
|
8639
8649
|
properties: {
|
|
8640
8650
|
lease: {
|
|
8641
8651
|
type: "string",
|
|
8642
|
-
description: "
|
|
8652
|
+
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."
|
|
8643
8653
|
},
|
|
8644
8654
|
target: {
|
|
8645
8655
|
type: "string",
|
|
8646
|
-
description: "
|
|
8656
|
+
description: "Page selector: 'active' (default), 'index:N', 'url:<substr>', 'title:<substr>', 'label:<name>', or a 32-hex '<targetId>'. Grammar: see server instructions."
|
|
8647
8657
|
},
|
|
8648
8658
|
savePath: {
|
|
8649
8659
|
type: "string",
|
|
8650
|
-
description: "Override the output path.
|
|
8660
|
+
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."
|
|
8651
8661
|
}
|
|
8652
8662
|
},
|
|
8653
8663
|
required: [],
|
|
@@ -8656,24 +8666,24 @@ var MANIFEST = [
|
|
|
8656
8666
|
},
|
|
8657
8667
|
{
|
|
8658
8668
|
name: "lighthouse_audit",
|
|
8659
|
-
description: "
|
|
8669
|
+
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).",
|
|
8660
8670
|
inputSchema: {
|
|
8661
8671
|
type: "object",
|
|
8662
8672
|
properties: {
|
|
8663
8673
|
lease: {
|
|
8664
8674
|
type: "string",
|
|
8665
|
-
description: "
|
|
8675
|
+
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."
|
|
8666
8676
|
},
|
|
8667
8677
|
url: {
|
|
8668
8678
|
type: "string",
|
|
8669
|
-
description: "The URL to audit. Required
|
|
8679
|
+
description: "The URL to audit. Required — never points at a user tab implicitly."
|
|
8670
8680
|
},
|
|
8671
8681
|
categories: {
|
|
8672
8682
|
type: "array",
|
|
8673
8683
|
items: {
|
|
8674
8684
|
type: "string"
|
|
8675
8685
|
},
|
|
8676
|
-
description: 'Lighthouse categories to run (
|
|
8686
|
+
description: 'Lighthouse categories to run (--only-categories). Defaults to the full set, e.g. ["performance"] or ["performance","accessibility","seo"].'
|
|
8677
8687
|
},
|
|
8678
8688
|
savePath: {
|
|
8679
8689
|
type: "string",
|
|
@@ -8685,11 +8695,11 @@ var MANIFEST = [
|
|
|
8685
8695
|
"desktop",
|
|
8686
8696
|
"mobile"
|
|
8687
8697
|
],
|
|
8688
|
-
description: '
|
|
8698
|
+
description: '"desktop" (default, uses --preset=desktop to avoid heavy mobile throttling) or "mobile".'
|
|
8689
8699
|
},
|
|
8690
8700
|
timeoutMs: {
|
|
8691
8701
|
type: "number",
|
|
8692
|
-
description: "Overall budget for the lighthouse process in
|
|
8702
|
+
description: "Overall budget for the lighthouse process, in ms. Default 120000."
|
|
8693
8703
|
}
|
|
8694
8704
|
},
|
|
8695
8705
|
required: [
|
|
@@ -8700,21 +8710,21 @@ var MANIFEST = [
|
|
|
8700
8710
|
},
|
|
8701
8711
|
{
|
|
8702
8712
|
name: "mock_request",
|
|
8703
|
-
description: "Register a mock rule on a target's persistent fake-backend session (CDP Fetch domain):
|
|
8713
|
+
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.",
|
|
8704
8714
|
inputSchema: {
|
|
8705
8715
|
type: "object",
|
|
8706
8716
|
properties: {
|
|
8707
8717
|
lease: {
|
|
8708
8718
|
type: "string",
|
|
8709
|
-
description: "
|
|
8719
|
+
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."
|
|
8710
8720
|
},
|
|
8711
8721
|
target: {
|
|
8712
8722
|
type: "string",
|
|
8713
|
-
description: "
|
|
8723
|
+
description: "Which page's mock session. Defaults to the active page. Grammar: server instructions."
|
|
8714
8724
|
},
|
|
8715
8725
|
urlPattern: {
|
|
8716
8726
|
type: "string",
|
|
8717
|
-
description: `CDP Fetch urlPattern glob: '*'
|
|
8727
|
+
description: `CDP Fetch urlPattern glob: '*' any run of chars, '?' exactly one, '\\' escapes. Only matching URLs are paused. e.g. "*/api/users*".`
|
|
8718
8728
|
},
|
|
8719
8729
|
action: {
|
|
8720
8730
|
type: "string",
|
|
@@ -8727,7 +8737,7 @@ var MANIFEST = [
|
|
|
8727
8737
|
},
|
|
8728
8738
|
status: {
|
|
8729
8739
|
type: "number",
|
|
8730
|
-
description: "fulfill: HTTP status
|
|
8740
|
+
description: "fulfill: HTTP status for the canned response. Default 200."
|
|
8731
8741
|
},
|
|
8732
8742
|
body: {
|
|
8733
8743
|
type: "string",
|
|
@@ -8747,7 +8757,7 @@ var MANIFEST = [
|
|
|
8747
8757
|
},
|
|
8748
8758
|
method: {
|
|
8749
8759
|
type: "string",
|
|
8750
|
-
description: 'Only mock
|
|
8760
|
+
description: 'Only mock this HTTP method (e.g. "POST"); others pass through.'
|
|
8751
8761
|
},
|
|
8752
8762
|
delayMs: {
|
|
8753
8763
|
type: "number",
|
|
@@ -8755,11 +8765,11 @@ var MANIFEST = [
|
|
|
8755
8765
|
},
|
|
8756
8766
|
failRate: {
|
|
8757
8767
|
type: "number",
|
|
8758
|
-
description: "Fault injection: probability 0..1 of failing a matched request regardless of action
|
|
8768
|
+
description: "Fault injection: probability 0..1 of failing a matched request regardless of action."
|
|
8759
8769
|
},
|
|
8760
8770
|
reload: {
|
|
8761
8771
|
type: "boolean",
|
|
8762
|
-
description: "Reload the target after arming so the mock
|
|
8772
|
+
description: "Reload the target after arming so the mock catches traffic immediately."
|
|
8763
8773
|
}
|
|
8764
8774
|
},
|
|
8765
8775
|
required: [
|
|
@@ -8770,17 +8780,17 @@ var MANIFEST = [
|
|
|
8770
8780
|
},
|
|
8771
8781
|
{
|
|
8772
8782
|
name: "list_mocks",
|
|
8773
|
-
description: "List active fake-backend sessions (one per target) with their rules and hit counts. Prunes sessions whose tab has closed.
|
|
8783
|
+
description: "List active fake-backend sessions (one per target) with their rules and hit counts. Prunes sessions whose tab has closed.",
|
|
8774
8784
|
inputSchema: {
|
|
8775
8785
|
type: "object",
|
|
8776
8786
|
properties: {
|
|
8777
8787
|
lease: {
|
|
8778
8788
|
type: "string",
|
|
8779
|
-
description: "
|
|
8789
|
+
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."
|
|
8780
8790
|
},
|
|
8781
8791
|
target: {
|
|
8782
8792
|
type: "string",
|
|
8783
|
-
description: "Unused filter placeholder;
|
|
8793
|
+
description: "Unused filter placeholder; returns all active sessions."
|
|
8784
8794
|
}
|
|
8785
8795
|
},
|
|
8786
8796
|
required: [],
|
|
@@ -8795,11 +8805,11 @@ var MANIFEST = [
|
|
|
8795
8805
|
properties: {
|
|
8796
8806
|
lease: {
|
|
8797
8807
|
type: "string",
|
|
8798
|
-
description: "
|
|
8808
|
+
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."
|
|
8799
8809
|
},
|
|
8800
8810
|
target: {
|
|
8801
8811
|
type: "string",
|
|
8802
|
-
description: "
|
|
8812
|
+
description: "Which page's mock session to clear. Defaults to the active page; ignored when all:true. Grammar: server instructions."
|
|
8803
8813
|
},
|
|
8804
8814
|
all: {
|
|
8805
8815
|
type: "boolean",
|
|
@@ -8812,29 +8822,29 @@ var MANIFEST = [
|
|
|
8812
8822
|
},
|
|
8813
8823
|
{
|
|
8814
8824
|
name: "claim_page",
|
|
8815
|
-
description: "Take exclusive ownership of a browser tab
|
|
8825
|
+
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.",
|
|
8816
8826
|
inputSchema: {
|
|
8817
8827
|
type: "object",
|
|
8818
8828
|
properties: {
|
|
8819
8829
|
target: {
|
|
8820
8830
|
type: "string",
|
|
8821
|
-
description: "Take over an already-open tab
|
|
8831
|
+
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."
|
|
8822
8832
|
},
|
|
8823
8833
|
targetId: {
|
|
8824
8834
|
type: "string",
|
|
8825
|
-
description: "
|
|
8835
|
+
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."
|
|
8826
8836
|
},
|
|
8827
8837
|
url: {
|
|
8828
8838
|
type: "string",
|
|
8829
|
-
description: "When opening a fresh tab, navigate it here. Ignored when target or targetId is given
|
|
8839
|
+
description: "When opening a fresh tab, navigate it here. Ignored when target or targetId is given."
|
|
8830
8840
|
},
|
|
8831
8841
|
label: {
|
|
8832
8842
|
type: "string",
|
|
8833
|
-
description: "Agent label recorded on the lease
|
|
8843
|
+
description: "Agent label recorded on the lease; surfaced in conflict errors and list_leases. Defaults to pid-<pid>."
|
|
8834
8844
|
},
|
|
8835
8845
|
ttlMs: {
|
|
8836
8846
|
type: "number",
|
|
8837
|
-
description: "How long the lease survives without use before it is reclaimable. Defaults to CDP_LEASE_TTL_MS, else 900000 (
|
|
8847
|
+
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."
|
|
8838
8848
|
}
|
|
8839
8849
|
},
|
|
8840
8850
|
required: [],
|
|
@@ -8843,21 +8853,21 @@ var MANIFEST = [
|
|
|
8843
8853
|
},
|
|
8844
8854
|
{
|
|
8845
8855
|
name: "release_page",
|
|
8846
|
-
description: "Give a lease back,
|
|
8856
|
+
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}.",
|
|
8847
8857
|
inputSchema: {
|
|
8848
8858
|
type: "object",
|
|
8849
8859
|
properties: {
|
|
8850
8860
|
lease: {
|
|
8851
8861
|
type: "string",
|
|
8852
|
-
description: "
|
|
8862
|
+
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."
|
|
8853
8863
|
},
|
|
8854
8864
|
target: {
|
|
8855
8865
|
type: "string",
|
|
8856
|
-
description: "
|
|
8866
|
+
description: "A tab THIS process holds (grammar: server instructions). Mutually exclusive with 'lease'. Refused if another process holds the tab."
|
|
8857
8867
|
},
|
|
8858
8868
|
close: {
|
|
8859
8869
|
type: "boolean",
|
|
8860
|
-
description: "Force the close decision instead of letting the creation
|
|
8870
|
+
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."
|
|
8861
8871
|
}
|
|
8862
8872
|
},
|
|
8863
8873
|
required: [],
|
|
@@ -8866,7 +8876,7 @@ var MANIFEST = [
|
|
|
8866
8876
|
},
|
|
8867
8877
|
{
|
|
8868
8878
|
name: "list_leases",
|
|
8869
|
-
description: "Enumerate every active lease for diagnosis
|
|
8879
|
+
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.",
|
|
8870
8880
|
inputSchema: {
|
|
8871
8881
|
type: "object",
|
|
8872
8882
|
properties: {},
|