chrome-devtools-mcp 1.7.0 → 1.8.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.
Files changed (67) hide show
  1. package/README.md +48 -14
  2. package/build/src/McpContext.js +60 -24
  3. package/build/src/McpPage.js +5 -3
  4. package/build/src/McpResponse.js +22 -4
  5. package/build/src/ToolHandler.js +66 -12
  6. package/build/src/bin/chrome-devtools-mcp-main.js +2 -2
  7. package/build/src/bin/chrome-devtools.js +29 -30
  8. package/build/src/browser.js +3 -1
  9. package/build/src/{PageCollector.js → collectors/PageCollector.js} +7 -7
  10. package/build/src/{ServiceWorkerCollector.js → collectors/ServiceWorkerCollector.js} +1 -1
  11. package/build/src/{bin/chrome-devtools-cli-options.js → config/cli-options.js} +378 -23
  12. package/build/src/{bin/chrome-devtools-mcp-cli-options.js → config/mcp-options.js} +73 -8
  13. package/build/src/daemon/client.js +11 -2
  14. package/build/src/daemon/daemon.js +2 -2
  15. package/build/src/devtools/DevtoolsUtils.js +2 -14
  16. package/build/src/formatters/ConsoleFormatter.js +43 -10
  17. package/build/src/formatters/HeapSnapshotFormatter.js +10 -2
  18. package/build/src/formatters/IssueFormatter.js +1 -1
  19. package/build/src/formatters/NetworkFormatter.js +7 -7
  20. package/build/src/index.js +33 -5
  21. package/build/src/{HeapSnapshotManager.js → processors/HeapSnapshotManager.js} +21 -5
  22. package/build/src/{trace-processing/parse.js → processors/PerformanceTrace.js} +1 -1
  23. package/build/src/telemetry/ClearcutLogger.js +13 -1
  24. package/build/src/telemetry/flagUtils.js +4 -3
  25. package/build/src/telemetry/types.js +4 -0
  26. package/build/src/third_party/THIRD_PARTY_NOTICES +6 -63
  27. package/build/src/third_party/bundled-packages.json +4 -4
  28. package/build/src/third_party/devtools-heap-snapshot-worker.js +274 -42
  29. package/build/src/third_party/index.js +35378 -35538
  30. package/build/src/third_party/issue-descriptions/connectionAllowlistEmbeddingRequirementNotSatisfied.md +26 -0
  31. package/build/src/third_party/issue-descriptions/connectionAllowlistIFrameAttributeLoosensEmbeddingRequirement.md +19 -0
  32. package/build/src/third_party/issue-descriptions/connectionAllowlistInvalidAllowConnectionAllowlistFrom.md +21 -0
  33. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsBlockedByConnectionAllowlist.md +1 -0
  34. package/build/src/third_party/issue-descriptions/federatedAuthRequestConfigBlockedByConnectionAllowlist.md +1 -0
  35. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenBlockedByConnectionAllowlist.md +1 -0
  36. package/build/src/third_party/issue-descriptions/federatedAuthRequestWellKnownBlockedByConnectionAllowlist.md +1 -0
  37. package/build/src/tools/categories.js +3 -0
  38. package/build/src/tools/console.js +9 -3
  39. package/build/src/tools/emulation.js +2 -2
  40. package/build/src/tools/extensions.js +7 -5
  41. package/build/src/tools/input.js +26 -16
  42. package/build/src/tools/lighthouse.js +3 -1
  43. package/build/src/tools/memory.js +112 -16
  44. package/build/src/tools/network.js +6 -3
  45. package/build/src/tools/pages.js +12 -16
  46. package/build/src/tools/performance.js +15 -25
  47. package/build/src/tools/pwa.js +128 -0
  48. package/build/src/tools/screencast.js +6 -4
  49. package/build/src/tools/screenshot.js +42 -9
  50. package/build/src/tools/script.js +28 -8
  51. package/build/src/tools/slim/tools.js +3 -3
  52. package/build/src/tools/snapshot.js +5 -3
  53. package/build/src/tools/thirdPartyDeveloper.js +2 -2
  54. package/build/src/tools/tools.js +2 -0
  55. package/build/src/tools/webmcp.js +2 -2
  56. package/build/src/{WaitForHelper.js → utils/WaitForHelper.js} +63 -38
  57. package/build/src/utils/bytes.js +105 -0
  58. package/build/src/utils/logger.js +25 -11
  59. package/build/src/version.js +1 -1
  60. package/package.json +20 -12
  61. package/skills/a11y-debugging/SKILL.md +2 -0
  62. package/skills/chrome-devtools/SKILL.md +5 -4
  63. package/skills/chrome-devtools-cli/SKILL.md +109 -64
  64. package/skills/debug-optimize-lcp/SKILL.md +9 -9
  65. package/skills/memory-leak-debugging/SKILL.md +2 -2
  66. package/skills/troubleshooting/SKILL.md +1 -0
  67. package/build/src/utils/string.js +0 -37
