豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

The agent uses library-specific pseudo-classes (like :contains) that are invalid in native querySelector. #1895

@zyzyzyryxy

Description

@zyzyzyryxy

Description of the bug

Example tool (mis)use:

{
  "name": "mcp_chrome-devtools_evaluate_script",
  "args": { "function": "() => document.querySelector('th:contains(\"UPC\") + td').innerText" }
}

This happened without prior chrome-devtools skill activation.

Reproduction

Prompt the agent to search for specific information on a page for which it has high confidence of knowing the exact structure (and thus attempting to make targeted read)

Expectation

Tool description should provide more detailed description for the context scripts will be evaluated in.

MCP configuration

any

Chrome DevTools MCP version

v0.20.1

Chrome version

No response

Coding agent version

gemini-cli

Model version

gemini-2.5-flash

Chat log

No response

Node version

No response

Operating system

None

Extra checklist

  • I want to provide a PR to fix this bug

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions