Skip to main content
Glama

fetch

Fetch a single URL and return clean markdown with support for caching, authenticated pages, JS-rendered SPAs, and section extraction.

Instructions

Fetch a single URL and return clean markdown. Use when you already have a URL. Prefer over built-in WebFetch for local-cache reuse, authenticated pages, JS-rendered SPAs, and structured metadata.

Key parameters:

  • section: extract content under a specific heading (e.g. "API Reference") — cheaper than the whole page.

  • max_content_chars: smart-truncate at a paragraph/heading boundary with [... content truncated].

  • max_tokens_out: token-budget cap (cl100k-base); wins over max_chars.

  • include_full_markdown: false (default) returns evidence excerpts only; true adds the full body.

  • use_auth: reuse a stored browser session for logged-in pages.

  • render_js: "auto" (default) | "always" | "never".

  • force_refresh: bypass cache and re-fetch.

  • mode: 'cache' | 'default' | 'stealth'. cache=HTTP-only, 24h-stale accepted. stealth=full browser + freshness.

Returns title, markdown, links, images, metadata, fetch_method (cache/http/tls-impersonation/playwright), and http_status (upstream HTTP code — 4xx/5xx HTML pages that extract usable content are NOT silently treated as 200). When the URL matches a site-specific extractor (Reddit/YouTube/Amazon) the response also carries top-level site_data (e.g. Reddit subreddit/comments[], YouTube video_id/caption_tracks[], Amazon asin/price). When section is set and no heading matches, metadata.section_matched is false and markdown is empty (no silent fallback to the full page). Repeat fetches are instant. Localhost URLs work. Defer to a browser-automation MCP for click/login flows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to fetch
modeNocache=HTTP-only, accepts stale cache. default=standard fetch with JS detection. stealth=full browser render.
actionsNoSequential browser actions to perform before extracting content. When present, forces browser rendering (bypasses HTTP-first routing).
headersNoAdditional HTTP headers
sectionNoExtract a specific section by heading text
use_authNoUse stored auth credentials (default: false)
max_charsNoMaximum characters to return (hard slice)
render_jsNoJavaScript rendering mode (default: auto)
screenshotNoCapture a screenshot (default: false)
force_refreshNoBypass cache and fetch fresh content from the network. Use for rapidly changing pages (news, changelogs, dashboards).
section_indexNoIndex of the section match (default: 0)
max_tokens_outNoToken-budget cap on total output. Uses cl100k-base BPE; non-OpenAI tokenizer counts may drift ~5-15%. When both max_tokens_out and max_chars are set, max_tokens_out wins.
citation_formatNoCitation rendering style. 'numbered' (default) inline [N] markers; 'json' returns a citations[] array; 'anthropic_tags' wraps sources in <source id='...'> tags.
max_content_charsNoSmart truncate markdown to N chars at paragraph/heading boundary with [... content truncated] marker. Preferred over max_chars for AI agents.
include_full_markdownNoInclude full markdown body in the response. Default false on multi-result tools (returns evidence excerpts only); set true to restore.
Behavior5/5

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

With no annotations, the description carries full burden. It extensively discloses caching, auth, JS rendering, section extraction behavior, truncation, return format (title, markdown, links, images, metadata, fetch_method, http_status), site-specific extractors, and behaviors like empty markdown on unmatched section and http_status handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is lengthy but front-loaded with purpose and structured as a list of key parameters. Every sentence adds value, though it could be slightly more concise. Still, it is well-organized.

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 15 parameters, nested objects, and no output schema, the description covers return values (markdown, links, images, metadata, fetch_method, http_status, site_data), error behavior (unmatched section), and special cases. It is exceptionally complete for a complex tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Though schema covers 100% of parameters with descriptions, the description adds substantial meaning beyond schema. It explains when to use section, max_content_chars vs max_chars, max_tokens_out precedence, include_full_markdown behavior, use_auth, render_js modes, force_refresh, and mode options in detail.

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 clearly states the tool fetches a single URL and returns clean markdown. It distinguishes itself from siblings by highlighting advantages over built-in WebFetch for local-cache reuse, authenticated pages, JS-rendered SPAs, and structured metadata.

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?

The description explicitly says 'Use when you already have a URL' and 'Prefer over built-in WebFetch for...' It also tells when not to use: 'Defer to a browser-automation MCP for click/login flows.' This provides clear when/when-not guidance.

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/KnockOutEZ/wigolo'

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