@mytai20100/opencode-browser 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -1
- package/dist/index.js +733 -242
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,8 +9,6 @@ const wss = new WebSocketServer({
|
|
|
9
9
|
host: "0.0.0.0",
|
|
10
10
|
verifyClient: () => true,
|
|
11
11
|
});
|
|
12
|
-
// CRITICAL: Without this handler, EADDRINUSE crashes the process before
|
|
13
|
-
// stdio transport starts, causing opencode to report "cannot get tools".
|
|
14
12
|
wss.on("error", (err) => {
|
|
15
13
|
if (err.code === "EADDRINUSE") {
|
|
16
14
|
console.error(`[opencode-browser] Port ${WS_PORT} already in use. ` +
|
|
@@ -1372,392 +1370,815 @@ const TOOLS = [
|
|
|
1372
1370
|
required: ["selector"],
|
|
1373
1371
|
},
|
|
1374
1372
|
},
|
|
1375
|
-
,
|
|
1376
1373
|
{
|
|
1377
|
-
name: "
|
|
1378
|
-
description: "
|
|
1374
|
+
name: "chrome_mock_geolocation",
|
|
1375
|
+
description: "Mock GPS location for testing",
|
|
1379
1376
|
inputSchema: {
|
|
1380
1377
|
type: "object",
|
|
1381
1378
|
properties: {
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1379
|
+
latitude: { type: "number", description: "Latitude coordinate" },
|
|
1380
|
+
longitude: { type: "number", description: "Longitude coordinate" },
|
|
1381
|
+
accuracy: { type: "number", description: "Accuracy in meters (default 100)" },
|
|
1385
1382
|
tabId: { type: "number" },
|
|
1386
1383
|
},
|
|
1384
|
+
required: ["latitude", "longitude"],
|
|
1387
1385
|
},
|
|
1388
1386
|
},
|
|
1389
1387
|
{
|
|
1390
|
-
name: "
|
|
1391
|
-
description: "
|
|
1388
|
+
name: "chrome_mock_timezone",
|
|
1389
|
+
description: "Override timezone of the page",
|
|
1392
1390
|
inputSchema: {
|
|
1393
1391
|
type: "object",
|
|
1394
1392
|
properties: {
|
|
1395
|
-
|
|
1396
|
-
x: { type: "number", description: "X coordinate" },
|
|
1397
|
-
y: { type: "number", description: "Y coordinate" },
|
|
1393
|
+
timezoneId: { type: "string", description: "IANA timezone ID e.g. 'America/New_York', 'Asia/Tokyo'" },
|
|
1398
1394
|
tabId: { type: "number" },
|
|
1399
1395
|
},
|
|
1396
|
+
required: ["timezoneId"],
|
|
1400
1397
|
},
|
|
1401
1398
|
},
|
|
1402
1399
|
{
|
|
1403
|
-
name: "
|
|
1404
|
-
description: "
|
|
1400
|
+
name: "chrome_mock_locale",
|
|
1401
|
+
description: "Override locale/language of the page",
|
|
1405
1402
|
inputSchema: {
|
|
1406
1403
|
type: "object",
|
|
1407
1404
|
properties: {
|
|
1408
|
-
|
|
1409
|
-
x: { type: "number", description: "X coordinate" },
|
|
1410
|
-
y: { type: "number", description: "Y coordinate" },
|
|
1405
|
+
locale: { type: "string", description: "Locale code e.g. 'en-US', 'ja-JP', 'fr-FR'" },
|
|
1411
1406
|
tabId: { type: "number" },
|
|
1412
1407
|
},
|
|
1408
|
+
required: ["locale"],
|
|
1413
1409
|
},
|
|
1414
1410
|
},
|
|
1415
1411
|
{
|
|
1416
|
-
name: "
|
|
1417
|
-
description: "
|
|
1412
|
+
name: "chrome_mock_battery",
|
|
1413
|
+
description: "Mock battery status API",
|
|
1418
1414
|
inputSchema: {
|
|
1419
1415
|
type: "object",
|
|
1420
1416
|
properties: {
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
toX: { type: "number", description: "Target X coordinate" },
|
|
1426
|
-
toY: { type: "number", description: "Target Y coordinate" },
|
|
1417
|
+
charging: { type: "boolean", description: "Is battery charging" },
|
|
1418
|
+
chargingTime: { type: "number", description: "Seconds until fully charged" },
|
|
1419
|
+
dischargingTime: { type: "number", description: "Seconds until empty" },
|
|
1420
|
+
level: { type: "number", description: "Battery level 0.0-1.0" },
|
|
1427
1421
|
tabId: { type: "number" },
|
|
1428
1422
|
},
|
|
1423
|
+
required: ["charging", "level"],
|
|
1429
1424
|
},
|
|
1430
1425
|
},
|
|
1431
1426
|
{
|
|
1432
|
-
name: "
|
|
1433
|
-
description: "
|
|
1427
|
+
name: "chrome_mock_media_type",
|
|
1428
|
+
description: "Override CSS media type (print/screen)",
|
|
1434
1429
|
inputSchema: {
|
|
1435
1430
|
type: "object",
|
|
1436
1431
|
properties: {
|
|
1437
|
-
|
|
1432
|
+
mediaType: { type: "string", enum: ["screen", "print"], description: "Media type" },
|
|
1438
1433
|
tabId: { type: "number" },
|
|
1439
1434
|
},
|
|
1440
|
-
required: ["
|
|
1435
|
+
required: ["mediaType"],
|
|
1441
1436
|
},
|
|
1442
1437
|
},
|
|
1443
1438
|
{
|
|
1444
|
-
name: "
|
|
1445
|
-
description: "
|
|
1439
|
+
name: "chrome_emulate_vision",
|
|
1440
|
+
description: "Emulate vision deficiencies (color blindness, blurred vision)",
|
|
1446
1441
|
inputSchema: {
|
|
1447
1442
|
type: "object",
|
|
1448
1443
|
properties: {
|
|
1449
|
-
|
|
1444
|
+
type: {
|
|
1445
|
+
type: "string",
|
|
1446
|
+
enum: ["none", "achromatopsia", "blurredVision", "deuteranopia", "protanopia", "tritanopia"],
|
|
1447
|
+
description: "Vision deficiency type"
|
|
1448
|
+
},
|
|
1450
1449
|
tabId: { type: "number" },
|
|
1451
1450
|
},
|
|
1451
|
+
required: ["type"],
|
|
1452
1452
|
},
|
|
1453
1453
|
},
|
|
1454
1454
|
{
|
|
1455
|
-
name: "
|
|
1456
|
-
description: "
|
|
1455
|
+
name: "chrome_cpu_throttle",
|
|
1456
|
+
description: "Throttle CPU to simulate slower devices",
|
|
1457
1457
|
inputSchema: {
|
|
1458
1458
|
type: "object",
|
|
1459
1459
|
properties: {
|
|
1460
|
-
|
|
1461
|
-
timeout: { type: "number", description: "Max wait in ms (default 30000)" },
|
|
1460
|
+
rate: { type: "number", description: "Throttle rate (1 = no throttle, 4 = 4x slowdown)" },
|
|
1462
1461
|
tabId: { type: "number" },
|
|
1463
1462
|
},
|
|
1463
|
+
required: ["rate"],
|
|
1464
1464
|
},
|
|
1465
1465
|
},
|
|
1466
1466
|
{
|
|
1467
|
-
name: "
|
|
1468
|
-
description: "
|
|
1467
|
+
name: "chrome_mock_date_time",
|
|
1468
|
+
description: "Override Date.now() for deterministic testing",
|
|
1469
|
+
inputSchema: {
|
|
1470
|
+
type: "object",
|
|
1471
|
+
properties: {
|
|
1472
|
+
timestamp: { type: "number", description: "Unix timestamp in milliseconds" },
|
|
1473
|
+
freeze: { type: "boolean", description: "Freeze time at this value" },
|
|
1474
|
+
tabId: { type: "number" },
|
|
1475
|
+
},
|
|
1476
|
+
required: ["timestamp"],
|
|
1477
|
+
},
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
name: "chrome_modify_response_body",
|
|
1481
|
+
description: "Modify response body before page receives it",
|
|
1482
|
+
inputSchema: {
|
|
1483
|
+
type: "object",
|
|
1484
|
+
properties: {
|
|
1485
|
+
urlPattern: { type: "string", description: "URL pattern to match" },
|
|
1486
|
+
newBody: { type: "string", description: "New response body" },
|
|
1487
|
+
tabId: { type: "number" },
|
|
1488
|
+
},
|
|
1489
|
+
required: ["urlPattern", "newBody"],
|
|
1490
|
+
},
|
|
1491
|
+
},
|
|
1492
|
+
{
|
|
1493
|
+
name: "chrome_get_ws_frames",
|
|
1494
|
+
description: "Capture WebSocket frames",
|
|
1495
|
+
inputSchema: {
|
|
1496
|
+
type: "object",
|
|
1497
|
+
properties: {
|
|
1498
|
+
limit: { type: "number", description: "Max frames to return (default 100)" },
|
|
1499
|
+
tabId: { type: "number" },
|
|
1500
|
+
},
|
|
1501
|
+
},
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
name: "chrome_set_extra_headers",
|
|
1505
|
+
description: "Add extra HTTP headers to all requests",
|
|
1506
|
+
inputSchema: {
|
|
1507
|
+
type: "object",
|
|
1508
|
+
properties: {
|
|
1509
|
+
headers: { type: "object", description: "Headers to add" },
|
|
1510
|
+
tabId: { type: "number" },
|
|
1511
|
+
},
|
|
1512
|
+
required: ["headers"],
|
|
1513
|
+
},
|
|
1514
|
+
},
|
|
1515
|
+
{
|
|
1516
|
+
name: "chrome_get_request_body",
|
|
1517
|
+
description: "Get POST body of a sent request",
|
|
1518
|
+
inputSchema: {
|
|
1519
|
+
type: "object",
|
|
1520
|
+
properties: {
|
|
1521
|
+
requestId: { type: "string", description: "Request ID from debug_get_network" },
|
|
1522
|
+
tabId: { type: "number" },
|
|
1523
|
+
},
|
|
1524
|
+
required: ["requestId"],
|
|
1525
|
+
},
|
|
1526
|
+
},
|
|
1527
|
+
{
|
|
1528
|
+
name: "chrome_profiling_start",
|
|
1529
|
+
description: "Start CPU profiling",
|
|
1469
1530
|
inputSchema: {
|
|
1470
1531
|
type: "object",
|
|
1471
1532
|
properties: {
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1533
|
+
tabId: { type: "number" },
|
|
1534
|
+
},
|
|
1535
|
+
},
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
name: "chrome_profiling_stop",
|
|
1539
|
+
description: "Stop CPU profiling and get profile data",
|
|
1540
|
+
inputSchema: {
|
|
1541
|
+
type: "object",
|
|
1542
|
+
properties: {
|
|
1543
|
+
tabId: { type: "number" },
|
|
1544
|
+
},
|
|
1545
|
+
},
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
name: "chrome_heap_snapshot",
|
|
1549
|
+
description: "Take a heap snapshot for memory analysis",
|
|
1550
|
+
inputSchema: {
|
|
1551
|
+
type: "object",
|
|
1552
|
+
properties: {
|
|
1553
|
+
tabId: { type: "number" },
|
|
1554
|
+
},
|
|
1555
|
+
},
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
name: "chrome_trace_start",
|
|
1559
|
+
description: "Start tracing (Timeline/Performance recording)",
|
|
1560
|
+
inputSchema: {
|
|
1561
|
+
type: "object",
|
|
1562
|
+
properties: {
|
|
1563
|
+
categories: { type: "array", items: { type: "string" }, description: "Trace categories" },
|
|
1564
|
+
tabId: { type: "number" },
|
|
1565
|
+
},
|
|
1566
|
+
},
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
name: "chrome_trace_stop",
|
|
1570
|
+
description: "Stop tracing and get trace events",
|
|
1571
|
+
inputSchema: {
|
|
1572
|
+
type: "object",
|
|
1573
|
+
properties: {
|
|
1574
|
+
tabId: { type: "number" },
|
|
1575
|
+
},
|
|
1576
|
+
},
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
name: "chrome_pause_on_exception",
|
|
1580
|
+
description: "Pause debugger on exceptions",
|
|
1581
|
+
inputSchema: {
|
|
1582
|
+
type: "object",
|
|
1583
|
+
properties: {
|
|
1584
|
+
state: { type: "string", enum: ["none", "uncaught", "all"], description: "When to pause" },
|
|
1585
|
+
tabId: { type: "number" },
|
|
1586
|
+
},
|
|
1587
|
+
required: ["state"],
|
|
1588
|
+
},
|
|
1589
|
+
},
|
|
1590
|
+
{
|
|
1591
|
+
name: "chrome_debugger_resume",
|
|
1592
|
+
description: "Resume execution after debugger pause",
|
|
1593
|
+
inputSchema: {
|
|
1594
|
+
type: "object",
|
|
1595
|
+
properties: {
|
|
1596
|
+
tabId: { type: "number" },
|
|
1597
|
+
},
|
|
1598
|
+
},
|
|
1599
|
+
},
|
|
1600
|
+
{
|
|
1601
|
+
name: "chrome_debugger_step_over",
|
|
1602
|
+
description: "Step over current line",
|
|
1603
|
+
inputSchema: {
|
|
1604
|
+
type: "object",
|
|
1605
|
+
properties: {
|
|
1606
|
+
tabId: { type: "number" },
|
|
1607
|
+
},
|
|
1608
|
+
},
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
name: "chrome_debugger_step_into",
|
|
1612
|
+
description: "Step into function call",
|
|
1613
|
+
inputSchema: {
|
|
1614
|
+
type: "object",
|
|
1615
|
+
properties: {
|
|
1616
|
+
tabId: { type: "number" },
|
|
1617
|
+
},
|
|
1618
|
+
},
|
|
1619
|
+
},
|
|
1620
|
+
{
|
|
1621
|
+
name: "chrome_debugger_step_out",
|
|
1622
|
+
description: "Step out of current function",
|
|
1623
|
+
inputSchema: {
|
|
1624
|
+
type: "object",
|
|
1625
|
+
properties: {
|
|
1626
|
+
tabId: { type: "number" },
|
|
1627
|
+
},
|
|
1628
|
+
},
|
|
1629
|
+
},
|
|
1630
|
+
{
|
|
1631
|
+
name: "chrome_get_call_frames",
|
|
1632
|
+
description: "Get call stack when paused",
|
|
1633
|
+
inputSchema: {
|
|
1634
|
+
type: "object",
|
|
1635
|
+
properties: {
|
|
1636
|
+
tabId: { type: "number" },
|
|
1637
|
+
},
|
|
1638
|
+
},
|
|
1639
|
+
},
|
|
1640
|
+
{
|
|
1641
|
+
name: "chrome_evaluate_on_call_frame",
|
|
1642
|
+
description: "Evaluate expression in paused call frame",
|
|
1643
|
+
inputSchema: {
|
|
1644
|
+
type: "object",
|
|
1645
|
+
properties: {
|
|
1646
|
+
callFrameId: { type: "string", description: "Call frame ID" },
|
|
1647
|
+
expression: { type: "string", description: "Expression to evaluate" },
|
|
1648
|
+
tabId: { type: "number" },
|
|
1649
|
+
},
|
|
1650
|
+
required: ["callFrameId", "expression"],
|
|
1651
|
+
},
|
|
1652
|
+
},
|
|
1653
|
+
{
|
|
1654
|
+
name: "chrome_get_script_source",
|
|
1655
|
+
description: "Get source code of a script",
|
|
1656
|
+
inputSchema: {
|
|
1657
|
+
type: "object",
|
|
1658
|
+
properties: {
|
|
1659
|
+
scriptId: { type: "string", description: "Script ID" },
|
|
1660
|
+
tabId: { type: "number" },
|
|
1661
|
+
},
|
|
1662
|
+
required: ["scriptId"],
|
|
1663
|
+
},
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
name: "chrome_live_edit_script",
|
|
1667
|
+
description: "Live edit JavaScript without reload",
|
|
1668
|
+
inputSchema: {
|
|
1669
|
+
type: "object",
|
|
1670
|
+
properties: {
|
|
1671
|
+
scriptId: { type: "string", description: "Script ID to edit" },
|
|
1672
|
+
scriptSource: { type: "string", description: "New script source" },
|
|
1673
|
+
tabId: { type: "number" },
|
|
1674
|
+
},
|
|
1675
|
+
required: ["scriptId", "scriptSource"],
|
|
1676
|
+
},
|
|
1677
|
+
},
|
|
1678
|
+
{
|
|
1679
|
+
name: "chrome_call_function_on",
|
|
1680
|
+
description: "Call function on remote object",
|
|
1681
|
+
inputSchema: {
|
|
1682
|
+
type: "object",
|
|
1683
|
+
properties: {
|
|
1684
|
+
objectId: { type: "string", description: "Remote object ID" },
|
|
1685
|
+
functionDeclaration: { type: "string", description: "Function to call" },
|
|
1686
|
+
arguments: { type: "array", description: "Function arguments" },
|
|
1687
|
+
tabId: { type: "number" },
|
|
1688
|
+
},
|
|
1689
|
+
required: ["objectId", "functionDeclaration"],
|
|
1690
|
+
},
|
|
1691
|
+
},
|
|
1692
|
+
{
|
|
1693
|
+
name: "chrome_get_properties",
|
|
1694
|
+
description: "Get properties of a remote object",
|
|
1695
|
+
inputSchema: {
|
|
1696
|
+
type: "object",
|
|
1697
|
+
properties: {
|
|
1698
|
+
objectId: { type: "string", description: "Remote object ID" },
|
|
1699
|
+
ownProperties: { type: "boolean", description: "Only own properties" },
|
|
1700
|
+
tabId: { type: "number" },
|
|
1701
|
+
},
|
|
1702
|
+
required: ["objectId"],
|
|
1703
|
+
},
|
|
1704
|
+
},
|
|
1705
|
+
{
|
|
1706
|
+
name: "chrome_compile_script",
|
|
1707
|
+
description: "Check JavaScript syntax without executing",
|
|
1708
|
+
inputSchema: {
|
|
1709
|
+
type: "object",
|
|
1710
|
+
properties: {
|
|
1711
|
+
expression: { type: "string", description: "JavaScript code to compile" },
|
|
1712
|
+
sourceURL: { type: "string", description: "Source URL for error reporting" },
|
|
1713
|
+
tabId: { type: "number" },
|
|
1714
|
+
},
|
|
1715
|
+
required: ["expression"],
|
|
1716
|
+
},
|
|
1717
|
+
},
|
|
1718
|
+
{
|
|
1719
|
+
name: "chrome_get_indexeddb",
|
|
1720
|
+
description: "Read IndexedDB data from the page",
|
|
1721
|
+
inputSchema: {
|
|
1722
|
+
type: "object",
|
|
1723
|
+
properties: {
|
|
1724
|
+
databaseName: { type: "string", description: "Database name" },
|
|
1725
|
+
objectStoreName: { type: "string", description: "Object store name" },
|
|
1726
|
+
tabId: { type: "number" },
|
|
1727
|
+
},
|
|
1728
|
+
required: ["databaseName", "objectStoreName"],
|
|
1729
|
+
},
|
|
1730
|
+
},
|
|
1731
|
+
{
|
|
1732
|
+
name: "chrome_get_session_storage",
|
|
1733
|
+
description: "Read sessionStorage from the page",
|
|
1734
|
+
inputSchema: {
|
|
1735
|
+
type: "object",
|
|
1736
|
+
properties: {
|
|
1737
|
+
key: { type: "string", description: "Specific key (omit to get all)" },
|
|
1738
|
+
tabId: { type: "number" },
|
|
1739
|
+
},
|
|
1740
|
+
},
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
name: "chrome_get_cache_storage",
|
|
1744
|
+
description: "Read Service Worker cache storage",
|
|
1745
|
+
inputSchema: {
|
|
1746
|
+
type: "object",
|
|
1747
|
+
properties: {
|
|
1748
|
+
cacheName: { type: "string", description: "Cache name" },
|
|
1749
|
+
tabId: { type: "number" },
|
|
1750
|
+
},
|
|
1751
|
+
required: ["cacheName"],
|
|
1752
|
+
},
|
|
1753
|
+
},
|
|
1754
|
+
{
|
|
1755
|
+
name: "chrome_get_security_state",
|
|
1756
|
+
description: "Get HTTPS security state and certificate info",
|
|
1757
|
+
inputSchema: {
|
|
1758
|
+
type: "object",
|
|
1759
|
+
properties: {
|
|
1760
|
+
tabId: { type: "number" },
|
|
1761
|
+
},
|
|
1762
|
+
},
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
name: "chrome_ignore_cert_errors",
|
|
1766
|
+
description: "Ignore SSL certificate errors",
|
|
1767
|
+
inputSchema: {
|
|
1768
|
+
type: "object",
|
|
1769
|
+
properties: {
|
|
1770
|
+
ignore: { type: "boolean", description: "true to ignore, false to restore" },
|
|
1771
|
+
tabId: { type: "number" },
|
|
1772
|
+
},
|
|
1773
|
+
required: ["ignore"],
|
|
1774
|
+
},
|
|
1775
|
+
},
|
|
1776
|
+
{
|
|
1777
|
+
name: "chrome_set_color_scheme",
|
|
1778
|
+
description: "Force dark or light mode",
|
|
1779
|
+
inputSchema: {
|
|
1780
|
+
type: "object",
|
|
1781
|
+
properties: {
|
|
1782
|
+
scheme: { type: "string", enum: ["light", "dark", "no-preference"], description: "Color scheme" },
|
|
1783
|
+
tabId: { type: "number" },
|
|
1784
|
+
},
|
|
1785
|
+
required: ["scheme"],
|
|
1786
|
+
},
|
|
1787
|
+
},
|
|
1788
|
+
{
|
|
1789
|
+
name: "chrome_highlight_element",
|
|
1790
|
+
description: "Highlight element on screen (for debugging)",
|
|
1791
|
+
inputSchema: {
|
|
1792
|
+
type: "object",
|
|
1793
|
+
properties: {
|
|
1794
|
+
selector: { type: "string", description: "CSS selector" },
|
|
1795
|
+
color: { type: "string", description: "Highlight color (default red)" },
|
|
1475
1796
|
tabId: { type: "number" },
|
|
1476
1797
|
},
|
|
1477
1798
|
required: ["selector"],
|
|
1478
1799
|
},
|
|
1479
1800
|
},
|
|
1480
1801
|
{
|
|
1481
|
-
name: "
|
|
1482
|
-
description: "
|
|
1802
|
+
name: "chrome_hide_element",
|
|
1803
|
+
description: "Hide or show element",
|
|
1804
|
+
inputSchema: {
|
|
1805
|
+
type: "object",
|
|
1806
|
+
properties: {
|
|
1807
|
+
selector: { type: "string", description: "CSS selector" },
|
|
1808
|
+
hide: { type: "boolean", description: "true to hide, false to show" },
|
|
1809
|
+
tabId: { type: "number" },
|
|
1810
|
+
},
|
|
1811
|
+
required: ["selector", "hide"],
|
|
1812
|
+
},
|
|
1813
|
+
},
|
|
1814
|
+
{
|
|
1815
|
+
name: "chrome_dom_set_attribute",
|
|
1816
|
+
description: "Set DOM attribute via CDP",
|
|
1817
|
+
inputSchema: {
|
|
1818
|
+
type: "object",
|
|
1819
|
+
properties: {
|
|
1820
|
+
selector: { type: "string", description: "CSS selector" },
|
|
1821
|
+
name: { type: "string", description: "Attribute name" },
|
|
1822
|
+
value: { type: "string", description: "Attribute value" },
|
|
1823
|
+
tabId: { type: "number" },
|
|
1824
|
+
},
|
|
1825
|
+
required: ["selector", "name", "value"],
|
|
1826
|
+
},
|
|
1827
|
+
},
|
|
1828
|
+
{
|
|
1829
|
+
name: "chrome_dom_remove_node",
|
|
1830
|
+
description: "Remove DOM node",
|
|
1831
|
+
inputSchema: {
|
|
1832
|
+
type: "object",
|
|
1833
|
+
properties: {
|
|
1834
|
+
selector: { type: "string", description: "CSS selector" },
|
|
1835
|
+
tabId: { type: "number" },
|
|
1836
|
+
},
|
|
1837
|
+
required: ["selector"],
|
|
1838
|
+
},
|
|
1839
|
+
},
|
|
1840
|
+
{
|
|
1841
|
+
name: "chrome_stealth_enable",
|
|
1842
|
+
description: "Enable anti-fingerprint stealth spoofs on a tab via MAIN-world injection and CDP. Each flag toggles one vector independently.",
|
|
1843
|
+
inputSchema: {
|
|
1844
|
+
type: "object",
|
|
1845
|
+
properties: {
|
|
1846
|
+
tabId: { type: "number" },
|
|
1847
|
+
webdriver: { type: "boolean" },
|
|
1848
|
+
chromeRuntime: { type: "boolean" },
|
|
1849
|
+
plugins: { type: "boolean" },
|
|
1850
|
+
languages: { type: "boolean", default: true },
|
|
1851
|
+
hardwareConcurrency: { type: "number" },
|
|
1852
|
+
deviceMemory: { type: "number" },
|
|
1853
|
+
vendor: { type: "string" },
|
|
1854
|
+
platform: { type: "string" },
|
|
1855
|
+
canvasNoise: { type: "boolean" },
|
|
1856
|
+
webglVendor: { type: "boolean" },
|
|
1857
|
+
webglRenderer: { type: "string" },
|
|
1858
|
+
webglVendorString: { type: "string" },
|
|
1859
|
+
audioNoise: { type: "boolean" },
|
|
1860
|
+
fontSpoof: { type: "boolean" },
|
|
1861
|
+
codecs: { type: "boolean" },
|
|
1862
|
+
permissions: { type: "boolean" },
|
|
1863
|
+
outerSize: { type: "boolean" },
|
|
1864
|
+
seed: { type: "number" },
|
|
1865
|
+
persist: { type: "boolean", default: true },
|
|
1866
|
+
},
|
|
1867
|
+
},
|
|
1868
|
+
},
|
|
1869
|
+
{
|
|
1870
|
+
name: "chrome_stealth_disable",
|
|
1871
|
+
description: "Disable and remove all stealth spoofs on a tab",
|
|
1872
|
+
inputSchema: {
|
|
1873
|
+
type: "object",
|
|
1874
|
+
properties: {
|
|
1875
|
+
tabId: { type: "number" },
|
|
1876
|
+
},
|
|
1877
|
+
},
|
|
1878
|
+
},
|
|
1879
|
+
{
|
|
1880
|
+
name: "chrome_stealth_status",
|
|
1881
|
+
description: "Get active stealth flags and seed for a tab",
|
|
1882
|
+
inputSchema: {
|
|
1883
|
+
type: "object",
|
|
1884
|
+
properties: {
|
|
1885
|
+
tabId: { type: "number" },
|
|
1886
|
+
},
|
|
1887
|
+
},
|
|
1888
|
+
},
|
|
1889
|
+
{
|
|
1890
|
+
name: "chrome_set_proxy",
|
|
1891
|
+
description: "Set browser proxy",
|
|
1483
1892
|
inputSchema: {
|
|
1484
1893
|
type: "object",
|
|
1485
1894
|
properties: {
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1895
|
+
mode: { type: "string", enum: ["direct", "fixed_servers", "pac_script"] },
|
|
1896
|
+
proxyForHttp: { type: "string" },
|
|
1897
|
+
proxyForHttps: { type: "string" },
|
|
1898
|
+
proxyForFtp: { type: "string" },
|
|
1899
|
+
bypassList: { type: "array", items: { type: "string" } },
|
|
1900
|
+
pacUrl: { type: "string" },
|
|
1901
|
+
pacScript: { type: "string" },
|
|
1489
1902
|
},
|
|
1490
1903
|
},
|
|
1491
1904
|
},
|
|
1492
1905
|
{
|
|
1493
|
-
name: "
|
|
1494
|
-
description: "
|
|
1906
|
+
name: "chrome_clear_proxy",
|
|
1907
|
+
description: "Clear proxy to direct",
|
|
1908
|
+
inputSchema: { type: "object", properties: {} },
|
|
1909
|
+
},
|
|
1910
|
+
{
|
|
1911
|
+
name: "chrome_get_proxy",
|
|
1912
|
+
description: "Get proxy config",
|
|
1913
|
+
inputSchema: { type: "object", properties: {} },
|
|
1914
|
+
},
|
|
1915
|
+
{
|
|
1916
|
+
name: "chrome_set_webrtc_policy",
|
|
1917
|
+
description: "Prevent WebRTC IP leak",
|
|
1495
1918
|
inputSchema: {
|
|
1496
1919
|
type: "object",
|
|
1497
1920
|
properties: {
|
|
1498
|
-
|
|
1499
|
-
displayHeaderFooter: { type: "boolean" },
|
|
1500
|
-
printBackground: { type: "boolean", description: "Print background graphics" },
|
|
1501
|
-
scale: { type: "number", description: "Scale 0.1-2.0 (default 1)" },
|
|
1502
|
-
paperWidth: { type: "number", description: "Paper width in inches" },
|
|
1503
|
-
paperHeight: { type: "number", description: "Paper height in inches" },
|
|
1504
|
-
marginTop: { type: "number", description: "Top margin in inches" },
|
|
1505
|
-
marginBottom: { type: "number", description: "Bottom margin in inches" },
|
|
1506
|
-
marginLeft: { type: "number", description: "Left margin in inches" },
|
|
1507
|
-
marginRight: { type: "number", description: "Right margin in inches" },
|
|
1508
|
-
tabId: { type: "number" },
|
|
1921
|
+
policy: { type: "string", enum: ["default", "disable_non_proxied_udp", "proxy_only"], description: "WebRTC policy" },
|
|
1509
1922
|
},
|
|
1923
|
+
required: ["policy"],
|
|
1510
1924
|
},
|
|
1511
1925
|
},
|
|
1512
1926
|
{
|
|
1513
|
-
name: "
|
|
1514
|
-
description: "
|
|
1927
|
+
name: "chrome_get_webrtc_policy",
|
|
1928
|
+
description: "Get WebRTC policy",
|
|
1929
|
+
inputSchema: { type: "object", properties: {} },
|
|
1930
|
+
},
|
|
1931
|
+
{
|
|
1932
|
+
name: "chrome_handle_dialog",
|
|
1933
|
+
description: "Handle JavaScript dialog (alert, confirm, prompt)",
|
|
1515
1934
|
inputSchema: {
|
|
1516
1935
|
type: "object",
|
|
1517
1936
|
properties: {
|
|
1518
|
-
|
|
1937
|
+
action: { type: "string", enum: ["accept", "dismiss"] },
|
|
1938
|
+
promptText: { type: "string" },
|
|
1519
1939
|
tabId: { type: "number" },
|
|
1520
1940
|
},
|
|
1521
|
-
required: ["
|
|
1941
|
+
required: ["action"],
|
|
1522
1942
|
},
|
|
1523
1943
|
},
|
|
1524
1944
|
{
|
|
1525
|
-
name: "
|
|
1526
|
-
description: "
|
|
1945
|
+
name: "chrome_fill_form",
|
|
1946
|
+
description: "Fill multiple form fields in one call",
|
|
1527
1947
|
inputSchema: {
|
|
1528
1948
|
type: "object",
|
|
1529
1949
|
properties: {
|
|
1530
|
-
|
|
1950
|
+
fields: { type: "array", items: { type: "object", properties: { selector: { type: "string" }, value: { type: "string" } } } },
|
|
1951
|
+
submitSelector: { type: "string" },
|
|
1531
1952
|
tabId: { type: "number" },
|
|
1532
1953
|
},
|
|
1533
|
-
required: ["
|
|
1954
|
+
required: ["fields"],
|
|
1534
1955
|
},
|
|
1535
1956
|
},
|
|
1536
1957
|
{
|
|
1537
|
-
name: "
|
|
1538
|
-
description: "
|
|
1958
|
+
name: "chrome_check",
|
|
1959
|
+
description: "Check a checkbox",
|
|
1539
1960
|
inputSchema: {
|
|
1540
1961
|
type: "object",
|
|
1541
1962
|
properties: {
|
|
1542
|
-
selector: { type: "string"
|
|
1543
|
-
startOffset: { type: "number", description: "Start character offset" },
|
|
1544
|
-
endOffset: { type: "number", description: "End character offset" },
|
|
1963
|
+
selector: { type: "string" },
|
|
1545
1964
|
tabId: { type: "number" },
|
|
1546
1965
|
},
|
|
1547
1966
|
required: ["selector"],
|
|
1548
1967
|
},
|
|
1549
1968
|
},
|
|
1550
1969
|
{
|
|
1551
|
-
name: "
|
|
1552
|
-
description: "
|
|
1970
|
+
name: "chrome_uncheck",
|
|
1971
|
+
description: "Uncheck a checkbox",
|
|
1553
1972
|
inputSchema: {
|
|
1554
1973
|
type: "object",
|
|
1555
1974
|
properties: {
|
|
1975
|
+
selector: { type: "string" },
|
|
1556
1976
|
tabId: { type: "number" },
|
|
1557
1977
|
},
|
|
1978
|
+
required: ["selector"],
|
|
1558
1979
|
},
|
|
1559
1980
|
},
|
|
1560
1981
|
{
|
|
1561
|
-
name: "
|
|
1562
|
-
description: "
|
|
1982
|
+
name: "chrome_wait_for_text",
|
|
1983
|
+
description: "Wait for text to appear on page",
|
|
1563
1984
|
inputSchema: {
|
|
1564
1985
|
type: "object",
|
|
1565
1986
|
properties: {
|
|
1566
|
-
|
|
1987
|
+
query: { type: "string" },
|
|
1988
|
+
timeout: { type: "number", default: 5000 },
|
|
1989
|
+
exact: { type: "boolean" },
|
|
1567
1990
|
tabId: { type: "number" },
|
|
1568
1991
|
},
|
|
1569
|
-
required: ["
|
|
1992
|
+
required: ["query"],
|
|
1570
1993
|
},
|
|
1571
1994
|
},
|
|
1572
1995
|
{
|
|
1573
|
-
name: "
|
|
1574
|
-
description: "
|
|
1996
|
+
name: "chrome_verify_element_visible",
|
|
1997
|
+
description: "Verify element is visible",
|
|
1575
1998
|
inputSchema: {
|
|
1576
1999
|
type: "object",
|
|
1577
2000
|
properties: {
|
|
1578
|
-
selector: { type: "string"
|
|
2001
|
+
selector: { type: "string" },
|
|
1579
2002
|
tabId: { type: "number" },
|
|
1580
2003
|
},
|
|
1581
2004
|
required: ["selector"],
|
|
1582
2005
|
},
|
|
1583
2006
|
},
|
|
1584
2007
|
{
|
|
1585
|
-
name: "
|
|
1586
|
-
description: "
|
|
2008
|
+
name: "chrome_verify_text_visible",
|
|
2009
|
+
description: "Verify text is visible on page",
|
|
1587
2010
|
inputSchema: {
|
|
1588
2011
|
type: "object",
|
|
1589
2012
|
properties: {
|
|
1590
|
-
|
|
1591
|
-
longitude: { type: "number", description: "Longitude coordinate" },
|
|
1592
|
-
accuracy: { type: "number", description: "Accuracy in meters (default 100)" },
|
|
2013
|
+
query: { type: "string" },
|
|
1593
2014
|
tabId: { type: "number" },
|
|
1594
2015
|
},
|
|
1595
|
-
required: ["
|
|
2016
|
+
required: ["query"],
|
|
1596
2017
|
},
|
|
1597
2018
|
},
|
|
1598
2019
|
{
|
|
1599
|
-
name: "
|
|
1600
|
-
description: "
|
|
2020
|
+
name: "chrome_verify_value",
|
|
2021
|
+
description: "Verify input value matches expected",
|
|
1601
2022
|
inputSchema: {
|
|
1602
2023
|
type: "object",
|
|
1603
2024
|
properties: {
|
|
1604
|
-
|
|
2025
|
+
selector: { type: "string" },
|
|
2026
|
+
expected: { type: "string" },
|
|
1605
2027
|
tabId: { type: "number" },
|
|
1606
2028
|
},
|
|
1607
|
-
required: ["
|
|
2029
|
+
required: ["selector", "expected"],
|
|
1608
2030
|
},
|
|
1609
2031
|
},
|
|
1610
2032
|
{
|
|
1611
|
-
name: "
|
|
1612
|
-
description: "
|
|
2033
|
+
name: "chrome_generate_locator",
|
|
2034
|
+
description: "Generate Playwright locator string for element",
|
|
1613
2035
|
inputSchema: {
|
|
1614
2036
|
type: "object",
|
|
1615
2037
|
properties: {
|
|
1616
|
-
|
|
2038
|
+
selector: { type: "string" },
|
|
1617
2039
|
tabId: { type: "number" },
|
|
1618
2040
|
},
|
|
1619
|
-
required: ["
|
|
2041
|
+
required: ["selector"],
|
|
1620
2042
|
},
|
|
1621
2043
|
},
|
|
1622
2044
|
{
|
|
1623
|
-
name: "
|
|
1624
|
-
description: "
|
|
2045
|
+
name: "chrome_lighthouse_audit",
|
|
2046
|
+
description: "Heuristic audit, not full Google Lighthouse. Returns accessibility, SEO, best-practices scores.",
|
|
1625
2047
|
inputSchema: {
|
|
1626
2048
|
type: "object",
|
|
1627
2049
|
properties: {
|
|
1628
|
-
charging: { type: "boolean", description: "Is battery charging" },
|
|
1629
|
-
chargingTime: { type: "number", description: "Seconds until fully charged" },
|
|
1630
|
-
dischargingTime: { type: "number", description: "Seconds until empty" },
|
|
1631
|
-
level: { type: "number", description: "Battery level 0.0-1.0" },
|
|
1632
2050
|
tabId: { type: "number" },
|
|
2051
|
+
device: { type: "string", enum: ["desktop", "mobile"], default: "desktop" },
|
|
2052
|
+
categories: { type: "array", items: { type: "string" }, default: ["accessibility", "seo", "best-practices"] },
|
|
1633
2053
|
},
|
|
1634
|
-
required: ["charging", "level"],
|
|
1635
2054
|
},
|
|
1636
2055
|
},
|
|
1637
2056
|
{
|
|
1638
|
-
name: "
|
|
1639
|
-
description: "
|
|
2057
|
+
name: "chrome_performance_insight",
|
|
2058
|
+
description: "Get performance insights including Core Web Vitals estimates",
|
|
1640
2059
|
inputSchema: {
|
|
1641
2060
|
type: "object",
|
|
1642
2061
|
properties: {
|
|
1643
|
-
mediaType: { type: "string", enum: ["screen", "print"], description: "Media type" },
|
|
1644
2062
|
tabId: { type: "number" },
|
|
1645
2063
|
},
|
|
1646
|
-
required: ["mediaType"],
|
|
1647
2064
|
},
|
|
1648
2065
|
},
|
|
1649
2066
|
{
|
|
1650
|
-
name: "
|
|
1651
|
-
description: "
|
|
2067
|
+
name: "chrome_screencast_start",
|
|
2068
|
+
description: "Start screencast recording",
|
|
1652
2069
|
inputSchema: {
|
|
1653
2070
|
type: "object",
|
|
1654
2071
|
properties: {
|
|
1655
|
-
type: {
|
|
1656
|
-
type: "string",
|
|
1657
|
-
enum: ["none", "achromatopsia", "blurredVision", "deuteranopia", "protanopia", "tritanopia"],
|
|
1658
|
-
description: "Vision deficiency type"
|
|
1659
|
-
},
|
|
1660
2072
|
tabId: { type: "number" },
|
|
2073
|
+
quality: { type: "number", default: 80 },
|
|
2074
|
+
maxFrames: { type: "number", default: 60 },
|
|
1661
2075
|
},
|
|
1662
|
-
required: ["type"],
|
|
1663
2076
|
},
|
|
1664
2077
|
},
|
|
1665
2078
|
{
|
|
1666
|
-
name: "
|
|
1667
|
-
description: "
|
|
2079
|
+
name: "chrome_screencast_stop",
|
|
2080
|
+
description: "Stop screencast recording",
|
|
1668
2081
|
inputSchema: {
|
|
1669
2082
|
type: "object",
|
|
1670
2083
|
properties: {
|
|
1671
|
-
rate: { type: "number", description: "Throttle rate (1 = no throttle, 4 = 4x slowdown)" },
|
|
1672
2084
|
tabId: { type: "number" },
|
|
1673
2085
|
},
|
|
1674
|
-
required: ["rate"],
|
|
1675
2086
|
},
|
|
1676
2087
|
},
|
|
1677
2088
|
{
|
|
1678
|
-
name: "
|
|
1679
|
-
description: "
|
|
2089
|
+
name: "chrome_resize_page",
|
|
2090
|
+
description: "Resize page viewport",
|
|
1680
2091
|
inputSchema: {
|
|
1681
2092
|
type: "object",
|
|
1682
2093
|
properties: {
|
|
1683
|
-
|
|
1684
|
-
|
|
2094
|
+
width: { type: "number" },
|
|
2095
|
+
height: { type: "number" },
|
|
1685
2096
|
tabId: { type: "number" },
|
|
1686
2097
|
},
|
|
1687
|
-
required: ["
|
|
2098
|
+
required: ["width", "height"],
|
|
1688
2099
|
},
|
|
1689
2100
|
},
|
|
1690
2101
|
{
|
|
1691
|
-
name: "
|
|
1692
|
-
description: "
|
|
2102
|
+
name: "chrome_emulate",
|
|
2103
|
+
description: "Unified device emulation",
|
|
1693
2104
|
inputSchema: {
|
|
1694
2105
|
type: "object",
|
|
1695
2106
|
properties: {
|
|
1696
|
-
|
|
1697
|
-
|
|
2107
|
+
viewportWidth: { type: "number" },
|
|
2108
|
+
viewportHeight: { type: "number" },
|
|
2109
|
+
deviceScaleFactor: { type: "number" },
|
|
2110
|
+
mobile: { type: "boolean" },
|
|
2111
|
+
userAgent: { type: "string" },
|
|
2112
|
+
locale: { type: "string" },
|
|
2113
|
+
timezone: { type: "string" },
|
|
2114
|
+
colorScheme: { type: "string", enum: ["light", "dark"] },
|
|
1698
2115
|
tabId: { type: "number" },
|
|
1699
2116
|
},
|
|
1700
|
-
required: ["urlPattern", "newBody"],
|
|
1701
2117
|
},
|
|
1702
2118
|
},
|
|
1703
2119
|
{
|
|
1704
|
-
name: "
|
|
1705
|
-
description: "
|
|
2120
|
+
name: "chrome_mouse_move",
|
|
2121
|
+
description: "Move mouse to coordinates",
|
|
1706
2122
|
inputSchema: {
|
|
1707
2123
|
type: "object",
|
|
1708
2124
|
properties: {
|
|
1709
|
-
|
|
2125
|
+
x: { type: "number" },
|
|
2126
|
+
y: { type: "number" },
|
|
1710
2127
|
tabId: { type: "number" },
|
|
1711
2128
|
},
|
|
2129
|
+
required: ["x", "y"],
|
|
1712
2130
|
},
|
|
1713
2131
|
},
|
|
1714
2132
|
{
|
|
1715
|
-
name: "
|
|
1716
|
-
description: "
|
|
2133
|
+
name: "chrome_mouse_down",
|
|
2134
|
+
description: "Press mouse button",
|
|
1717
2135
|
inputSchema: {
|
|
1718
2136
|
type: "object",
|
|
1719
2137
|
properties: {
|
|
1720
|
-
|
|
2138
|
+
button: { type: "string", enum: ["left", "right", "middle"], default: "left" },
|
|
1721
2139
|
tabId: { type: "number" },
|
|
1722
2140
|
},
|
|
1723
|
-
required: ["headers"],
|
|
1724
2141
|
},
|
|
1725
2142
|
},
|
|
1726
2143
|
{
|
|
1727
|
-
name: "
|
|
1728
|
-
description: "
|
|
2144
|
+
name: "chrome_mouse_up",
|
|
2145
|
+
description: "Release mouse button",
|
|
1729
2146
|
inputSchema: {
|
|
1730
2147
|
type: "object",
|
|
1731
2148
|
properties: {
|
|
1732
|
-
|
|
2149
|
+
button: { type: "string", enum: ["left", "right", "middle"], default: "left" },
|
|
1733
2150
|
tabId: { type: "number" },
|
|
1734
2151
|
},
|
|
1735
|
-
required: ["requestId"],
|
|
1736
2152
|
},
|
|
1737
2153
|
},
|
|
1738
2154
|
{
|
|
1739
|
-
name: "
|
|
1740
|
-
description: "
|
|
2155
|
+
name: "chrome_mouse_wheel",
|
|
2156
|
+
description: "Scroll mouse wheel",
|
|
1741
2157
|
inputSchema: {
|
|
1742
2158
|
type: "object",
|
|
1743
2159
|
properties: {
|
|
2160
|
+
deltaX: { type: "number" },
|
|
2161
|
+
deltaY: { type: "number" },
|
|
1744
2162
|
tabId: { type: "number" },
|
|
1745
2163
|
},
|
|
1746
2164
|
},
|
|
1747
2165
|
},
|
|
1748
2166
|
{
|
|
1749
|
-
name: "
|
|
1750
|
-
description: "
|
|
2167
|
+
name: "chrome_click_at",
|
|
2168
|
+
description: "Click at coordinates",
|
|
1751
2169
|
inputSchema: {
|
|
1752
2170
|
type: "object",
|
|
1753
2171
|
properties: {
|
|
2172
|
+
x: { type: "number" },
|
|
2173
|
+
y: { type: "number" },
|
|
1754
2174
|
tabId: { type: "number" },
|
|
1755
2175
|
},
|
|
2176
|
+
required: ["x", "y"],
|
|
1756
2177
|
},
|
|
1757
2178
|
},
|
|
1758
2179
|
{
|
|
1759
|
-
name: "
|
|
1760
|
-
description: "
|
|
2180
|
+
name: "chrome_heap_summary",
|
|
2181
|
+
description: "Get heap summary",
|
|
1761
2182
|
inputSchema: {
|
|
1762
2183
|
type: "object",
|
|
1763
2184
|
properties: {
|
|
@@ -1766,81 +2187,89 @@ const TOOLS = [
|
|
|
1766
2187
|
},
|
|
1767
2188
|
},
|
|
1768
2189
|
{
|
|
1769
|
-
name: "
|
|
1770
|
-
description: "
|
|
2190
|
+
name: "chrome_heap_query_objects",
|
|
2191
|
+
description: "Query heap objects by class name",
|
|
1771
2192
|
inputSchema: {
|
|
1772
2193
|
type: "object",
|
|
1773
2194
|
properties: {
|
|
1774
|
-
|
|
2195
|
+
className: { type: "string" },
|
|
1775
2196
|
tabId: { type: "number" },
|
|
1776
2197
|
},
|
|
2198
|
+
required: ["className"],
|
|
1777
2199
|
},
|
|
1778
2200
|
},
|
|
1779
2201
|
{
|
|
1780
|
-
name: "
|
|
1781
|
-
description: "
|
|
2202
|
+
name: "chrome_cookie_clear",
|
|
2203
|
+
description: "Clear all cookies for URL",
|
|
1782
2204
|
inputSchema: {
|
|
1783
2205
|
type: "object",
|
|
1784
2206
|
properties: {
|
|
1785
|
-
|
|
2207
|
+
url: { type: "string" },
|
|
1786
2208
|
},
|
|
2209
|
+
required: ["url"],
|
|
1787
2210
|
},
|
|
1788
2211
|
},
|
|
1789
2212
|
{
|
|
1790
|
-
name: "
|
|
1791
|
-
description: "
|
|
2213
|
+
name: "chrome_localstorage_list",
|
|
2214
|
+
description: "List localStorage keys",
|
|
1792
2215
|
inputSchema: {
|
|
1793
2216
|
type: "object",
|
|
1794
2217
|
properties: {
|
|
1795
|
-
state: { type: "string", enum: ["none", "uncaught", "all"], description: "When to pause" },
|
|
1796
2218
|
tabId: { type: "number" },
|
|
1797
2219
|
},
|
|
1798
|
-
required: ["state"],
|
|
1799
2220
|
},
|
|
1800
2221
|
},
|
|
1801
2222
|
{
|
|
1802
|
-
name: "
|
|
1803
|
-
description: "
|
|
2223
|
+
name: "chrome_localstorage_delete",
|
|
2224
|
+
description: "Delete localStorage key",
|
|
1804
2225
|
inputSchema: {
|
|
1805
2226
|
type: "object",
|
|
1806
2227
|
properties: {
|
|
2228
|
+
key: { type: "string" },
|
|
1807
2229
|
tabId: { type: "number" },
|
|
1808
2230
|
},
|
|
2231
|
+
required: ["key"],
|
|
1809
2232
|
},
|
|
1810
2233
|
},
|
|
1811
2234
|
{
|
|
1812
|
-
name: "
|
|
1813
|
-
description: "
|
|
2235
|
+
name: "chrome_sessionstorage_set",
|
|
2236
|
+
description: "Set sessionStorage value",
|
|
1814
2237
|
inputSchema: {
|
|
1815
2238
|
type: "object",
|
|
1816
2239
|
properties: {
|
|
2240
|
+
key: { type: "string" },
|
|
2241
|
+
value: { type: "string" },
|
|
1817
2242
|
tabId: { type: "number" },
|
|
1818
2243
|
},
|
|
2244
|
+
required: ["key", "value"],
|
|
1819
2245
|
},
|
|
1820
2246
|
},
|
|
1821
2247
|
{
|
|
1822
|
-
name: "
|
|
1823
|
-
description: "
|
|
2248
|
+
name: "chrome_sessionstorage_get",
|
|
2249
|
+
description: "Get sessionStorage value",
|
|
1824
2250
|
inputSchema: {
|
|
1825
2251
|
type: "object",
|
|
1826
2252
|
properties: {
|
|
2253
|
+
key: { type: "string" },
|
|
1827
2254
|
tabId: { type: "number" },
|
|
1828
2255
|
},
|
|
1829
2256
|
},
|
|
1830
2257
|
},
|
|
1831
2258
|
{
|
|
1832
|
-
name: "
|
|
1833
|
-
description: "
|
|
2259
|
+
name: "chrome_sessionstorage_delete",
|
|
2260
|
+
description: "Delete sessionStorage key",
|
|
1834
2261
|
inputSchema: {
|
|
1835
2262
|
type: "object",
|
|
1836
2263
|
properties: {
|
|
2264
|
+
key: { type: "string" },
|
|
1837
2265
|
tabId: { type: "number" },
|
|
1838
2266
|
},
|
|
2267
|
+
required: ["key"],
|
|
1839
2268
|
},
|
|
1840
2269
|
},
|
|
1841
2270
|
{
|
|
1842
|
-
name: "
|
|
1843
|
-
description: "
|
|
2271
|
+
name: "chrome_sessionstorage_clear",
|
|
2272
|
+
description: "Clear sessionStorage",
|
|
1844
2273
|
inputSchema: {
|
|
1845
2274
|
type: "object",
|
|
1846
2275
|
properties: {
|
|
@@ -1849,203 +2278,200 @@ const TOOLS = [
|
|
|
1849
2278
|
},
|
|
1850
2279
|
},
|
|
1851
2280
|
{
|
|
1852
|
-
name: "
|
|
1853
|
-
description: "
|
|
2281
|
+
name: "chrome_route_list",
|
|
2282
|
+
description: "List mock routes",
|
|
1854
2283
|
inputSchema: {
|
|
1855
2284
|
type: "object",
|
|
1856
2285
|
properties: {
|
|
1857
|
-
callFrameId: { type: "string", description: "Call frame ID" },
|
|
1858
|
-
expression: { type: "string", description: "Expression to evaluate" },
|
|
1859
2286
|
tabId: { type: "number" },
|
|
1860
2287
|
},
|
|
1861
|
-
required: ["callFrameId", "expression"],
|
|
1862
2288
|
},
|
|
1863
2289
|
},
|
|
1864
2290
|
{
|
|
1865
|
-
name: "
|
|
1866
|
-
description: "
|
|
2291
|
+
name: "chrome_unroute",
|
|
2292
|
+
description: "Remove mock route",
|
|
1867
2293
|
inputSchema: {
|
|
1868
2294
|
type: "object",
|
|
1869
2295
|
properties: {
|
|
1870
|
-
|
|
2296
|
+
urlPattern: { type: "string" },
|
|
1871
2297
|
tabId: { type: "number" },
|
|
1872
2298
|
},
|
|
1873
|
-
required: ["
|
|
2299
|
+
required: ["urlPattern"],
|
|
1874
2300
|
},
|
|
1875
2301
|
},
|
|
1876
2302
|
{
|
|
1877
|
-
name: "
|
|
1878
|
-
description: "
|
|
2303
|
+
name: "chrome_network_state_set",
|
|
2304
|
+
description: "Set network offline/online state",
|
|
1879
2305
|
inputSchema: {
|
|
1880
2306
|
type: "object",
|
|
1881
2307
|
properties: {
|
|
1882
|
-
|
|
1883
|
-
scriptSource: { type: "string", description: "New script source" },
|
|
2308
|
+
offline: { type: "boolean" },
|
|
1884
2309
|
tabId: { type: "number" },
|
|
1885
2310
|
},
|
|
1886
|
-
required: ["
|
|
2311
|
+
required: ["offline"],
|
|
1887
2312
|
},
|
|
1888
2313
|
},
|
|
1889
2314
|
{
|
|
1890
|
-
name: "
|
|
1891
|
-
description: "
|
|
2315
|
+
name: "chrome_get_network_request",
|
|
2316
|
+
description: "Get network request by ID",
|
|
1892
2317
|
inputSchema: {
|
|
1893
2318
|
type: "object",
|
|
1894
2319
|
properties: {
|
|
1895
|
-
|
|
1896
|
-
functionDeclaration: { type: "string", description: "Function to call" },
|
|
1897
|
-
arguments: { type: "array", description: "Function arguments" },
|
|
2320
|
+
requestId: { type: "string" },
|
|
1898
2321
|
tabId: { type: "number" },
|
|
1899
2322
|
},
|
|
1900
|
-
required: ["
|
|
2323
|
+
required: ["requestId"],
|
|
1901
2324
|
},
|
|
1902
2325
|
},
|
|
1903
2326
|
{
|
|
1904
|
-
name: "
|
|
1905
|
-
description: "
|
|
2327
|
+
name: "chrome_indexeddb_list",
|
|
2328
|
+
description: "List IndexedDB databases",
|
|
1906
2329
|
inputSchema: {
|
|
1907
2330
|
type: "object",
|
|
1908
2331
|
properties: {
|
|
1909
|
-
objectId: { type: "string", description: "Remote object ID" },
|
|
1910
|
-
ownProperties: { type: "boolean", description: "Only own properties" },
|
|
1911
2332
|
tabId: { type: "number" },
|
|
1912
2333
|
},
|
|
1913
|
-
required: ["objectId"],
|
|
1914
2334
|
},
|
|
1915
2335
|
},
|
|
1916
2336
|
{
|
|
1917
|
-
name: "
|
|
1918
|
-
description: "
|
|
2337
|
+
name: "chrome_indexeddb_clear",
|
|
2338
|
+
description: "Clear IndexedDB object store",
|
|
1919
2339
|
inputSchema: {
|
|
1920
2340
|
type: "object",
|
|
1921
2341
|
properties: {
|
|
1922
|
-
|
|
1923
|
-
|
|
2342
|
+
databaseName: { type: "string" },
|
|
2343
|
+
objectStoreName: { type: "string" },
|
|
1924
2344
|
tabId: { type: "number" },
|
|
1925
2345
|
},
|
|
1926
|
-
required: ["
|
|
2346
|
+
required: ["databaseName", "objectStoreName"],
|
|
1927
2347
|
},
|
|
1928
2348
|
},
|
|
1929
2349
|
{
|
|
1930
|
-
name: "
|
|
1931
|
-
description: "
|
|
2350
|
+
name: "chrome_list_extensions",
|
|
2351
|
+
description: "List installed extensions",
|
|
2352
|
+
inputSchema: { type: "object", properties: {} },
|
|
2353
|
+
},
|
|
2354
|
+
{
|
|
2355
|
+
name: "chrome_enable_extension",
|
|
2356
|
+
description: "Enable extension",
|
|
1932
2357
|
inputSchema: {
|
|
1933
2358
|
type: "object",
|
|
1934
2359
|
properties: {
|
|
1935
|
-
|
|
1936
|
-
objectStoreName: { type: "string", description: "Object store name" },
|
|
1937
|
-
tabId: { type: "number" },
|
|
2360
|
+
id: { type: "string" },
|
|
1938
2361
|
},
|
|
1939
|
-
required: ["
|
|
2362
|
+
required: ["id"],
|
|
1940
2363
|
},
|
|
1941
2364
|
},
|
|
1942
2365
|
{
|
|
1943
|
-
name: "
|
|
1944
|
-
description: "
|
|
2366
|
+
name: "chrome_disable_extension",
|
|
2367
|
+
description: "Disable extension",
|
|
1945
2368
|
inputSchema: {
|
|
1946
2369
|
type: "object",
|
|
1947
2370
|
properties: {
|
|
1948
|
-
|
|
1949
|
-
tabId: { type: "number" },
|
|
2371
|
+
id: { type: "string" },
|
|
1950
2372
|
},
|
|
2373
|
+
required: ["id"],
|
|
1951
2374
|
},
|
|
1952
2375
|
},
|
|
1953
2376
|
{
|
|
1954
|
-
name: "
|
|
1955
|
-
description: "
|
|
2377
|
+
name: "chrome_reload_extension",
|
|
2378
|
+
description: "Reload extension",
|
|
1956
2379
|
inputSchema: {
|
|
1957
2380
|
type: "object",
|
|
1958
2381
|
properties: {
|
|
1959
|
-
|
|
1960
|
-
tabId: { type: "number" },
|
|
2382
|
+
id: { type: "string" },
|
|
1961
2383
|
},
|
|
1962
|
-
required: ["
|
|
2384
|
+
required: ["id"],
|
|
1963
2385
|
},
|
|
1964
2386
|
},
|
|
1965
2387
|
{
|
|
1966
|
-
name: "
|
|
1967
|
-
description: "
|
|
2388
|
+
name: "chrome_trigger_extension_action",
|
|
2389
|
+
description: "Trigger extension action",
|
|
1968
2390
|
inputSchema: {
|
|
1969
2391
|
type: "object",
|
|
1970
2392
|
properties: {
|
|
1971
|
-
|
|
2393
|
+
id: { type: "string" },
|
|
1972
2394
|
},
|
|
2395
|
+
required: ["id"],
|
|
1973
2396
|
},
|
|
1974
2397
|
},
|
|
1975
2398
|
{
|
|
1976
|
-
name: "
|
|
1977
|
-
description: "
|
|
2399
|
+
name: "chrome_pwa_check",
|
|
2400
|
+
description: "Check PWA installability",
|
|
1978
2401
|
inputSchema: {
|
|
1979
2402
|
type: "object",
|
|
1980
2403
|
properties: {
|
|
1981
|
-
ignore: { type: "boolean", description: "true to ignore, false to restore" },
|
|
1982
2404
|
tabId: { type: "number" },
|
|
1983
2405
|
},
|
|
1984
|
-
required: ["ignore"],
|
|
1985
2406
|
},
|
|
1986
2407
|
},
|
|
1987
2408
|
{
|
|
1988
|
-
name: "
|
|
1989
|
-
description: "
|
|
2409
|
+
name: "chrome_list_webmcp_tools",
|
|
2410
|
+
description: "List WebMCP tools on page",
|
|
1990
2411
|
inputSchema: {
|
|
1991
2412
|
type: "object",
|
|
1992
2413
|
properties: {
|
|
1993
|
-
scheme: { type: "string", enum: ["light", "dark", "no-preference"], description: "Color scheme" },
|
|
1994
2414
|
tabId: { type: "number" },
|
|
1995
2415
|
},
|
|
1996
|
-
required: ["scheme"],
|
|
1997
2416
|
},
|
|
1998
2417
|
},
|
|
1999
2418
|
{
|
|
2000
|
-
name: "
|
|
2001
|
-
description: "
|
|
2419
|
+
name: "chrome_execute_webmcp_tool",
|
|
2420
|
+
description: "Execute WebMCP tool",
|
|
2002
2421
|
inputSchema: {
|
|
2003
2422
|
type: "object",
|
|
2004
2423
|
properties: {
|
|
2005
|
-
|
|
2006
|
-
|
|
2424
|
+
toolName: { type: "string" },
|
|
2425
|
+
params: { type: "object" },
|
|
2007
2426
|
tabId: { type: "number" },
|
|
2008
2427
|
},
|
|
2009
|
-
required: ["
|
|
2428
|
+
required: ["toolName"],
|
|
2010
2429
|
},
|
|
2011
2430
|
},
|
|
2012
2431
|
{
|
|
2013
|
-
name: "
|
|
2014
|
-
description: "
|
|
2432
|
+
name: "chrome_screenshot_element",
|
|
2433
|
+
description: "Take screenshot of specific element. Returns base64 image.",
|
|
2015
2434
|
inputSchema: {
|
|
2016
2435
|
type: "object",
|
|
2017
2436
|
properties: {
|
|
2018
|
-
selector: { type: "string"
|
|
2019
|
-
|
|
2437
|
+
selector: { type: "string" },
|
|
2438
|
+
format: { type: "string", enum: ["png", "jpeg"] },
|
|
2439
|
+
quality: { type: "number" },
|
|
2020
2440
|
tabId: { type: "number" },
|
|
2021
2441
|
},
|
|
2022
|
-
required: ["selector"
|
|
2442
|
+
required: ["selector"],
|
|
2023
2443
|
},
|
|
2024
2444
|
},
|
|
2025
2445
|
{
|
|
2026
|
-
name: "
|
|
2027
|
-
description: "
|
|
2446
|
+
name: "chrome_screenshot_fullpage",
|
|
2447
|
+
description: "Take full page screenshot. Returns base64 image.",
|
|
2028
2448
|
inputSchema: {
|
|
2029
2449
|
type: "object",
|
|
2030
2450
|
properties: {
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
value: { type: "string", description: "Attribute value" },
|
|
2451
|
+
format: { type: "string", enum: ["png", "jpeg"] },
|
|
2452
|
+
quality: { type: "number" },
|
|
2034
2453
|
tabId: { type: "number" },
|
|
2035
2454
|
},
|
|
2036
|
-
required: ["selector", "name", "value"],
|
|
2037
2455
|
},
|
|
2038
2456
|
},
|
|
2039
2457
|
{
|
|
2040
|
-
name: "
|
|
2041
|
-
description: "
|
|
2458
|
+
name: "chrome_pdf_print",
|
|
2459
|
+
description: "Print page to PDF. Returns base64 PDF.",
|
|
2042
2460
|
inputSchema: {
|
|
2043
2461
|
type: "object",
|
|
2044
2462
|
properties: {
|
|
2045
|
-
|
|
2463
|
+
landscape: { type: "boolean" },
|
|
2464
|
+
displayHeaderFooter: { type: "boolean" },
|
|
2465
|
+
printBackground: { type: "boolean" },
|
|
2466
|
+
scale: { type: "number" },
|
|
2467
|
+
paperWidth: { type: "number" },
|
|
2468
|
+
paperHeight: { type: "number" },
|
|
2469
|
+
marginTop: { type: "number" },
|
|
2470
|
+
marginBottom: { type: "number" },
|
|
2471
|
+
marginLeft: { type: "number" },
|
|
2472
|
+
marginRight: { type: "number" },
|
|
2046
2473
|
tabId: { type: "number" },
|
|
2047
2474
|
},
|
|
2048
|
-
required: ["selector"],
|
|
2049
2475
|
},
|
|
2050
2476
|
}
|
|
2051
2477
|
];
|
|
@@ -2113,6 +2539,59 @@ const TOOL_GRAPH = {
|
|
|
2113
2539
|
chrome_get_cookies: { description: "Get cookies for URL", intent: ["get cookies", "cookie value"], cost: "low" },
|
|
2114
2540
|
chrome_get_local_storage: { description: "Read localStorage", intent: ["localstorage", "local storage value"], cost: "low" },
|
|
2115
2541
|
chrome_get_history: { description: "Search browser history", intent: ["browser history", "visited sites"], cost: "low" },
|
|
2542
|
+
chrome_stealth_enable: { description: "Anti-fingerprint spoofs with per-vector toggles", intent: ["stealth", "hide webdriver", "spoof canvas", "spoof webgl", "anti bot", "fingerprint", "hide automation"], cost: "medium", requires: ["chrome_debug_attach"], next: ["chrome_stealth_status", "chrome_navigate"] },
|
|
2543
|
+
chrome_stealth_disable: { description: "Remove stealth spoofs", intent: ["disable stealth", "remove spoof"], cost: "low" },
|
|
2544
|
+
chrome_stealth_status: { description: "Active stealth flags", intent: ["stealth status", "stealth config"], cost: "low" },
|
|
2545
|
+
chrome_set_proxy: { description: "Set browser proxy", intent: ["set proxy", "proxy server", "socks5", "http proxy", "rotate ip"], cost: "medium", next: ["chrome_get_proxy"] },
|
|
2546
|
+
chrome_clear_proxy: { description: "Clear proxy to direct", intent: ["clear proxy", "disable proxy", "direct connection"], cost: "low" },
|
|
2547
|
+
chrome_get_proxy: { description: "Get proxy config", intent: ["proxy status", "proxy config"], cost: "low" },
|
|
2548
|
+
chrome_set_webrtc_policy: { description: "Prevent WebRTC IP leak", intent: ["webrtc leak", "hide ip", "webrtc policy"], cost: "low", requires: ["chrome_set_proxy"] },
|
|
2549
|
+
chrome_handle_dialog: { description: "Handle JavaScript dialog", intent: ["handle dialog", "alert", "confirm", "prompt"], cost: "low" },
|
|
2550
|
+
chrome_fill_form: { description: "Fill multiple form fields", intent: ["fill form", "batch fill", "fill multiple"], cost: "low" },
|
|
2551
|
+
chrome_check: { description: "Check checkbox", intent: ["check checkbox"], cost: "low" },
|
|
2552
|
+
chrome_uncheck: { description: "Uncheck checkbox", intent: ["uncheck checkbox"], cost: "low" },
|
|
2553
|
+
chrome_wait_for_text: { description: "Wait for text on page", intent: ["wait for text"], cost: "low" },
|
|
2554
|
+
chrome_verify_element_visible: { description: "Verify element visible", intent: ["assert visible", "verify element"], cost: "low" },
|
|
2555
|
+
chrome_verify_text_visible: { description: "Verify text visible", intent: ["assert text", "verify text"], cost: "low" },
|
|
2556
|
+
chrome_verify_value: { description: "Verify input value", intent: ["assert value", "verify value"], cost: "low" },
|
|
2557
|
+
chrome_generate_locator: { description: "Generate Playwright locator", intent: ["generate locator", "playwright code"], cost: "low" },
|
|
2558
|
+
chrome_lighthouse_audit: { description: "Heuristic audit for accessibility, SEO, best-practices", intent: ["lighthouse", "audit", "accessibility score", "seo score"], cost: "medium", requires: ["chrome_debug_attach"] },
|
|
2559
|
+
chrome_performance_insight: { description: "Performance insights and Core Web Vitals", intent: ["performance insight", "core web vitals", "lcp", "cls"], cost: "medium", requires: ["chrome_debug_attach"] },
|
|
2560
|
+
chrome_screencast_start: { description: "Start screencast recording", intent: ["record video", "screencast"], cost: "medium", requires: ["chrome_debug_attach"] },
|
|
2561
|
+
chrome_screencast_stop: { description: "Stop screencast recording", intent: ["stop screencast"], cost: "low" },
|
|
2562
|
+
chrome_resize_page: { description: "Resize page viewport", intent: ["resize window", "viewport size"], cost: "low" },
|
|
2563
|
+
chrome_emulate: { description: "Unified device emulation", intent: ["emulate device", "unified emulate"], cost: "medium", requires: ["chrome_debug_attach"] },
|
|
2564
|
+
chrome_mouse_move: { description: "Move mouse to coordinates", intent: ["mouse move"], cost: "medium", requires: ["chrome_debug_attach"] },
|
|
2565
|
+
chrome_mouse_down: { description: "Press mouse button", intent: ["mouse down"], cost: "medium", requires: ["chrome_debug_attach"] },
|
|
2566
|
+
chrome_mouse_up: { description: "Release mouse button", intent: ["mouse up"], cost: "medium", requires: ["chrome_debug_attach"] },
|
|
2567
|
+
chrome_mouse_wheel: { description: "Scroll mouse wheel", intent: ["mouse wheel"], cost: "medium", requires: ["chrome_debug_attach"] },
|
|
2568
|
+
chrome_click_at: { description: "Click at coordinates", intent: ["click coordinate", "coordinate click"], cost: "medium", requires: ["chrome_debug_attach"] },
|
|
2569
|
+
chrome_heap_summary: { description: "Get heap summary", intent: ["heap summary", "memory usage"], cost: "medium", requires: ["chrome_debug_attach"] },
|
|
2570
|
+
chrome_heap_query_objects: { description: "Query heap objects", intent: ["heap objects", "query objects"], cost: "medium", requires: ["chrome_debug_attach"] },
|
|
2571
|
+
chrome_cookie_clear: { description: "Clear cookies for URL", intent: ["clear cookies"], cost: "low" },
|
|
2572
|
+
chrome_localstorage_list: { description: "List localStorage keys", intent: ["list localstorage"], cost: "low" },
|
|
2573
|
+
chrome_localstorage_delete: { description: "Delete localStorage key", intent: ["delete localstorage"], cost: "low" },
|
|
2574
|
+
chrome_sessionstorage_set: { description: "Set sessionStorage value", intent: ["set sessionstorage"], cost: "low" },
|
|
2575
|
+
chrome_sessionstorage_get: { description: "Get sessionStorage value", intent: ["get sessionstorage"], cost: "low" },
|
|
2576
|
+
chrome_sessionstorage_delete: { description: "Delete sessionStorage key", intent: ["delete sessionstorage"], cost: "low" },
|
|
2577
|
+
chrome_sessionstorage_clear: { description: "Clear sessionStorage", intent: ["clear sessionstorage"], cost: "low" },
|
|
2578
|
+
chrome_route_list: { description: "List mock routes", intent: ["list mocks", "list routes"], cost: "low" },
|
|
2579
|
+
chrome_unroute: { description: "Remove mock route", intent: ["remove mock", "unroute"], cost: "low" },
|
|
2580
|
+
chrome_network_state_set: { description: "Set network state", intent: ["offline", "network state"], cost: "low", requires: ["chrome_debug_attach"] },
|
|
2581
|
+
chrome_get_network_request: { description: "Get network request by ID", intent: ["get request"], cost: "low", requires: ["chrome_debug_attach"] },
|
|
2582
|
+
chrome_indexeddb_list: { description: "List IndexedDB databases", intent: ["list indexeddb"], cost: "low" },
|
|
2583
|
+
chrome_indexeddb_clear: { description: "Clear IndexedDB store", intent: ["clear indexeddb"], cost: "low" },
|
|
2584
|
+
chrome_list_extensions: { description: "List installed extensions", intent: ["list extensions"], cost: "low" },
|
|
2585
|
+
chrome_enable_extension: { description: "Enable extension", intent: ["enable extension"], cost: "low" },
|
|
2586
|
+
chrome_disable_extension: { description: "Disable extension", intent: ["disable extension"], cost: "low" },
|
|
2587
|
+
chrome_reload_extension: { description: "Reload extension", intent: ["reload extension"], cost: "low" },
|
|
2588
|
+
chrome_trigger_extension_action: { description: "Trigger extension action", intent: ["trigger action"], cost: "low" },
|
|
2589
|
+
chrome_pwa_check: { description: "Check PWA installability", intent: ["pwa check", "installable"], cost: "medium", requires: ["chrome_debug_attach"] },
|
|
2590
|
+
chrome_list_webmcp_tools: { description: "List WebMCP tools", intent: ["webmcp", "list tools"], cost: "low" },
|
|
2591
|
+
chrome_execute_webmcp_tool: { description: "Execute WebMCP tool", intent: ["webmcp execute"], cost: "medium" },
|
|
2592
|
+
chrome_screenshot_element: { description: "Screenshot of element", intent: ["screenshot element"], cost: "high", requires: ["chrome_debug_attach"] },
|
|
2593
|
+
chrome_screenshot_fullpage: { description: "Full page screenshot", intent: ["full page screenshot"], cost: "high", requires: ["chrome_debug_attach"] },
|
|
2594
|
+
chrome_pdf_print: { description: "Print to PDF", intent: ["pdf print", "print page"], cost: "high", requires: ["chrome_debug_attach"] },
|
|
2116
2595
|
};
|
|
2117
2596
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
2118
2597
|
return { tools: TOOLS };
|
|
@@ -2175,6 +2654,18 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
2175
2654
|
try {
|
|
2176
2655
|
const method = name.replace(/^chrome_/, "");
|
|
2177
2656
|
const result = await callExtension(method, args || {});
|
|
2657
|
+
if (name === "chrome_screenshot" || name === "chrome_screenshot_element" || name === "chrome_screenshot_fullpage") {
|
|
2658
|
+
const match = String(result).match(/^data:image\/(png|jpeg);base64,(.+)$/);
|
|
2659
|
+
if (match) {
|
|
2660
|
+
return { content: [{ type: "image", data: match[2], mimeType: `image/${match[1]}` }] };
|
|
2661
|
+
}
|
|
2662
|
+
}
|
|
2663
|
+
if (name === "chrome_pdf_print") {
|
|
2664
|
+
const match = String(result).match(/^data:application\/pdf;base64,(.+)$/);
|
|
2665
|
+
if (match) {
|
|
2666
|
+
return { content: [{ type: "resource", resource: { uri: "output.pdf", mimeType: "application/pdf", blob: match[1] } }] };
|
|
2667
|
+
}
|
|
2668
|
+
}
|
|
2178
2669
|
return { content: [{ type: "text", text: String(result) }] };
|
|
2179
2670
|
}
|
|
2180
2671
|
catch (error) {
|