Skip to content

Conversation

DokiDoki1103
Copy link

Add tools to retrieve details of a request, such as request header, request body, response header, and response body

@DokiDoki1103
Copy link
Author

@microsoft-github-policy-service agree


try {
const contentType = resHeaders['content-type'] || '';
if (contentType.includes('application/json') || contentType.includes('text/')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you mostly want it for fetch requests? I think LLM will try to call it for other types of resources, and that is fine. When calling it for JS it'll hit the context limit though. If we are doing it, we should make body optional and introduce pagination. It'll grow into a large change and require tests. I'd suggest that you file it at https://github.com/microsoft/playwright-mcp and let us do consider doing it. We rarely succeed at accepting the third party patches of this size / complexity.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

playwright-mcp the project has been moved to this project. Should I pull it to the MCP project?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should file an issue at https://github.com/microsoft/playwright-mcp, don't create PRs yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants