opera-devtools-mcp 0.6.1 → 0.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 (96) hide show
  1. package/README.md +1 -1
  2. package/build/src/McpContext.js +78 -41
  3. package/build/src/McpPage.js +5 -1
  4. package/build/src/ToolHandler.js +54 -76
  5. package/build/src/bin/chrome-devtools-mcp-main.js +4 -4
  6. package/build/src/bin/chrome-devtools.js +56 -124
  7. package/build/src/bin/opera-browser-cli.js +102 -0
  8. package/build/src/bin/opera-devtools-cli-options.js +1 -1
  9. package/build/src/bin/opera-devtools-mcp-cli-options.js +1 -1
  10. package/build/src/bin/opera-devtools-mcp.js +20 -1
  11. package/build/src/browser.js +23 -25
  12. package/build/src/config/browser-options.js +126 -0
  13. package/build/src/config/category-options.js +81 -0
  14. package/build/src/{bin/chrome-devtools-cli-options.js → config/cli-options.js} +368 -26
  15. package/build/src/{bin/chrome-devtools-mcp-cli-options.js → config/mcp-options.js} +143 -164
  16. package/build/src/daemon/client.js +55 -40
  17. package/build/src/daemon/daemon.js +62 -39
  18. package/build/src/daemon/utils.js +6 -0
  19. package/build/src/devtools/DevtoolsUtils.js +27 -21
  20. package/build/src/formatters/NetworkFormatter.js +5 -2
  21. package/build/src/index.js +166 -100
  22. package/build/src/opera/branding.js +4 -2
  23. package/build/src/opera/browserActivity.js +62 -0
  24. package/build/src/opera/browserCleanup.js +123 -0
  25. package/build/src/opera/browserErrors.js +66 -0
  26. package/build/src/opera/browserFlags.js +184 -38
  27. package/build/src/opera/browserTarget.js +513 -0
  28. package/build/src/opera/cdpErrors.js +391 -0
  29. package/build/src/opera/cliCommands.js +378 -0
  30. package/build/src/opera/cliOutput.js +284 -0
  31. package/build/src/opera/compactSnapshot.js +525 -0
  32. package/build/src/opera/config.js +166 -0
  33. package/build/src/opera/daemonLifecycle.js +257 -0
  34. package/build/src/opera/daemonLog.js +103 -0
  35. package/build/src/opera/daemonPidFile.js +83 -0
  36. package/build/src/opera/daemonShutdown.js +66 -0
  37. package/build/src/opera/daemonSocket.js +87 -0
  38. package/build/src/opera/daemonStreaming.js +130 -0
  39. package/build/src/opera/daemonToolCall.js +26 -0
  40. package/build/src/opera/detect.js +114 -0
  41. package/build/src/opera/doctor.js +317 -0
  42. package/build/src/opera/envConfig.js +229 -0
  43. package/build/src/opera/launcherNotice.js +116 -0
  44. package/build/src/opera/legacyBridgeCleanup.js +297 -0
  45. package/build/src/opera/logs.js +133 -0
  46. package/build/src/opera/mcpServerSupervisor.js +128 -0
  47. package/build/src/opera/migrationShared.js +164 -0
  48. package/build/src/opera/operaPages.js +56 -0
  49. package/build/src/opera/pageIdRouting.js +35 -0
  50. package/build/src/opera/pageRecovery.js +53 -0
  51. package/build/src/opera/profile.js +270 -0
  52. package/build/src/opera/refArgs.js +36 -0
  53. package/build/src/opera/serviceWorkerRetry.js +46 -4
  54. package/build/src/opera/setup.js +290 -0
  55. package/build/src/opera/skills/SKILL.md +160 -0
  56. package/build/src/opera/streamingTools.js +73 -0
  57. package/build/src/opera/suggestions.js +67 -0
  58. package/build/src/opera/toolHandlerHooks.js +25 -1
  59. package/build/src/opera/tools/opera.js +107 -38
  60. package/build/src/opera/urlResolver.js +69 -0
  61. package/build/src/opera/webStorageWarning.js +92 -0
  62. package/build/src/processors/HeapSnapshotManager.js +12 -0
  63. package/build/src/telemetry/ClearcutLogger.js +19 -6
  64. package/build/src/telemetry/transformation.js +4 -0
  65. package/build/src/telemetry/types.js +4 -0
  66. package/build/src/third_party/THIRD_PARTY_NOTICES +5 -5
  67. package/build/src/third_party/bundled-packages.json +3 -3
  68. package/build/src/third_party/devtools-formatter-worker.js +23 -0
  69. package/build/src/third_party/devtools-heap-snapshot-worker.js +101 -20
  70. package/build/src/third_party/index.js +15460 -14256
  71. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsBlockedByConnectionAllowlist.md +1 -0
  72. package/build/src/third_party/issue-descriptions/federatedAuthRequestConfigBlockedByConnectionAllowlist.md +1 -0
  73. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenBlockedByConnectionAllowlist.md +1 -0
  74. package/build/src/third_party/issue-descriptions/federatedAuthRequestWellKnownBlockedByConnectionAllowlist.md +1 -0
  75. package/build/src/tools/ToolDefinition.js +15 -0
  76. package/build/src/tools/categories.js +0 -6
  77. package/build/src/tools/comments.js +90 -0
  78. package/build/src/tools/console.js +1 -1
  79. package/build/src/tools/emulation.js +1 -1
  80. package/build/src/tools/extensions.js +1 -1
  81. package/build/src/tools/memory.js +60 -6
  82. package/build/src/tools/network.js +2 -2
  83. package/build/src/tools/pages.js +26 -15
  84. package/build/src/tools/performance.js +4 -3
  85. package/build/src/tools/screencast.js +3 -2
  86. package/build/src/tools/screenshot.js +39 -8
  87. package/build/src/tools/script.js +17 -4
  88. package/build/src/tools/slim/tools.js +41 -33
  89. package/build/src/tools/snapshot.js +1 -1
  90. package/build/src/tools/tools.js +2 -0
  91. package/build/src/utils/WaitForHelper.js +12 -1
  92. package/build/src/utils/bytes.js +105 -0
  93. package/build/src/utils/url.js +79 -0
  94. package/build/src/version.js +1 -1
  95. package/package.json +29 -8
  96. package/build/src/bin/opera-devtools.js +0 -10
