文件历史

提交图

10 次代码提交

作者 SHA1 备注 提交日期
Alex Rudenko 36e64d5ae2 feat: support timeouts in wait_for and navigations (#228)
Closes https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/223
Closes https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/116
2025-10-01 10:48:53 +02:00
Alex Rudenko 205eef5cdf fix: reference to handle_dialog tool (#209) 2025-09-29 14:12:05 +00:00
Oz Tamir 59d81a3325 feat: add network request filtering by resource type (#162)
### Summary
This PR build upon #145 to also adds filtering by resource type to
`list_network_requests` (Also see: #137 and #107).

### Motivation
Agents often need specific request types (e.g., scripts, stylesheets,
images). Filtering reduces noise and improves performance.

### Changes
- **New parameter**: `resourceType` (array) to filter by resource types
- **Supported types**: all resource types supported by Puppeteer
- **Backward compatible**: when omitted, returns all requests

Filtering runs before pagination, so pagination applies to the filtered
results.
2025-09-26 13:17:58 +00: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 1a4ba4d3e0 fix: add a message indicating that no console messages exist (#91)
To avoid clients being confused about the lack of console messages.

Closes https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/87
2025-09-23 22:10:46 +02:00
Nikolay Vitkov 0208bfdcf6 fix: expose timeout when Emulation is enabled (#73)
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
2025-09-23 11:17:53 +02:00
Alex Rudenko a9cf9d77f7 test: await dialog dismiss to prevent async activity errors (#70) 2025-09-22 17:11:04 +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 31a0bdce26 feat: initial version 2025-09-11 12:46:05 +02:00