You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -319,9 +322,33 @@ Check the performance of https://developers.chrome.com
319
322
320
323
Your MCP client should open the browser and record a performance trace.
321
324
322
-
> [!NOTE]
325
+
> [!NOTE]
323
326
> The MCP server will start the browser automatically once the MCP client uses a tool that requires a running browser instance. Connecting to the Chrome DevTools MCP server on its own will not automatically start the browser.
324
327
328
+
## Token Optimization (Fork Enhancement)
329
+
330
+
This fork includes token optimization features inspired by [fast-playwright-mcp](https://github.com/nicobailon/fast-playwright-mcp).
331
+
332
+
### Snapshot Truncation
333
+
334
+
Use the `maxLength` parameter with `take_snapshot` to limit output size:
335
+
336
+
```
337
+
Take a snapshot with maxLength of 5000 characters
338
+
```
339
+
340
+
The snapshot will be truncated with a notice if it exceeds the limit. This is useful for large pages where you only need a summary.
341
+
342
+
### Future Enhancements
343
+
344
+
The infrastructure for more token optimization features is in place:
345
+
346
+
-**expectation schema**: Control which content to include in responses (snapshot, console, network, tabs)
347
+
-**snapshotOptions**: Limit snapshot scope by CSS selector or max length
348
+
-**imageOptions**: Control screenshot format, quality, and dimensions
349
+
350
+
See `src/expectation.ts` for the full schema and tool defaults.
351
+
325
352
## Tools
326
353
327
354
If you run into any issues, checkout our [troubleshooting guide](./docs/troubleshooting.md).
0 commit comments