Skip to main content
Glama
helmif

semantic-dom-mcp

by helmif

extract_semantic_dom_after

Perform a sequence of fill, click, press, or wait actions on a page, then extract the semantic DOM of the resulting state. Captures post-interaction UI like toasts, validation messages, and opened dialogs after form submissions.

Instructions

Like extract_semantic_dom, but first performs a short DECLARED list of actions (fill/click/press/wait) in the main frame, then returns Semantic JSON of the RESULTING state. Use it for post-interaction UI a plain snapshot cannot see: success/error toasts, validation messages, opened dialogs. Derive action locators from a prior extract_semantic_dom call. The page must remain on allowlisted hosts after the actions, or nothing is extracted. Uniqueness reflects capture time — accumulating UI (chat threads, lists) can multiply matches later.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe page to extract. Must be http/https and on an allowlisted host.
actionsYesDeclared actions executed in order in the MAIN frame after navigation.
viewportNoViewport preset — 'mobile' is 375x812 with touch, for responsive states.desktop
wait_forNoNavigation wait condition.networkidle
max_nodesNoCap on extracted nodes; truncation is flagged, never silent.
settle_msNoWait after the last action before snapshotting (for toasts/animations).
wait_selectorNoOptional selector to await before extracting (for SPA content).
include_hiddenNoKeep hidden nodes flagged rather than dropping them.
wait_selector_afterNoSelector to await (visible) AFTER the actions, before snapshotting — deterministic wait for late-rendering toasts/modals instead of guessing settle_ms.
include_click_targetsNoOpt-in heuristic: also include cursor:pointer elements with content that match no other rule (JS-click product cards without anchors/roles/test-ids). Heuristic nodes carry a context_note.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description carries the full burden. It discloses that uniqueness reflects capture time and that accumulating UI can multiply matches later. It also mentions the allowlist restriction. It does not explicitly describe side effects of actions, but the actions are declarative and the tool focuses on extraction, so the transparency is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with four sentences, each adding value. It front-loads the comparison to extract_semantic_dom and efficiently conveys the tool's purpose and key constraints.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (10 parameters, no output schema), the description explains the core functionality, use cases, and behavioral nuances. It implies the return format is the same as extract_semantic_dom, which is sufficient. Minor gaps like explicit return format details are covered by the sibling reference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the description adds limited value beyond the schema. It does provide context for the actions parameter (derive from prior extraction, main frame). Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that this tool is like extract_semantic_dom but performs actions first and returns Semantic JSON of the resulting state. It specifies use cases like seeing success/error toasts, validation messages, and opened dialogs, which distinguishes it from the sibling extract_semantic_dom.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says when to use this tool (for post-interaction UI) and provides guidance on deriving action locators from a prior extract_semantic_dom call. It also notes the allowlisted host requirement. However, it does not explicitly state when not to use it or compare to other siblings like check_auth or list_frames.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/helmif/semantic-dom-mcp'

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