DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to get a compact semantic tree of a page for a model with Moli

Export a short structured text outline of a page, sized for model context windows.

Short answer: Install the Moli binary using the installer from the README; then run moli fetch --dump semantic_tree_text --wait-selector body https://example.com to return the semantic tree; Swap in your target URL and, if the page loads content late, change the selector to one that appears only after the content is ready. All steps.

  • Research
  • Intermediate
  • 15 minutes
  • From the README
  • Any agent

Who it is forAn engineer building a browser-use agent who needs the agent to see page structure instead of pixels or full HTML.

The problemFull DOM dumps overflow the context window, and screenshots cost more to process than the agent needs.

The outcomeA compact semantic tree printed as text that lists the page structure the agent can act on.

What you need first

  • A computer running Linux, macOS, or Windows
  • Terminal access (PowerShell on Windows)
  • Permission to download and run the Moli installer from GitHub
  • A URL to fetch or test

Steps

  1. Install the Moli binary using the installer from the README.
  2. Run moli fetch --dump semantic_tree_text --wait-selector body https://example.com to return the semantic tree. (inferred, check the README)
  3. Swap in your target URL and, if the page loads content late, change the selector to one that appears only after the content is ready.

Prompt for your agent

Using the repo lexmount/moli, run `moli fetch --dump semantic_tree_text --wait-selector body <target-url>`. Return the semantic tree text. Verify that headings and links from the page appear in the output.

Caveat. The README describes the semantic tree as model-friendly but does not give a size limit, so check the output length against your model's context window.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for lexmount/moli and "Get a compact semantic tree of a page for a model"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer