Skip to main content
Glama
helmif

semantic-dom-mcp

by helmif

extract_outline

Read-onlyIdempotent

Map a web page into landmark regions, tables, dialogs, and alerts with selectors so you can scope later semantic DOM extraction.

Instructions

The page as a MAP, a few thousand characters: landmark regions (header/nav/main/forms/tables/lists/dialogs) each with a selector you can pass as scope to extract_semantic_dom / session_extract, structured tables (headers, row identity for getByRole('row', { name }), cells) and open dialogs (label/value fields), plus current alert text. Start here on any page you have not seen; then extract one region.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe page to extract. Must be http/https and on an allowlisted host.
scopeNoCSS selector to extract within — take it from an outline region's `selector` (e.g. 'main table', '[role="dialog"]'). Everything outside is skipped.
viewportNoViewport preset — 'mobile' is 375x812 with touch, for responsive states.desktop
wait_forNoNavigation wait. 'auto' (default) waits for load, then until the DOM has been quiet for 500ms (max 6s) — works on SPAs that render after load and on pages whose analytics never let the network go idle. 'networkidle' times out on such pages.auto
wait_selectorNoOptional selector to await before extracting (for SPA content).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds genuinely useful behavioral context beyond that: the output is bounded ('a few thousand characters'), which matters for context budgeting, and the region selectors are reusable downstream. It does not cover failure modes (e.g. non-allowlisted hosts, timeouts), which the schema touches on.

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

Conciseness4/5

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

Two sentences, front-loaded with the output payload and ending on the usage directive. The first sentence is densely packed with parentheticals, but every clause carries distinct information (region types, selector handoff, table/dialog/alert contents), so nothing is wasted. Slightly heavy to parse in one pass.

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?

With no output schema, the description correctly carries the return-value burden and describes the map contents well. It also explains the intended next step. It omits any mention of output size limits, truncation behavior, or error conditions for a tool that fetches an arbitrary URL, which is a minor gap for a read tool with full annotation coverage.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description goes beyond the schema by linking output to input: it explains that the `selector` in each outline region is what you pass as `scope`, which is a relationship the schema alone does not convey. It adds no new detail on viewport/wait_for, hence not a 5.

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 states exactly what the tool returns — a page 'MAP' of landmark regions, structured tables, open dialogs, and alert text — and enumerates the region types (header/nav/main/forms/tables/lists/dialogs). It also implicitly distinguishes itself from siblings by positioning itself as the first-pass survey before extract_semantic_dom/session_extract. An agent knows the resource and output shape without opening the schema.

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

Usage Guidelines5/5

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

It gives an explicit workflow rule: 'Start here on any page you have not seen; then extract one region.' It also names the follow-up tools (extract_semantic_dom / session_extract) and explains the handoff via the region `selector` passed as `scope`. When-to-use and the alternative path are both stated.

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