@@ -10,6 +10,12 @@ export const commands = {
10
10
  description: 'Clicks on the provided element',
11
11
  category: 'Input automation',
12
12
  args: {
13
+ pageId: {
14
+ name: 'pageId',
15
+ type: 'number',
16
+ description: 'Targets a specific page by ID.',
17
+ required: true,
18
+ },
13
19
  uid: {
14
20
  name: 'uid',
15
21
  type: 'string',
@@ -34,6 +40,12 @@ export const commands = {
34
40
  description: 'Clicks at the provided coordinates (requires flag: --experimentalVision=true)',
35
41
  category: 'Input automation',
36
42
  args: {
43
+ pageId: {
44
+ name: 'pageId',
45
+ type: 'number',
46
+ description: 'Targets a specific page by ID.',
47
+ required: true,
48
+ },
37
49
  x: {
38
50
  name: 'x',
39
51
  type: 'number',
@@ -112,6 +124,12 @@ export const commands = {
112
124
  description: 'Drag an element onto another element',
113
125
  category: 'Input automation',
114
126
  args: {
127
+ pageId: {
128
+ name: 'pageId',
129
+ type: 'number',
130
+ description: 'Targets a specific page by ID.',
131
+ required: true,
132
+ },
115
133
  from_uid: {
116
134
  name: 'from_uid',
117
135
  type: 'string',
@@ -133,9 +151,15 @@ export const commands = {
133
151
  },
134
152
  },
135
153
  emulate: {
136
- description: 'Emulates various features on the selected page.',
154
+ description: 'Emulates various features on the target page.',
137
155
  category: 'Emulation',
138
156
  args: {
157
+ pageId: {
158
+ name: 'pageId',
159
+ type: 'number',
160
+ description: 'Targets a specific page by ID.',
161
+ required: true,
162
+ },
139
163
  networkConditions: {
140
164
  name: 'networkConditions',
141
165
  type: 'string',
@@ -183,13 +207,19 @@ export const commands = {
183
207
  },
184
208
  },
185
209
  evaluate_script: {
186
- description: 'Evaluate a JavaScript function inside the currently selected page. Returns the response as JSON, so returned values have to be JSON-serializable.',
210
+ 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.',
187
211
  category: 'Debugging',
188
212
  args: {
213
+ pageId: {
214
+ name: 'pageId',
215
+ type: 'number',
216
+ description: 'Targets a specific page by ID. Required when not evaluating in a service worker.',
217
+ required: false,
218
+ },
189
219
  function: {
190
220
  name: 'function',
191
221
  type: 'string',
192
- 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',
222
+ 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',
193
223
  required: true,
194
224
  },
195
225
  args: {
@@ -216,12 +246,24 @@ export const commands = {
216
246
  description: 'Whether to wait for the DOM to settle. Pass false if the script only reads data. Defaults to true.',
217
247
  required: false,
218
248
  },
249
+ serviceWorkerId: {
250
+ name: 'serviceWorkerId',
251
+ type: 'string',
252
+ 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.",
253
+ required: false,
254
+ },
219
255
  },
220
256
  },
221
257
  execute_3p_developer_tool: {
222
258
  description: 'Executes a tool exposed by the page. (requires flag: --categoryExperimentalThirdParty=true)',
223
259
  category: 'Third-party',
224
260
  args: {
261
+ pageId: {
262
+ name: 'pageId',
263
+ type: 'number',
264
+ description: 'Targets a specific page by ID.',
265
+ required: true,
266
+ },
225
267
  toolName: {
226
268
  name: 'toolName',
227
269
  type: 'string',
@@ -240,6 +282,12 @@ export const commands = {
240
282
  description: 'Executes a WebMCP tool exposed by the page. (requires flag: --categoryExperimentalWebmcp=true)',
241
283
  category: 'WebMCP',
242
284
  args: {
285
+ pageId: {
286
+ name: 'pageId',
287
+ type: 'number',
288
+ description: 'Targets a specific page by ID.',
289
+ required: true,
290
+ },
243
291
  toolName: {
244
292
  name: 'toolName',
245
293
  type: 'string',
@@ -258,6 +306,12 @@ export const commands = {
258
306
  description: 'Type text into an input, text area or select an option from a <select> element.',
259
307
  category: 'Input automation',
260
308
  args: {
309
+ pageId: {
310
+ name: 'pageId',
311
+ type: 'number',
312
+ description: 'Targets a specific page by ID.',
313
+ required: true,
314
+ },
261
315
  uid: {
262
316
  name: 'uid',
263
317
  type: 'string',
@@ -282,6 +336,12 @@ export const commands = {
282
336
  description: 'Gets a console message by its ID. You can get all messages by calling list_console_messages.',
283
337
  category: 'Debugging',
284
338
  args: {
339
+ pageId: {
340
+ name: 'pageId',
341
+ type: 'number',
342
+ description: 'Targets a specific page by ID.',
343
+ required: true,
344
+ },
285
345
  msgid: {
286
346
  name: 'msgid',
287
347
  type: 'number',
@@ -451,10 +511,10 @@ export const commands = {
451
511
  required: false,
452
512
  enum: ['retainedSize', 'selfSize', 'name'],
453
513
  },
454
- minRetainedSize: {
455
- name: 'minRetainedSize',
456
- type: 'number',
457
- description: 'Minimum retained size in bytes for target nodes.',
514
+ retainedSize: {
515
+ name: 'retainedSize',
516
+ type: 'string',
517
+ 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.',
458
518
  required: false,
459
519
  },
460
520
  excludePrimitives: {
@@ -574,9 +634,15 @@ export const commands = {
574
634
  },
575
635
  },
576
636
  get_network_request: {
577
- description: 'Gets a network request by an optional reqid, if omitted returns the currently selected request in the DevTools Network panel.',
637
+ description: "Gets a network request by an optional reqid, if omitted returns the currently selected request in the DevTools Network panel. Useful for inspecting request headers (including 'Cookie') and response headers (including 'Set-Cookie' and directives).",
578
638
  category: 'Network',
579
639
  args: {
640
+ pageId: {
641
+ name: 'pageId',
642
+ type: 'number',
643
+ description: 'Targets a specific page by ID.',
644
+ required: true,
645
+ },
580
646
  reqid: {
581
647
  name: 'reqid',
582
648
  type: 'number',
@@ -613,6 +679,12 @@ export const commands = {
613
679
  description: 'If a browser dialog was opened, use this command to handle it',
614
680
  category: 'Input automation',
615
681
  args: {
682
+ pageId: {
683
+ name: 'pageId',
684
+ type: 'number',
685
+ description: 'Targets a specific page by ID.',
686
+ required: true,
687
+ },
616
688
  action: {
617
689
  name: 'action',
618
690
  type: 'string',
@@ -632,6 +704,12 @@ export const commands = {
632
704
  description: 'Hover over the provided element',
633
705
  category: 'Input automation',
634
706
  args: {
707
+ pageId: {
708
+ name: 'pageId',
709
+ type: 'number',
710
+ description: 'Targets a specific page by ID.',
711
+ required: true,
712
+ },
635
713
  uid: {
636
714
  name: 'uid',
637
715
  type: 'string',
@@ -705,6 +783,12 @@ export const commands = {
705
783
  description: 'Get Lighthouse score and reports for accessibility, SEO, best practices, and agentic browsing. This excludes performance. For performance audits, run performance_start_trace',
706
784
  category: 'Debugging',
707
785
  args: {
786
+ pageId: {
787
+ name: 'pageId',
788
+ type: 'number',
789
+ description: 'Targets a specific page by ID.',
790
+ required: true,
791
+ },
708
792
  mode: {
709
793
  name: 'mode',
710
794
  type: 'string',
@@ -732,12 +816,25 @@ export const commands = {
732
816
  list_3p_developer_tools: {
733
817
  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)",
734
818
  category: 'Third-party',
735
- args: {},
819
+ args: {
820
+ pageId: {
821
+ name: 'pageId',
822
+ type: 'number',
823
+ description: 'Targets a specific page by ID.',
824
+ required: true,
825
+ },
826
+ },
736
827
  },
737
828
  list_console_messages: {
738
- description: 'List all console messages for the currently selected page since the last navigation.',
829
+ description: 'List all console messages for the target page since the last navigation. This includes console messages originating from extensions content scripts.',
739
830
  category: 'Debugging',
740
831
  args: {
832
+ pageId: {
833
+ name: 'pageId',
834
+ type: 'number',
835
+ description: 'Targets a specific page by ID.',
836
+ required: true,
837
+ },
741
838
  pageSize: {
742
839
  name: 'pageSize',
743
840
  type: 'integer',
@@ -784,9 +881,15 @@ export const commands = {
784
881
  args: {},
785
882
  },
786
883
  list_network_requests: {
787
- description: 'Lists the most recent requests for the currently selected page since the last navigation.',
884
+ description: 'Lists the most recent requests for the target page since the last navigation.',
788
885
  category: 'Network',
789
886
  args: {
887
+ pageId: {
888
+ name: 'pageId',
889
+ type: 'number',
890
+ description: 'Targets a specific page by ID.',
891
+ required: true,
892
+ },
790
893
  pageSize: {
791
894
  name: 'pageSize',
792
895
  type: 'integer',
@@ -815,19 +918,32 @@ export const commands = {
815
918
  },
816
919
  },
817
920
  list_pages: {
818
- description: 'Get a list of pages open in the browser.',
921
+ description: 'Get a list of pages including extension service workers open in the browser.',
819
922
  category: 'Navigation automation',
820
923
  args: {},
821
924
  },
822
925
  list_webmcp_tools: {
823
926
  description: 'Lists all WebMCP tools the page exposes. (requires flag: --categoryExperimentalWebmcp=true)',
824
927
  category: 'WebMCP',
825
- args: {},
928
+ args: {
929
+ pageId: {
930
+ name: 'pageId',
931
+ type: 'number',
932
+ description: 'Targets a specific page by ID.',
933
+ required: true,
934
+ },
935
+ },
826
936
  },
827
937
  navigate_page: {
828
938
  description: 'Go to a URL, or back, forward, or reload. Use project URL if not specified otherwise.',
829
939
  category: 'Navigation automation',
830
940
  args: {
941
+ pageId: {
942
+ name: 'pageId',
943
+ type: 'number',
944
+ description: 'Targets a specific page by ID.',
945
+ required: true,
946
+ },
831
947
  type: {
832
948
  name: 'type',
833
949
  type: 'string',
@@ -887,7 +1003,7 @@ export const commands = {
887
1003
  isolatedContext: {
888
1004
  name: 'isolatedContext',
889
1005
  type: 'string',
890
- description: 'If specified, the page is created in an isolated browser context with the given name. Pages in the same browser context share cookies and storage. Pages in different browser contexts are fully isolated.',
1006
+ description: 'If specified, the page is created in an isolated browser context with the given name. Pages in the same browser context share cookies and storage. Pages in different browser contexts are fully isolated (useful for clean-slate testing of cookies and authentication).',
891
1007
  required: false,
892
1008
  },
893
1009
  timeout: {
@@ -902,6 +1018,12 @@ export const commands = {
902
1018
  description: 'Complete OAuth sign-in for an MCP server that requires authentication. Opens a browser popup for the OAuth flow; requires a headed (visible) browser. Only available when connected to Opera Neon.',
903
1019
  category: 'Opera',
904
1020
  args: {
1021
+ pageId: {
1022
+ name: 'pageId',
1023
+ type: 'number',
1024
+ description: 'Targets a specific page by ID.',
1025
+ required: true,
1026
+ },
905
1027
  server: {
906
1028
  name: 'server',
907
1029
  type: 'string',
@@ -914,6 +1036,12 @@ export const commands = {
914
1036
  description: 'Execute a tool on a specific MCP server registered in the browser. Use opera_list_mcp_servers to discover available servers and tools. Only available when connected to Opera Neon.',
915
1037
  category: 'Opera',
916
1038
  args: {
1039
+ pageId: {
1040
+ name: 'pageId',
1041
+ type: 'number',
1042
+ description: 'Targets a specific page by ID.',
1043
+ required: true,
1044
+ },
917
1045
  server: {
918
1046
  name: 'server',
919
1047
  type: 'string',
@@ -938,6 +1066,12 @@ export const commands = {
938
1066
  description: "Send a chat prompt to Opera's built-in AI and return the response. Only available when connected to Opera Neon.",
939
1067
  category: 'Opera',
940
1068
  args: {
1069
+ pageId: {
1070
+ name: 'pageId',
1071
+ type: 'number',
1072
+ description: 'Targets a specific page by ID.',
1073
+ required: true,
1074
+ },
941
1075
  prompt: {
942
1076
  name: 'prompt',
943
1077
  type: 'string',
@@ -968,6 +1102,12 @@ export const commands = {
968
1102
  description: 'Connect to a registered MCP server. If the server requires OAuth, the response includes requiresAuth: "needed" — follow with opera_authenticate_mcp_server. Only available when connected to Opera Neon.',
969
1103
  category: 'Opera',
970
1104
  args: {
1105
+ pageId: {
1106
+ name: 'pageId',
1107
+ type: 'number',
1108
+ description: 'Targets a specific page by ID.',
1109
+ required: true,
1110
+ },
971
1111
  server: {
972
1112
  name: 'server',
973
1113
  type: 'string',
@@ -980,6 +1120,12 @@ export const commands = {
980
1120
  description: 'Disable an MCP server without unregistering it. Only available when connected to Opera Neon.',
981
1121
  category: 'Opera',
982
1122
  args: {
1123
+ pageId: {
1124
+ name: 'pageId',
1125
+ type: 'number',
1126
+ description: 'Targets a specific page by ID.',
1127
+ required: true,
1128
+ },
983
1129
  server: {
984
1130
  name: 'server',
985
1131
  type: 'string',
@@ -992,6 +1138,12 @@ export const commands = {
992
1138
  description: "Instruct Opera's built-in AI to perform an action on the current page and return the result. Only available when connected to Opera Neon.",
993
1139
  category: 'Opera',
994
1140
  args: {
1141
+ pageId: {
1142
+ name: 'pageId',
1143
+ type: 'number',
1144
+ description: 'Targets a specific page by ID.',
1145
+ required: true,
1146
+ },
995
1147
  prompt: {
996
1148
  name: 'prompt',
997
1149
  type: 'string',
@@ -1010,6 +1162,12 @@ export const commands = {
1010
1162
  description: 'Enable a disabled MCP server. Only available when connected to Opera Neon.',
1011
1163
  category: 'Opera',
1012
1164
  args: {
1165
+ pageId: {
1166
+ name: 'pageId',
1167
+ type: 'number',
1168
+ description: 'Targets a specific page by ID.',
1169
+ required: true,
1170
+ },
1013
1171
  server: {
1014
1172
  name: 'server',
1015
1173
  type: 'string',
@@ -1021,12 +1179,25 @@ export const commands = {
1021
1179
  opera_list_mcp_servers: {
1022
1180
  description: 'List MCP servers registered in the browser, including their connection status. Only available when connected to Opera Neon.',
1023
1181
  category: 'Opera',
1024
- args: {},
1182
+ args: {
1183
+ pageId: {
1184
+ name: 'pageId',
1185
+ type: 'number',
1186
+ description: 'Targets a specific page by ID.',
1187
+ required: true,
1188
+ },
1189
+ },
1025
1190
  },
1026
1191
  opera_list_mcp_tools: {
1027
1192
  description: 'List the tools exposed by a single MCP server. Prefer opera_list_mcp_servers when discovering everything at once; use this for a targeted refresh of one server. Only available when connected to Opera Neon.',
1028
1193
  category: 'Opera',
1029
1194
  args: {
1195
+ pageId: {
1196
+ name: 'pageId',
1197
+ type: 'number',
1198
+ description: 'Targets a specific page by ID.',
1199
+ required: true,
1200
+ },
1030
1201
  server: {
1031
1202
  name: 'server',
1032
1203
  type: 'string',
@@ -1038,12 +1209,25 @@ export const commands = {
1038
1209
  opera_list_models: {
1039
1210
  description: 'List available AI models for Opera chat. Returns model IDs, display names, and which is the default. Only available when connected to Opera Neon.',
1040
1211
  category: 'Opera',
1041
- args: {},
1212
+ args: {
1213
+ pageId: {
1214
+ name: 'pageId',
1215
+ type: 'number',
1216
+ description: 'Targets a specific page by ID.',
1217
+ required: true,
1218
+ },
1219
+ },
1042
1220
  },
1043
1221
  opera_make: {
1044
1222
  description: "Ask Opera's built-in AI to create or generate content and return the result. Only available when connected to Opera Neon.",
1045
1223
  category: 'Opera',
1046
1224
  args: {
1225
+ pageId: {
1226
+ name: 'pageId',
1227
+ type: 'number',
1228
+ description: 'Targets a specific page by ID.',
1229
+ required: true,
1230
+ },
1047
1231
  prompt: {
1048
1232
  name: 'prompt',
1049
1233
  type: 'string',
@@ -1068,6 +1252,12 @@ export const commands = {
1068
1252
  description: 'Register an MCP server in the browser. Does not connect or authenticate — follow with opera_connect_mcp_server. Only available when connected to Opera Neon.',
1069
1253
  category: 'Opera',
1070
1254
  args: {
1255
+ pageId: {
1256
+ name: 'pageId',
1257
+ type: 'number',
1258
+ description: 'Targets a specific page by ID.',
1259
+ required: true,
1260
+ },
1071
1261
  server: {
1072
1262
  name: 'server',
1073
1263
  type: 'string',
@@ -1086,6 +1276,12 @@ export const commands = {
1086
1276
  description: "Ask Opera's built-in AI to research a topic and return a summary. Only available when connected to Opera Neon.",
1087
1277
  category: 'Opera',
1088
1278
  args: {
1279
+ pageId: {
1280
+ name: 'pageId',
1281
+ type: 'number',
1282
+ description: 'Targets a specific page by ID.',
1283
+ required: true,
1284
+ },
1089
1285
  prompt: {
1090
1286
  name: 'prompt',
1091
1287
  type: 'string',
@@ -1111,6 +1307,12 @@ export const commands = {
1111
1307
  description: 'Remove a registered MCP server and its stored auth tokens. Only available when connected to Opera Neon.',
1112
1308
  category: 'Opera',
1113
1309
  args: {
1310
+ pageId: {
1311
+ name: 'pageId',
1312
+ type: 'number',
1313
+ description: 'Targets a specific page by ID.',
1314
+ required: true,
1315
+ },
1114
1316
  server: {
1115
1317
  name: 'server',
1116
1318
  type: 'string',
@@ -1123,6 +1325,12 @@ export const commands = {
1123
1325
  description: 'Provides more detailed information on a specific Performance Insight of an insight set that was highlighted in the results of a trace recording.',
1124
1326
  category: 'Performance',
1125
1327
  args: {
1328
+ pageId: {
1329
+ name: 'pageId',
1330
+ type: 'number',
1331
+ description: 'Targets a specific page by ID.',
1332
+ required: true,
1333
+ },
1126
1334
  insightSetId: {
1127
1335
  name: 'insightSetId',
1128
1336
  type: 'string',
@@ -1138,13 +1346,19 @@ export const commands = {
1138
1346
  },
1139
1347
  },
1140
1348
  performance_start_trace: {
1141
- 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.',
1349
+ 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.',
1142
1350
  category: 'Performance',
1143
1351
  args: {
1352
+ pageId: {
1353
+ name: 'pageId',
1354
+ type: 'number',
1355
+ description: 'Targets a specific page by ID.',
1356
+ required: true,
1357
+ },
1144
1358
  reload: {
1145
1359
  name: 'reload',
1146
1360
  type: 'boolean',
1147
- 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.',
1361
+ 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.',
1148
1362
  required: false,
1149
1363
  default: true,
1150
1364
  },
@@ -1164,9 +1378,15 @@ export const commands = {
1164
1378
  },
1165
1379
  },
1166
1380
  performance_stop_trace: {
1167
- description: 'Stop the active performance trace recording on the selected webpage.',
1381
+ description: 'Stop the active performance trace recording on the target webpage.',
1168
1382
  category: 'Performance',
1169
1383
  args: {
1384
+ pageId: {
1385
+ name: 'pageId',
1386
+ type: 'number',
1387
+ description: 'Targets a specific page by ID.',
1388
+ required: true,
1389
+ },
1170
1390
  filePath: {
1171
1391
  name: 'filePath',
1172
1392
  type: 'string',
@@ -1179,6 +1399,12 @@ export const commands = {
1179
1399
  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).',
1180
1400
  category: 'Input automation',
1181
1401
  args: {
1402
+ pageId: {
1403
+ name: 'pageId',
1404
+ type: 'number',
1405
+ description: 'Targets a specific page by ID.',
1406
+ required: true,
1407
+ },
1182
1408
  key: {
1183
1409
  name: 'key',
1184
1410
  type: 'string',
@@ -1193,6 +1419,73 @@ export const commands = {
1193
1419
  },
1194
1420
  },
1195
1421
  },
1422
+ query_heapsnapshot_objects: {
1423
+ description: 'Loads a memory heapsnapshot and queries objects matching specific filters (className, propertyName, nodeType, retainedSize, selfSize, isDetached, sortBy). (requires flag: --memoryDebugging=true)',
1424
+ category: 'Memory',
1425
+ args: {
1426
+ filePath: {
1427
+ name: 'filePath',
1428
+ type: 'string',
1429
+ description: 'A path to a .heapsnapshot file to read.',
1430
+ required: true,
1431
+ },
1432
+ className: {
1433
+ name: 'className',
1434
+ type: 'string',
1435
+ description: 'Optional regex or text matching object class name.',
1436
+ required: false,
1437
+ },
1438
+ propertyName: {
1439
+ name: 'propertyName',
1440
+ type: 'string',
1441
+ description: 'Optional property name filter for outgoing reference edges.',
1442
+ required: false,
1443
+ },
1444
+ nodeType: {
1445
+ name: 'nodeType',
1446
+ type: 'string',
1447
+ description: 'Optional V8 node type filter (e.g. object, closure, string, array, code).',
1448
+ required: false,
1449
+ },
1450
+ retainedSize: {
1451
+ name: 'retainedSize',
1452
+ type: 'string',
1453
+ description: 'Inclusive retained size range (e.g. "1MB-2MB", "-1MB", or "1MB-"). A single value is treated as a minimum.',
1454
+ required: false,
1455
+ },
1456
+ selfSize: {
1457
+ name: 'selfSize',
1458
+ type: 'string',
1459
+ description: 'Inclusive self size range (e.g. "1MB-2MB", "-1MB", or "1MB-"). A single value is treated as a minimum.',
1460
+ required: false,
1461
+ },
1462
+ isDetached: {
1463
+ name: 'isDetached',
1464
+ type: 'boolean',
1465
+ description: 'Whether to filter for detached DOM nodes.',
1466
+ required: false,
1467
+ },
1468
+ sortBy: {
1469
+ name: 'sortBy',
1470
+ type: 'string',
1471
+ description: 'Sort order for results. Default is retainedSize.',
1472
+ required: false,
1473
+ enum: ['retainedSize', 'selfSize', 'id'],
1474
+ },
1475
+ pageIdx: {
1476
+ name: 'pageIdx',
1477
+ type: 'number',
1478
+ description: 'The page index for pagination.',
1479
+ required: false,
1480
+ },
1481
+ pageSize: {
1482
+ name: 'pageSize',
1483
+ type: 'number',
1484
+ description: 'The page size for pagination.',
1485
+ required: false,
1486
+ },
1487
+ },
1488
+ },
1196
1489
  reload_extension: {
1197
1490
  description: 'Reloads an unpacked Chrome extension by its ID. (requires flag: --categoryExtensions=true)',
1198
1491
  category: 'Extensions',
@@ -1206,9 +1499,15 @@ export const commands = {
1206
1499
  },
1207
1500
  },
1208
1501
  resize_page: {
1209
- description: "Resizes the selected page's window so that the page has specified dimension",
1502
+ description: "Resizes the page's window so that the page has specified dimension",
1210
1503
  category: 'Emulation',
1211
1504
  args: {
1505
+ pageId: {
1506
+ name: 'pageId',
1507
+ type: 'number',
1508
+ description: 'Targets a specific page by ID.',
1509
+ required: true,
1510
+ },
1212
1511
  width: {
1213
1512
  name: 'width',
1214
1513
  type: 'number',
@@ -1224,9 +1523,15 @@ export const commands = {
1224
1523
  },
1225
1524
  },
1226
1525
  screencast_start: {
1227
- description: 'Starts recording a screencast (video) of the selected page in specified format. (requires flag: --experimentalScreencast=true)',
1526
+ description: 'Starts recording a screencast (video) of the target page in specified format. (requires flag: --experimentalScreencast=true)',
1228
1527
  category: 'Debugging',
1229
1528
  args: {
1529
+ pageId: {
1530
+ name: 'pageId',
1531
+ type: 'number',
1532
+ description: 'Targets a specific page by ID.',
1533
+ required: true,
1534
+ },
1230
1535
  filePath: {
1231
1536
  name: 'filePath',
1232
1537
  type: 'string',
@@ -1236,9 +1541,16 @@ export const commands = {
1236
1541
  },
1237
1542
  },
1238
1543
  screencast_stop: {
1239
- description: 'Stops the active screencast recording on the selected page. (requires flag: --experimentalScreencast=true)',
1544
+ description: 'Stops the active screencast recording on the target page. (requires flag: --experimentalScreencast=true)',
1240
1545
  category: 'Debugging',
1241
- args: {},
1546
+ args: {
1547
+ pageId: {
1548
+ name: 'pageId',
1549
+ type: 'number',
1550
+ description: 'Targets a specific page by ID.',
1551
+ required: true,
1552
+ },
1553
+ },
1242
1554
  },
1243
1555
  select_page: {
1244
1556
  description: 'Select a page as a context for future tool calls.',
@@ -1259,9 +1571,15 @@ export const commands = {
1259
1571
  },
1260
1572
  },
1261
1573
  take_heapsnapshot: {
1262
- description: 'Capture a heap snapshot of the currently selected page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.',
1574
+ description: 'Capture a heap snapshot of the target page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.',
1263
1575
  category: 'Memory',
1264
1576
  args: {
1577
+ pageId: {
1578
+ name: 'pageId',
1579
+ type: 'number',
1580
+ description: 'Targets a specific page by ID.',
1581
+ required: true,
1582
+ },
1265
1583
  filePath: {
1266
1584
  name: 'filePath',
1267
1585
  type: 'string',
@@ -1274,6 +1592,12 @@ export const commands = {
1274
1592
  description: 'Take a screenshot of the page or element.',
1275
1593
  category: 'Debugging',
1276
1594
  args: {
1595
+ pageId: {
1596
+ name: 'pageId',
1597
+ type: 'number',
1598
+ description: 'Targets a specific page by ID.',
1599
+ required: true,
1600
+ },
1277
1601
  format: {
1278
1602
  name: 'format',
1279
1603
  type: 'string',
@@ -1309,9 +1633,15 @@ export const commands = {
1309
1633
  },
1310
1634
  },
1311
1635
  take_snapshot: {
1312
- 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).',
1636
+ 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).',
1313
1637
  category: 'Debugging',
1314
1638
  args: {
1639
+ pageId: {
1640
+ name: 'pageId',
1641
+ type: 'number',
1642
+ description: 'Targets a specific page by ID.',
1643
+ required: true,
1644
+ },
1315
1645
  verbose: {
1316
1646
  name: 'verbose',
1317
1647
  type: 'boolean',
@@ -1342,6 +1672,12 @@ export const commands = {
1342
1672
  description: 'Type text using keyboard into a previously focused input',
1343
1673
  category: 'Input automation',
1344
1674
  args: {
1675
+ pageId: {
1676
+ name: 'pageId',
1677
+ type: 'number',
1678
+ description: 'Targets a specific page by ID.',
1679
+ required: true,
1680
+ },
1345
1681
  text: {
1346
1682
  name: 'text',
1347
1683
  type: 'string',
@@ -1384,6 +1720,12 @@ export const commands = {
1384
1720
  description: 'Upload a file through a provided element.',
1385
1721
  category: 'Input automation',
1386
1722
  args: {
1723
+ pageId: {
1724
+ name: 'pageId',
1725
+ type: 'number',
1726
+ description: 'Targets a specific page by ID.',
1727
+ required: true,
1728
+ },
1387
1729
  uid: {
1388
1730
  name: 'uid',
1389
1731
  type: 'string',
@@ -1405,4 +1747,4 @@ export const commands = {
1405
1747
  },
1406
1748
  },
1407
1749
  };
1408
- //# sourceMappingURL=chrome-devtools-cli-options.js.map
1750
+ //# sourceMappingURL=cli-options.js.map