Skip to main content
Glama

scrape

Read-only

Fetch a URL to get clean markdown or AI-extracted structured JSON. Enable browser rendering for JavaScript-heavy pages and login-protected content.

Instructions

Fetch a single URL and return clean markdown by default. Set generateJson=true to also extract structured data with AI. Set useBrowser=true for SPAs and JS-heavy sites (slower and more expensive — only when needed). Returns markdown unless generateJson is true, in which case it returns the structured JSON.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to scrape.
countryNoTwo-letter country code for the proxy egress location (e.g. "us", "de", "in"). Defaults to "us".us
sessionIdNoOptional saved-browser-session ID for login-protected pages. Pair with useBrowser=true.
forceFreshNoSkip the cache and refetch. Defaults to false; cached results are typically good for 24h.
useBrowserNoRender the page with a stealth headless browser. Required for SPAs and dynamic content; otherwise prefer the default (fetch-based) for speed and lower cost.
sessionNameNoOptional saved-browser-session name (alternative to sessionId).
generateJsonNoHave AI extract structured JSON from the page in addition to / instead of markdown. Use for product pages, listings, articles, anywhere the caller wants typed fields.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
cachedYesWhether this result was served from cache.
markdownYesClean markdown of the page.
durationMsYes
generatedJsonNoAI-extracted structured JSON — present only when generateJson was true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds useful behavioral context: output type depends on generateJson, browser rendering is slower and more expensive, and the default path is the fetch-based approach. It does not contradict the annotations.

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?

Three sentences, each earning its place: default behavior, optional structured output, and browser-mode guidance. The most important fact ('fetch a single URL... markdown by default') is front-loaded, and there is no filler or repetition.

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

Completeness5/5

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

Given 100% schema coverage, existing output schema, and readOnly/openWorld annotations, the description is complete enough for an agent to select and invoke the tool correctly. The description covers the main behavioral branches (markdown vs. JSON, fetch vs. browser), while the schema handles the remaining parameter details like country, session, and caching.

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 description coverage is 100%, so the baseline is 3. The description references generateJson and useBrowser, but the parameter descriptions in the schema already explain those fields with comparable detail ('Have AI extract structured JSON...' and 'Required for SPAs and dynamic content'). The description adds only mild extra meaning by tying generateJson to the return format and useBrowser to cost/expense.

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 a specific verb + resource: 'Fetch a single URL and return clean markdown by default.' It also distinguishes itself from likely siblings by emphasizing 'single URL' and by explaining the two key modes (default fetch vs. useBrowser, markdown vs. generateJson). This makes it easy for an agent to separate scrape from crawl, search, or browser_task.

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 gives clear conditional guidance: use useBrowser=true for SPAs and JS-heavy sites, and only when needed due to cost/speed; use generateJson=true for structured data. It doesn't explicitly compare against sibling tools like search or crawl, but 'Fetch a single URL' provides enough scoping to imply the tool is for one-off page fetches rather than site-wide operations.

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