Skip to main content
Glama

fetch_webpage

Primary webpage and PDF retrieval tool. Use by default to fetch any public HTTP/HTTPS webpage or PDF and return clean text, Markdown, links, and metadata. Uses fast HTTP first and automatically falls back to an isolated headless browser for JavaScript-rendered pages. (Use webpage_to_markdown or extract_webpage_text for token-saving single-format output, or render_webpage when you need raw rendered HTML DOM.)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "fetch_webpage"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesPublic HTTP or HTTPS URL of a webpage or PDF to retrieve.
scrollNoScroll down to trigger lazy-loaded content before extraction.
wait_msNoOptional extra wait in milliseconds (0-5000) after page load.
max_charsNoMaximum characters returned for content and Markdown.
force_browserNoStart with browser rendering instead of fast HTTP retrieval.
dismiss_cookiesNoAttempt to dismiss cookie/GDPR banners before extraction.
only_main_contentNoExtract only main article/content (strips nav, footer, aside).
wait_for_selectorNoOptional CSS selector to wait for before extraction.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / dismiss_cookies
      Added value: +{
      +  "default": true,
      +  "description": "Attempt to dismiss cookie/GDPR banners before extraction.",
      +  "title": "Dismiss Cookies",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / only_main_content
      Added value: +{
      +  "default": true,
      +  "description": "Extract only main article/content (strips nav, footer, aside).",
      +  "title": "Only Main Content",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / scroll
      Added value: +{
      +  "default": false,
      +  "description": "Scroll down to trigger lazy-loaded content before extraction.",
      +  "title": "Scroll",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / wait_for_selector
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxLength": 256,
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional CSS selector to wait for before extraction.",
      +  "title": "Wait For Selector"
      +}
    • addedInput schema / properties / wait_ms
      Added value: +{
      +  "default": 0,
      +  "description": "Optional extra wait in milliseconds (0-5000) after page load.",
      +  "maximum": 5000,
      +  "minimum": 0,
      +  "title": "Wait Ms",
      +  "type": "integer"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / force_browser / description
      Added value: +"Start with browser rendering instead of fast HTTP retrieval."
    • addedInput schema / properties / max_chars / description
      Added value: +"Maximum characters returned for content and Markdown."
    • addedInput schema / properties / url / description
      Added value: +"Public HTTP or HTTPS URL of a webpage or PDF to retrieve."
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full behavioral burden and does disclose meaningful traits: an HTTP-first path with automatic headless-browser fallback for JavaScript-rendered pages, and the shape of returned content. It omits failure/blocking behavior (paywalls, 403s, rate limits, timeouts) that an agent would want before retrying, so it falls short of fully transparent.

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, front-loaded with the primary role before the alternatives, and the alternatives are compressed into a single parenthetical with a reason attached to each. No redundant restatement of the tool name or of schema fields.

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 an 8-parameter fetch tool with no output schema, the description covers routing, retrieval strategy, and return format, which is the core an agent needs. Minor gaps are error/failure semantics and any content-size or truncation behavior tied to max_chars, but the rich schema fills most of the remaining space.

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% and every parameter (scroll, wait_ms, max_chars, force_browser, dismiss_cookies, only_main_content, wait_for_selector) is documented in the schema itself. The description adds no parameter-level meaning of its own — e.g. it never mentions that force_browser skips the fast HTTP path or how max_chars interacts with truncation — so the baseline of 3 applies.

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?

States a specific verb and resource ('public webpage or PDF retrieval') plus the returned artifacts (clean text, Markdown, links, metadata). It also explicitly positions itself as the default among the named siblings (webpage_to_markdown, extract_webpage_text, render_webpage), so an agent can route without opening any 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?

Gives an explicit default rule ('Use by default to fetch any public HTTP/HTTPS webpage or PDF') and names the exact conditions that select each alternative (single-format token saving vs raw rendered HTML DOM). This is when-to-use plus when-to-use-something-else, not just implied context.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.