-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Problem
When using element_tool with getAllElements, the only option is query: "all" which returns every element on the page. On complex pages, this leads to:
- Massive token counts (even with
includeAllBreakpointStyles: false) - Hitting the 25k token truncation limit
- Slow responses
Proposed Solution
Add filtering options to getAllElements, for example:
{
"getAllElements": {
"query": {
"type": "div", // Filter by element type
"className": "hero", // Filter by class name
"parentId": "abc123", // Get children of specific element
"limit": 50 // Limit number of results
}
}
}Or alternatively, a separate action like getElementByClassName or getElementsByType.
Current Workaround
Using selectElement → getSelectedElement for specific elements, but this requires knowing the element ID beforehand.
Thanks for the great MCP server! 🙏
Metadata
Metadata
Assignees
Labels
No labels