Skip to main content
Glama

PlayMCP Browser Automation Server

by jomon003

getElementHierarchy

Retrieve the hierarchical structure of webpage elements, including parent-child relationships, using CSS selectors. Optional parameters allow including text content, attributes, and setting depth for detailed web analysis.

Instructions

Get the hierarchical structure of page elements with parent-child relationships

Input Schema

NameRequiredDescriptionDefault
includeAttributesNoInclude element attributes (default: false)
includeTextNoInclude text content of elements (default: false)
maxDepthNoMaximum depth to traverse (-1 for unlimited, default: 3)
selectorNoCSS selector for root element (default: 'body')

Input Schema (JSON Schema)

{ "properties": { "includeAttributes": { "description": "Include element attributes (default: false)", "type": "boolean" }, "includeText": { "description": "Include text content of elements (default: false)", "type": "boolean" }, "maxDepth": { "description": "Maximum depth to traverse (-1 for unlimited, default: 3)", "type": "number" }, "selector": { "description": "CSS selector for root element (default: 'body')", "type": "string" } }, "required": [], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jomon003/PlayMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server