{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "lexmount-moli--get-compact-semantic-tree-for-llm",
 "repo": "lexmount/moli",
 "repo_url": "https://github.com/lexmount/moli",
 "repo_slug": "lexmount-moli",
 "title": "Get a compact semantic tree of a page for a model",
 "page_title": "How to get a compact semantic tree of a page for a model with Moli",
 "summary": "Export a short structured text outline of a page, sized for model context windows.",
 "who": "An engineer building a browser-use agent who needs the agent to see page structure instead of pixels or full HTML.",
 "problem": "Full DOM dumps overflow the context window, and screenshots cost more to process than the agent needs.",
 "outcome": "A compact semantic tree printed as text that lists the page structure the agent can act on.",
 "steps": [
  "Install the Moli binary using the installer from the README.",
  "Run `moli fetch --dump semantic_tree_text --wait-selector body https://example.com` to return the semantic tree. (inferred, check the README)",
  "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."
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "15 minutes",
 "basis": "readme",
 "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.",
 "category": "Research",
 "tags": [
  "Research"
 ],
 "lang": "rust",
 "requirements": [
  "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/lexmount-moli/get-compact-semantic-tree-for-llm/",
 "md": "https://dedupedai.com/use-cases/lexmount-moli/get-compact-semantic-tree-for-llm/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/lexmount-moli--get-compact-semantic-tree-for-llm.json",
 "api_version": "v1"
}
