Skip to main content
Glama

Clone a website section

clone_section

Extract a section from any webpage into a standalone snippet: cleaned HTML, scoped CSS, assets, and screenshot. Rewrites asset URLs for portability.

Instructions

Return a self-contained copy of one section: cleaned HTML (scripts/handlers stripped, inline SVG preserved), scoped CSS matching that subtree plus the @keyframes/@font-face it depends on, its assets, and a screenshot. With outputDir the assets are downloaded and URLs rewritten to relative paths, yielding a snippet that renders standalone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesAbsolute http:// or https:// URL to clone from.
selectorYesCSS selector for the section to clone.
maxAssetsNoMaximum assets to download when outputDir is set.
outputDirNoAbsolute directory to download the section's assets into (URLs are rewritten to relative paths).
timeoutMsNoNavigation timeout in milliseconds.
userAgentNoOptional browser user-agent override.
waitUntilNoPage lifecycle event to await before extraction.domcontentloaded
autoScrollNoScroll through the page before extraction to trigger lazy-rendered content.
maxScrollsNoMaximum viewport-sized scroll steps when autoScroll is enabled.
viewportWidthNoBrowser viewport width in CSS pixels.
viewportHeightNoBrowser viewport height in CSS pixels.
maxBytesPerAssetNoSkip assets larger than this.
includeScreenshotNoInclude a screenshot of the cloned section.
allowPrivateNetworkNoAllow localhost and private-network URLs. Enable only for trusted sites.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Beyond the annotations, the description discloses meaningful behavior: scripts/handlers are stripped, inline SVG is preserved, CSS is scoped to the matched subtree and its @keyframes/@font-face dependencies, and assets are downloaded/rewritten when outputDir is set. This gives the agent a clear model of what transformations occur, though it does not touch on rate limits or overwrite behavior.

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 two sentences and front-loaded with the primary action, followed by a precise list of outputs and the outputDir conditional. Every clause adds information—there is no filler or repetition of the tool title.

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?

For a tool with 14 parameters, rich schema descriptions, an output schema, and annotations, the description efficiently covers the core output contract and the key mode switch (outputDir). It leaves edge-case behavior (e.g., asset embedding without outputDir) to the output schema/schema defaults, which is acceptable.

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?

The input schema achieves 100% description coverage for all 14 parameters, so the baseline is 3. The description only refreshes the meaning of outputDir (downloading and rewriting asset URLs) and does not add new semantics for individual parameters beyond what their schema descriptions already state.

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 opens with 'Return a self-contained copy of one section' and enumerates the exact contents: cleaned HTML, scoped CSS with keyframes/font-face, assets, and screenshot. This clearly distinguishes it from siblings like capture_screenshot or extract_assets by focusing on a fully standalone section clone.

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

Usage Guidelines3/5

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

The explanation of the outputDir mode ('With outputDir the assets are downloaded and URLs rewritten...') gives conditional guidance, but there is no explicit statement of when to choose clone_section over alternatives like extract_assets or inspect_component. Usage context is implied rather than directly contrasted with sibling tools.

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/blackridder22/PicassoWeb'

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