Skip to main content
Glama

fetch

Fetch a URL and return clean markdown with caching, JS rendering, and site-specific data 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/browser), http_status (upstream HTTP code — 4xx/5xx pages that extract usable content are not relabeled 200), and content_completeness (full/partial/shell). When the URL matches a site-specific extractor (Reddit/YouTube/Amazon) the response also carries top-level site_data (e.g. Reddit comments[], YouTube caption_tracks[], Amazon 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. Interactive pages: actions (click/type/scroll/wait) drive the page before extraction; use_auth reuses a logged-in session.

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 thoroughly explains caching behavior, section extraction smart truncation, auth reuse, JS rendering, mode differences, return fields (including fetch_method, http_status, content_completeness), site-specific extractors, and edge cases like empty markdown when section doesn't match. All relevant behavioral traits are disclosed.

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 longer than average but well organized: a one-sentence summary, a paragraph on key parameters, then return fields, site-specific behaviors, and edge cases. Every sentence adds value, though minor trimming could improve succinctness.

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, 100% schema coverage, and no output schema, the description is remarkably complete. It covers all key behaviors, parameter interactions, return fields, sibling differentiation, and edge cases. No gaps are apparent for an AI agent to use the tool correctly.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds significant meaning: explains the interaction between max_tokens_out and max_chars, the effect of include_full_markdown default, the meanings of mode values, and how actions bypass HTTP-first routing. This goes well beyond the schema descriptions.

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 'Fetch a single URL and return clean markdown,' specifying verb and resource. It distinguishes from sister tool 'WebFetch' by listing advantages like local-cache reuse, authenticated pages, JS-rendered SPAs, and structured metadata. This makes the tool's unique purpose immediately clear.

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 explicitly says 'Use when you already have a URL' and advises 'Prefer over built-in WebFetch...' providing clear context for when to use this tool over alternatives. It does not explicitly list exclusions, but the guidance is strong.

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