@@ -8,6 +8,12 @@ export const commands = {
8
8
  description: 'Clicks on the provided element',
9
9
  category: 'Input automation',
10
10
  args: {
11
+ pageId: {
12
+ name: 'pageId',
13
+ type: 'number',
14
+ description: 'Targets a specific page by ID.',
15
+ required: true,
16
+ },
11
17
  uid: {
12
18
  name: 'uid',
13
19
  type: 'string',
@@ -32,6 +38,12 @@ export const commands = {
32
38
  description: 'Clicks at the provided coordinates (requires flag: --experimentalVision=true)',
33
39
  category: 'Input automation',
34
40
  args: {
41
+ pageId: {
42
+ name: 'pageId',
43
+ type: 'number',
44
+ description: 'Targets a specific page by ID.',
45
+ required: true,
46
+ },
35
47
  x: {
36
48
  name: 'x',
37
49
  type: 'number',
@@ -110,6 +122,12 @@ export const commands = {
110
122
  description: 'Drag an element onto another element',
111
123
  category: 'Input automation',
112
124
  args: {
125
+ pageId: {
126
+ name: 'pageId',
127
+ type: 'number',
128
+ description: 'Targets a specific page by ID.',
129
+ required: true,
130
+ },
113
131
  from_uid: {
114
132
  name: 'from_uid',
115
133
  type: 'string',
@@ -131,9 +149,15 @@ export const commands = {
131
149
  },
132
150
  },
133
151
  emulate: {
134
- description: 'Emulates various features on the selected page.',
152
+ description: 'Emulates various features on the target page.',
135
153
  category: 'Emulation',
136
154
  args: {
155
+ pageId: {
156
+ name: 'pageId',
157
+ type: 'number',
158
+ description: 'Targets a specific page by ID.',
159
+ required: true,
160
+ },
137
161
  networkConditions: {
138
162
  name: 'networkConditions',
139
163
  type: 'string',
@@ -181,13 +205,19 @@ export const commands = {
181
205
  },
182
206
  },
183
207
  evaluate_script: {
184
- description: 'Evaluate a JavaScript function inside the currently selected page. Returns the response as JSON, so returned values have to be JSON-serializable.',
208
+ description: 'Evaluate a JavaScript function inside the target page or service worker. Returns the response as JSON, so returned values have to be JSON-serializable.',
185
209
  category: 'Debugging',
186
210
  args: {
211
+ pageId: {
212
+ name: 'pageId',
213
+ type: 'number',
214
+ description: 'Targets a specific page by ID. Required when not evaluating in a service worker.',
215
+ required: false,
216
+ },
187
217
  function: {
188
218
  name: 'function',
189
219
  type: 'string',
190
- description: 'A JavaScript function declaration to be executed by the tool in the currently selected page.\nExample without arguments: `() => document.title` or `async () => await fetch("example.com")`.\nExample with arguments: `(el) => el.innerText`\n',
220
+ description: 'A JavaScript function declaration to be executed by the tool in the target page.\nExample without arguments: `() => document.title` or `async () => await fetch("example.com")`.\nExample with arguments: `(el) => el.innerText`\n',
191
221
  required: true,
192
222
  },
193
223
  args: {
@@ -208,12 +238,30 @@ export const commands = {
208
238
  description: 'Handle dialogs while execution. "accept", "dismiss", or string for response of window.prompt. Defaults to accept.',
209
239
  required: false,
210
240
  },
241
+ waitForStableDom: {
242
+ name: 'waitForStableDom',
243
+ type: 'boolean',
244
+ description: 'Whether to wait for the DOM to settle. Pass false if the script only reads data. Defaults to true.',
245
+ required: false,
246
+ },
247
+ serviceWorkerId: {
248
+ name: 'serviceWorkerId',
249
+ type: 'string',
250
+ description: "The optional service worker id to evaluate the script in. If provided, 'pageId' should be omitted. Note: 'args' (element UIDs) cannot be used when evaluating in a service worker.",
251
+ required: false,
252
+ },
211
253
  },
212
254
  },
213
255
  execute_3p_developer_tool: {
214
256
  description: 'Executes a tool exposed by the page. (requires flag: --categoryExperimentalThirdParty=true)',
215
257
  category: 'Third-party',
216
258
  args: {
259
+ pageId: {
260
+ name: 'pageId',
261
+ type: 'number',
262
+ description: 'Targets a specific page by ID.',
263
+ required: true,
264
+ },
217
265
  toolName: {
218
266
  name: 'toolName',
219
267
  type: 'string',
@@ -232,6 +280,12 @@ export const commands = {
232
280
  description: 'Executes a WebMCP tool exposed by the page. (requires flag: --categoryExperimentalWebmcp=true)',
233
281
  category: 'WebMCP',
234
282
  args: {
283
+ pageId: {
284
+ name: 'pageId',
285
+ type: 'number',
286
+ description: 'Targets a specific page by ID.',
287
+ required: true,
288
+ },
235
289
  toolName: {
236
290
  name: 'toolName',
237
291
  type: 'string',
@@ -250,6 +304,12 @@ export const commands = {
250
304
  description: 'Type text into an input, text area or select an option from a <select> element.',
251
305
  category: 'Input automation',
252
306
  args: {
307
+ pageId: {
308
+ name: 'pageId',
309
+ type: 'number',
310
+ description: 'Targets a specific page by ID.',
311
+ required: true,
312
+ },
253
313
  uid: {
254
314
  name: 'uid',
255
315
  type: 'string',
@@ -274,6 +334,12 @@ export const commands = {
274
334
  description: 'Gets a console message by its ID. You can get all messages by calling list_console_messages.',
275
335
  category: 'Debugging',
276
336
  args: {
337
+ pageId: {
338
+ name: 'pageId',
339
+ type: 'number',
340
+ description: 'Targets a specific page by ID.',
341
+ required: true,
342
+ },
277
343
  msgid: {
278
344
  name: 'msgid',
279
345
  type: 'number',
@@ -436,6 +502,25 @@ export const commands = {
436
502
  description: 'The node ID to get outgoing edges for.',
437
503
  required: true,
438
504
  },
505
+ sortBy: {
506
+ name: 'sortBy',
507
+ type: 'string',
508
+ description: 'Sort order for edges. Default is retainedSize.',
509
+ required: false,
510
+ enum: ['retainedSize', 'selfSize', 'name'],
511
+ },
512
+ retainedSize: {
513
+ name: 'retainedSize',
514
+ type: 'string',
515
+ description: 'Inclusive retained size range (e.g. "1MB-2MB", "-1MB", or "1MB-") for target nodes. A single value is treated as a minimum. Currently, only the lower bound is applied.',
516
+ required: false,
517
+ },
518
+ excludePrimitives: {
519
+ name: 'excludePrimitives',
520
+ type: 'boolean',
521
+ description: 'Whether to exclude primitive target nodes. Default is true.',
522
+ required: false,
523
+ },
439
524
  pageIdx: {
440
525
  name: 'pageIdx',
441
526
  type: 'number',
@@ -535,7 +620,7 @@ export const commands = {
535
620
  },
536
621
  },
537
622
  get_heapsnapshot_summary: {
538
- description: 'Loads a memory heapsnapshot and returns snapshot summary stats, including native contexts and their sizes. (requires flag: --memoryDebugging=true)',
623
+ description: 'Loads a memory heapsnapshot and returns snapshot summary stats, including native contexts and their sizes, and retained by context summary. (requires flag: --memoryDebugging=true)',
539
624
  category: 'Memory',
540
625
  args: {
541
626
  filePath: {
@@ -550,6 +635,12 @@ export const commands = {
550
635
  description: 'Gets a network request by an optional reqid, if omitted returns the currently selected request in the DevTools Network panel.',
551
636
  category: 'Network',
552
637
  args: {
638
+ pageId: {
639
+ name: 'pageId',
640
+ type: 'number',
641
+ description: 'Targets a specific page by ID.',
642
+ required: true,
643
+ },
553
644
  reqid: {
554
645
  name: 'reqid',
555
646
  type: 'number',
@@ -570,10 +661,28 @@ export const commands = {
570
661
  },
571
662
  },
572
663
  },
664
+ get_os_app_state: {
665
+ description: 'Returns the OS integration state (badge count and registered file handlers) for an installed web app, identified by its manifest ID. (requires flag: --categoryPwa=true)',
666
+ category: 'Progressive Web Apps',
667
+ args: {
668
+ manifestId: {
669
+ name: 'manifestId',
670
+ type: 'string',
671
+ description: 'The manifest ID of the web app: the resolved `id` member of its manifest. If `id` is omitted, it defaults to the resolved `start_url` (e.g. "https://example.com/"). See https://w3c.github.io/manifest/#id-member.',
672
+ required: true,
673
+ },
674
+ },
675
+ },
573
676
  handle_dialog: {
574
677
  description: 'If a browser dialog was opened, use this command to handle it',
575
678
  category: 'Input automation',
576
679
  args: {
680
+ pageId: {
681
+ name: 'pageId',
682
+ type: 'number',
683
+ description: 'Targets a specific page by ID.',
684
+ required: true,
685
+ },
577
686
  action: {
578
687
  name: 'action',
579
688
  type: 'string',
@@ -593,6 +702,12 @@ export const commands = {
593
702
  description: 'Hover over the provided element',
594
703
  category: 'Input automation',
595
704
  args: {
705
+ pageId: {
706
+ name: 'pageId',
707
+ type: 'number',
708
+ description: 'Targets a specific page by ID.',
709
+ required: true,
710
+ },
596
711
  uid: {
597
712
  name: 'uid',
598
713
  type: 'string',
@@ -619,10 +734,59 @@ export const commands = {
619
734
  },
620
735
  },
621
736
  },
737
+ install_pwa: {
738
+ description: 'Installs a Progressive Web App (PWA) identified by its manifest ID. This installs through the PWA CDP domain without a user gesture or install dialog. DevTools installs default to browser display mode. (requires flag: --categoryPwa=true)',
739
+ category: 'Progressive Web Apps',
740
+ args: {
741
+ manifestId: {
742
+ name: 'manifestId',
743
+ type: 'string',
744
+ description: 'The manifest ID of the web app: the resolved `id` member of its manifest. If `id` is omitted, it defaults to the resolved `start_url` (e.g. "https://example.com/"). See https://w3c.github.io/manifest/#id-member.',
745
+ required: true,
746
+ },
747
+ installUrlOrBundleUrl: {
748
+ name: 'installUrlOrBundleUrl',
749
+ type: 'string',
750
+ description: 'The location of the app or bundle. For a normal site this is the page URL; for an Isolated Web App it can be a file:// or http(s):// signed web bundle.',
751
+ required: true,
752
+ },
753
+ displayMode: {
754
+ name: 'displayMode',
755
+ type: 'string',
756
+ description: 'Optional user display mode preference applied after install. "standalone" opens the app in its own window; "browser" opens it as a tab. Installs via the PWA CDP domain default to "browser" because they do not simulate the install dialog, so pass "standalone" to get an app-window experience.',
757
+ required: false,
758
+ enum: ['standalone', 'browser'],
759
+ },
760
+ },
761
+ },
762
+ launch_pwa: {
763
+ description: 'Launches an installed Progressive Web App using its saved display mode. Optionally opens a specific URL within the same app instead of the default start URL. (requires flag: --categoryPwa=true)',
764
+ category: 'Progressive Web Apps',
765
+ args: {
766
+ manifestId: {
767
+ name: 'manifestId',
768
+ type: 'string',
769
+ description: 'The manifest ID of the web app: the resolved `id` member of its manifest. If `id` is omitted, it defaults to the resolved `start_url` (e.g. "https://example.com/"). See https://w3c.github.io/manifest/#id-member.',
770
+ required: true,
771
+ },
772
+ url: {
773
+ name: 'url',
774
+ type: 'string',
775
+ description: 'Optional URL within the app to open instead of the default start URL.',
776
+ required: false,
777
+ },
778
+ },
779
+ },
622
780
  lighthouse_audit: {
623
781
  description: 'Get Lighthouse score and reports for accessibility, SEO, best practices, and agentic browsing. This excludes performance. For performance audits, run performance_start_trace',
624
782
  category: 'Debugging',
625
783
  args: {
784
+ pageId: {
785
+ name: 'pageId',
786
+ type: 'number',
787
+ description: 'Targets a specific page by ID.',
788
+ required: true,
789
+ },
626
790
  mode: {
627
791
  name: 'mode',
628
792
  type: 'string',
@@ -650,12 +814,25 @@ export const commands = {
650
814
  list_3p_developer_tools: {
651
815
  description: "Lists all third-party developer tools the page exposes for providing runtime information.\nThird-party developer tools can be called via the 'execute_3p_developer_tool()' MCP tool.\nAlternatively, third-party developer tools can be executed by calling 'evaluate_script' and adding the\nfollowing command to the script:\n`window.__dtmcp.executeTool(toolName, params)`\nThis might be helpful when the third-party developer tools return non-serializable values or when composing\nthird-party developer tools with additional functionality. (requires flag: --categoryExperimentalThirdParty=true)",
652
816
  category: 'Third-party',
653
- args: {},
817
+ args: {
818
+ pageId: {
819
+ name: 'pageId',
820
+ type: 'number',
821
+ description: 'Targets a specific page by ID.',
822
+ required: true,
823
+ },
824
+ },
654
825
  },
655
826
  list_console_messages: {
656
- description: 'List all console messages for the currently selected page since the last navigation.',
827
+ description: 'List all console messages for the target page since the last navigation. This includes console messages originating from extensions content scripts.',
657
828
  category: 'Debugging',
658
829
  args: {
830
+ pageId: {
831
+ name: 'pageId',
832
+ type: 'number',
833
+ description: 'Targets a specific page by ID.',
834
+ required: true,
835
+ },
659
836
  pageSize: {
660
837
  name: 'pageSize',
661
838
  type: 'integer',
@@ -681,6 +858,13 @@ export const commands = {
681
858
  required: false,
682
859
  default: false,
683
860
  },
861
+ includeStackTraces: {
862
+ name: 'includeStackTraces',
863
+ type: 'boolean',
864
+ description: 'Set to true to include the stack trace for each message when available. Increases the response size.',
865
+ required: false,
866
+ default: false,
867
+ },
684
868
  serviceWorkerId: {
685
869
  name: 'serviceWorkerId',
686
870
  type: 'string',
@@ -695,9 +879,15 @@ export const commands = {
695
879
  args: {},
696
880
  },
697
881
  list_network_requests: {
698
- description: 'Lists the most recent requests for the currently selected page since the last navigation.',
882
+ description: 'Lists the most recent requests for the target page since the last navigation.',
699
883
  category: 'Network',
700
884
  args: {
885
+ pageId: {
886
+ name: 'pageId',
887
+ type: 'number',
888
+ description: 'Targets a specific page by ID.',
889
+ required: true,
890
+ },
701
891
  pageSize: {
702
892
  name: 'pageSize',
703
893
  type: 'integer',
@@ -726,19 +916,32 @@ export const commands = {
726
916
  },
727
917
  },
728
918
  list_pages: {
729
- description: 'Get a list of pages open in the browser.',
919
+ description: 'Get a list of pages including extension service workers open in the browser.',
730
920
  category: 'Navigation automation',
731
921
  args: {},
732
922
  },
733
923
  list_webmcp_tools: {
734
924
  description: 'Lists all WebMCP tools the page exposes. (requires flag: --categoryExperimentalWebmcp=true)',
735
925
  category: 'WebMCP',
736
- args: {},
926
+ args: {
927
+ pageId: {
928
+ name: 'pageId',
929
+ type: 'number',
930
+ description: 'Targets a specific page by ID.',
931
+ required: true,
932
+ },
933
+ },
737
934
  },
738
935
  navigate_page: {
739
936
  description: 'Go to a URL, or back, forward, or reload. Use project URL if not specified otherwise.',
740
937
  category: 'Navigation automation',
741
938
  args: {
939
+ pageId: {
940
+ name: 'pageId',
941
+ type: 'number',
942
+ description: 'Targets a specific page by ID.',
943
+ required: true,
944
+ },
742
945
  type: {
743
946
  name: 'type',
744
947
  type: 'string',
@@ -813,6 +1016,12 @@ export const commands = {
813
1016
  description: 'Provides more detailed information on a specific Performance Insight of an insight set that was highlighted in the results of a trace recording.',
814
1017
  category: 'Performance',
815
1018
  args: {
1019
+ pageId: {
1020
+ name: 'pageId',
1021
+ type: 'number',
1022
+ description: 'Targets a specific page by ID.',
1023
+ required: true,
1024
+ },
816
1025
  insightSetId: {
817
1026
  name: 'insightSetId',
818
1027
  type: 'string',
@@ -828,13 +1037,19 @@ export const commands = {
828
1037
  },
829
1038
  },
830
1039
  performance_start_trace: {
831
- description: 'Start a performance trace on the selected webpage. Use to find frontend performance issues, Core Web Vitals (LCP, INP, CLS), and improve page load speed.',
1040
+ description: 'Start a performance trace on the target webpage. Use to find frontend performance issues, Core Web Vitals (LCP, INP, CLS), and improve page load speed.',
832
1041
  category: 'Performance',
833
1042
  args: {
1043
+ pageId: {
1044
+ name: 'pageId',
1045
+ type: 'number',
1046
+ description: 'Targets a specific page by ID.',
1047
+ required: true,
1048
+ },
834
1049
  reload: {
835
1050
  name: 'reload',
836
1051
  type: 'boolean',
837
- description: 'Determines if, once tracing has started, the current selected page should be automatically reloaded. Navigate the page to the right URL using the navigate_page tool BEFORE starting the trace if reload or autoStop is set to true.',
1052
+ description: 'Determines if, once tracing has started, the target page should be automatically reloaded. Navigate the page to the right URL using the navigate_page tool BEFORE starting the trace if reload or autoStop is set to true.',
838
1053
  required: false,
839
1054
  default: true,
840
1055
  },
@@ -854,9 +1069,15 @@ export const commands = {
854
1069
  },
855
1070
  },
856
1071
  performance_stop_trace: {
857
- description: 'Stop the active performance trace recording on the selected webpage.',
1072
+ description: 'Stop the active performance trace recording on the target webpage.',
858
1073
  category: 'Performance',
859
1074
  args: {
1075
+ pageId: {
1076
+ name: 'pageId',
1077
+ type: 'number',
1078
+ description: 'Targets a specific page by ID.',
1079
+ required: true,
1080
+ },
860
1081
  filePath: {
861
1082
  name: 'filePath',
862
1083
  type: 'string',
@@ -869,6 +1090,12 @@ export const commands = {
869
1090
  description: 'Press a key or key combination. Use this when other input methods like fill() cannot be used (e.g., keyboard shortcuts, navigation keys, or special key combinations).',
870
1091
  category: 'Input automation',
871
1092
  args: {
1093
+ pageId: {
1094
+ name: 'pageId',
1095
+ type: 'number',
1096
+ description: 'Targets a specific page by ID.',
1097
+ required: true,
1098
+ },
872
1099
  key: {
873
1100
  name: 'key',
874
1101
  type: 'string',
@@ -883,6 +1110,73 @@ export const commands = {
883
1110
  },
884
1111
  },
885
1112
  },
1113
+ query_heapsnapshot_objects: {
1114
+ description: 'Loads a memory heapsnapshot and queries objects matching specific filters (className, propertyName, nodeType, retainedSize, selfSize, isDetached, sortBy). (requires flag: --memoryDebugging=true)',
1115
+ category: 'Memory',
1116
+ args: {
1117
+ filePath: {
1118
+ name: 'filePath',
1119
+ type: 'string',
1120
+ description: 'A path to a .heapsnapshot file to read.',
1121
+ required: true,
1122
+ },
1123
+ className: {
1124
+ name: 'className',
1125
+ type: 'string',
1126
+ description: 'Optional regex or text matching object class name.',
1127
+ required: false,
1128
+ },
1129
+ propertyName: {
1130
+ name: 'propertyName',
1131
+ type: 'string',
1132
+ description: 'Optional property name filter for outgoing reference edges.',
1133
+ required: false,
1134
+ },
1135
+ nodeType: {
1136
+ name: 'nodeType',
1137
+ type: 'string',
1138
+ description: 'Optional V8 node type filter (e.g. object, closure, string, array, code).',
1139
+ required: false,
1140
+ },
1141
+ retainedSize: {
1142
+ name: 'retainedSize',
1143
+ type: 'string',
1144
+ description: 'Inclusive retained size range (e.g. "1MB-2MB", "-1MB", or "1MB-"). A single value is treated as a minimum.',
1145
+ required: false,
1146
+ },
1147
+ selfSize: {
1148
+ name: 'selfSize',
1149
+ type: 'string',
1150
+ description: 'Inclusive self size range (e.g. "1MB-2MB", "-1MB", or "1MB-"). A single value is treated as a minimum.',
1151
+ required: false,
1152
+ },
1153
+ isDetached: {
1154
+ name: 'isDetached',
1155
+ type: 'boolean',
1156
+ description: 'Whether to filter for detached DOM nodes.',
1157
+ required: false,
1158
+ },
1159
+ sortBy: {
1160
+ name: 'sortBy',
1161
+ type: 'string',
1162
+ description: 'Sort order for results. Default is retainedSize.',
1163
+ required: false,
1164
+ enum: ['retainedSize', 'selfSize', 'id'],
1165
+ },
1166
+ pageIdx: {
1167
+ name: 'pageIdx',
1168
+ type: 'number',
1169
+ description: 'The page index for pagination.',
1170
+ required: false,
1171
+ },
1172
+ pageSize: {
1173
+ name: 'pageSize',
1174
+ type: 'number',
1175
+ description: 'The page size for pagination.',
1176
+ required: false,
1177
+ },
1178
+ },
1179
+ },
886
1180
  reload_extension: {
887
1181
  description: 'Reloads an unpacked Chrome extension by its ID. (requires flag: --categoryExtensions=true)',
888
1182
  category: 'Extensions',
@@ -896,9 +1190,15 @@ export const commands = {
896
1190
  },
897
1191
  },
898
1192
  resize_page: {
899
- description: "Resizes the selected page's window so that the page has specified dimension",
1193
+ description: "Resizes the page's window so that the page has specified dimension",
900
1194
  category: 'Emulation',
901
1195
  args: {
1196
+ pageId: {
1197
+ name: 'pageId',
1198
+ type: 'number',
1199
+ description: 'Targets a specific page by ID.',
1200
+ required: true,
1201
+ },
902
1202
  width: {
903
1203
  name: 'width',
904
1204
  type: 'number',
@@ -914,9 +1214,15 @@ export const commands = {
914
1214
  },
915
1215
  },
916
1216
  screencast_start: {
917
- description: 'Starts recording a screencast (video) of the selected page in specified format. (requires flag: --experimentalScreencast=true)',
1217
+ description: 'Starts recording a screencast (video) of the target page in specified format. (requires flag: --experimentalScreencast=true)',
918
1218
  category: 'Debugging',
919
1219
  args: {
1220
+ pageId: {
1221
+ name: 'pageId',
1222
+ type: 'number',
1223
+ description: 'Targets a specific page by ID.',
1224
+ required: true,
1225
+ },
920
1226
  filePath: {
921
1227
  name: 'filePath',
922
1228
  type: 'string',
@@ -926,9 +1232,16 @@ export const commands = {
926
1232
  },
927
1233
  },
928
1234
  screencast_stop: {
929
- description: 'Stops the active screencast recording on the selected page. (requires flag: --experimentalScreencast=true)',
1235
+ description: 'Stops the active screencast recording on the target page. (requires flag: --experimentalScreencast=true)',
930
1236
  category: 'Debugging',
931
- args: {},
1237
+ args: {
1238
+ pageId: {
1239
+ name: 'pageId',
1240
+ type: 'number',
1241
+ description: 'Targets a specific page by ID.',
1242
+ required: true,
1243
+ },
1244
+ },
932
1245
  },
933
1246
  select_page: {
934
1247
  description: 'Select a page as a context for future tool calls.',
@@ -949,9 +1262,15 @@ export const commands = {
949
1262
  },
950
1263
  },
951
1264
  take_heapsnapshot: {
952
- description: 'Capture a heap snapshot of the currently selected page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.',
1265
+ description: 'Capture a heap snapshot of the target page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.',
953
1266
  category: 'Memory',
954
1267
  args: {
1268
+ pageId: {
1269
+ name: 'pageId',
1270
+ type: 'number',
1271
+ description: 'Targets a specific page by ID.',
1272
+ required: true,
1273
+ },
955
1274
  filePath: {
956
1275
  name: 'filePath',
957
1276
  type: 'string',
@@ -964,6 +1283,12 @@ export const commands = {
964
1283
  description: 'Take a screenshot of the page or element.',
965
1284
  category: 'Debugging',
966
1285
  args: {
1286
+ pageId: {
1287
+ name: 'pageId',
1288
+ type: 'number',
1289
+ description: 'Targets a specific page by ID.',
1290
+ required: true,
1291
+ },
967
1292
  format: {
968
1293
  name: 'format',
969
1294
  type: 'string',
@@ -999,9 +1324,15 @@ export const commands = {
999
1324
  },
1000
1325
  },
1001
1326
  take_snapshot: {
1002
- description: 'Take a text snapshot of the currently selected page based on the a11y tree. The snapshot lists page elements along with a unique\nidentifier (uid). Always use the latest snapshot. Prefer taking a snapshot over taking a screenshot. The snapshot indicates the element selected\nin the DevTools Elements panel (if any).',
1327
+ description: 'Take a text snapshot of the target page based on the a11y tree. The snapshot lists page elements along with a unique\nidentifier (uid). Always use the latest snapshot. Prefer taking a snapshot over taking a screenshot. The snapshot indicates the element selected\nin the DevTools Elements panel (if any).',
1003
1328
  category: 'Debugging',
1004
1329
  args: {
1330
+ pageId: {
1331
+ name: 'pageId',
1332
+ type: 'number',
1333
+ description: 'Targets a specific page by ID.',
1334
+ required: true,
1335
+ },
1005
1336
  verbose: {
1006
1337
  name: 'verbose',
1007
1338
  type: 'boolean',
@@ -1032,6 +1363,12 @@ export const commands = {
1032
1363
  description: 'Type text using keyboard into a previously focused input',
1033
1364
  category: 'Input automation',
1034
1365
  args: {
1366
+ pageId: {
1367
+ name: 'pageId',
1368
+ type: 'number',
1369
+ description: 'Targets a specific page by ID.',
1370
+ required: true,
1371
+ },
1035
1372
  text: {
1036
1373
  name: 'text',
1037
1374
  type: 'string',
@@ -1058,20 +1395,38 @@ export const commands = {
1058
1395
  },
1059
1396
  },
1060
1397
  },
1398
+ uninstall_pwa: {
1399
+ description: 'Uninstalls a Progressive Web App identified by its manifest ID and closes any open app windows. (requires flag: --categoryPwa=true)',
1400
+ category: 'Progressive Web Apps',
1401
+ args: {
1402
+ manifestId: {
1403
+ name: 'manifestId',
1404
+ type: 'string',
1405
+ description: 'The manifest ID of the web app: the resolved `id` member of its manifest. If `id` is omitted, it defaults to the resolved `start_url` (e.g. "https://example.com/"). See https://w3c.github.io/manifest/#id-member.',
1406
+ required: true,
1407
+ },
1408
+ },
1409
+ },
1061
1410
  upload_file: {
1062
1411
  description: 'Upload a file through a provided element.',
1063
1412
  category: 'Input automation',
1064
1413
  args: {
1414
+ pageId: {
1415
+ name: 'pageId',
1416
+ type: 'number',
1417
+ description: 'Targets a specific page by ID.',
1418
+ required: true,
1419
+ },
1065
1420
  uid: {
1066
1421
  name: 'uid',
1067
1422
  type: 'string',
1068
1423
  description: 'The uid of the file input element or an element that will open file chooser on the page from the page content snapshot',
1069
1424
  required: true,
1070
1425
  },
1071
- filePath: {
1072
- name: 'filePath',
1073
- type: 'string',
1074
- description: 'The local path of the file to upload',
1426
+ filePaths: {
1427
+ name: 'filePaths',
1428
+ type: 'array',
1429
+ description: 'One or more files paths to upload. File paths have to be local to the browser instance (not the MCP).',
1075
1430
  required: true,
1076
1431
  },
1077
1432
  includeSnapshot: {
@@ -1083,4 +1438,4 @@ export const commands = {
1083
1438
  },
1084
1439
  },
1085
1440
  };
1086
- //# sourceMappingURL=chrome-devtools-cli-options.js.map
1441
+ //# sourceMappingURL=cli-options.js.map