文件历史

提交图

16 次代码提交

作者 SHA1 备注 提交日期
Jack Franklin b2e1e3944c fix: roll latest DevTools to handle Insight errors (#149)
This commit updates DevTools to the latest release. This most
importantly includes a fix for #124 and other reported issues where
Insights that were actually errors were not handled correctly. They are
now formatted correctly on the DevTools side and now will not break
performance traces in the MCP server.
2025-09-25 18:25:35 +02:00
Nikolay Vitkov 15277541d8 chore: add additional EsLint rule (#147) 2025-09-25 17:20:01 +02:00
Oz Tamir 4c909bb8d7 feat: Add pagination list_network_requests (#145)
## Summary

This PR enhances the `list_network_requests` tool with pagination
support to handle large numbers of network requests efficiently. See
[this
issue](https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/136).

## Motivation

In my experience, the `list_network_requests` tool frequently hits LLM
token limits on pages with many requests, making it unusable for modern
web applications. I wanted to add pagination to allow agents to be more
flexible and manage token limits on their own.

## Changes

### Pagination Support
- Added `pageSize` parameter to limit requests per call
- Added `pageToken` parameter for navigation between pages
- Added pagination metadata in responses (nextPageToken,
previousPageToken, startIndex, endIndex, total)

### Implementation Details
- **New utility**: `src/utils/pagination.ts` - generic pagination
function
- **Enhanced McpResponse**: Added pagination options to
`setIncludeNetworkRequests()`
- **Updated network tool**: Added pagination parameters to schema
- **Offset-based pagination**: Uses numeric tokens, handles invalid
tokens gracefully

## Testing
- Comprehensive test coverage for pagination scenarios
- Tests for first page, subsequent pages, invalid tokens, and edge cases
- All existing tests continue to pass

## Backward Compatibility
- If no pagination parameters are provided, the MCP will return all
requests (same as before)
2025-09-25 16:26:43 +02:00
Alex Rudenko 44cfc8f945 fix: avoid reporting page close errors as errors (#127)
Closes https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/125
2025-09-25 10:40:51 +00:00
Alex Rudenko adfcecf987 fix: validate and report incompatible Node versions (#113)
Ref https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/92
2025-09-24 14:45:27 +02:00
Alex Rudenko 0ca2434a29 fix: forbid closing the last page (#90)
McpContext currently assumes that there is a page. Eventually we might
support closing the browser by closing the last page but right now we do
not really have responses that indicate that the browser was closed. So
this PR helps the LLM understand that it is okay to keep the last page
running (and there are platform-specific differences as to what happens
if the last page is closed).

Ref https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/87
2025-09-24 07:23:53 +00:00
Jack Franklin e8fb30c1bf fix: rework performance parsing & error handling (#75)
This PR tidies up the code around performance parsing and what we
respond with from our tools. It introduces the ability to have no
Insights from a trace (relatively rare, but can happen), and also adds
more information to the output in the event that something went wrong.

Previously we just logged errors, but if we respond with them here that
will also help users report issues and increase the chances that we can
debug them.
2025-09-23 15:42:35 +02:00
Alex Rudenko 91d83c4190 test: fix shell for windows tests (#72) 2025-09-23 09:37:22 +02:00
Nikolay Vitkov 1e8662f068 fix(emulation): correctly report info for selected page (#63)
Previously if one page was setting emulation all were reporting it.
2025-09-22 16:03:47 +02:00
Jack Franklin b830b436f9 chore: roll devtools-frontend and update snapshots (#59) 2025-09-22 09:29:21 +00:00
Jack Franklin 21e175b862 feat: add performance_analyze_insight tool. (#42) 2025-09-17 12:25:40 +00:00
Alex Rudenko c663f4d7f9 feat: support script evaluate arguments (#40)
This change allows clients to pass snapshot elements as arguments.
2025-09-16 17:44:53 +02:00
Alex Rudenko 014a8bc52e feat: validate uids (#37)
- generate snapshot IDs.
- change uid to be a string.
- validate that uid is not coming from a stale snapshot.
2025-09-16 11:54:35 +00:00
Alex Rudenko 3fcea791eb chore: roll puppeteer (#25)
This should solve flakiness related to multiple browser instances.
2025-09-15 16:12:13 +02:00
Alex Rudenko e5e0616433 chore: switch to spec and clean up deps (#17) 2025-09-15 11:18:32 +02:00
Alex Rudenko 31a0bdce26 feat: initial version 2025-09-11 12:46:05 +02:00