Skip to main content
Glama

web_fetch

Read-only

Fetch a URL and return its main content as Markdown, PDF, or structured rows. Use query, CSS selectors, or token limits to extract only relevant blocks, tables, or data.

Instructions

Fetch one URL and return its main content as markdown (PDF and office documents too), or as rows with schema or tables. The default way to read a page: mode=auto climbs http -> browser -> stealth -> real -> warm, remembers the working tier per domain, and is never set by hand. Cut tokens with query (keep only relevant blocks), css_selector, max_tokens + cursor (page through), or out_file (write to disk, return a path). To click use web_snapshot; for the site's JSON API use web_capture; for several known URLs use web_fetch_many. Returns content, title, tier_used and quality; links to the page's own site are paths, to be joined to url. A wall returns blocked_reason and a note saying what to do: act on it, never retry blindly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe page. Also `raw:<html>` for markup you already have (no request is made) and `file:///path` for a local file under `~/.svipall/in` or a configured `local_roots` entry.
bodyNoRequest body for POST/PUT (http tier only).
modeNoLeave unset: auto learns the tier per domain. Forcing one (http, browser, stealth, real, warm) is for debugging and is slower or weaker.
cacheNoauto (default: serve a fresh copy, revalidate a stale one), read, write, bypass, refresh.
proxyNoProxy URL for this fetch only; web_route sets one per domain.
queryNoKeep only the blocks relevant to these words (BM25), e.g. "shipping costs". The cheapest way to read a long page for one fact, and how much it saves is decided by the query, not the page: measured on two long articles, "robots.txt" and "caching headers" left 6% and 13% of the page, while "history of scraping" left 88%. Name the fact, not the topic.
cursorNoContinue a truncated response from where it stopped: the `cursor` of the previous result.
methodNoHTTP method for the http tier: GET (default), POST, PUT, DELETE, HEAD.
mobileNoAsk as a phone: phone identity and viewport. Only worth it where a site serves a lighter page to phones — a responsive site, which is most of them, returns the same bytes: measured byte-identical on two sites at both the http and browser tiers. It also costs a browser page of its own, since no warm page is reused, and rules out the native last resort.
robotsNorobots.txt policy: warn (default: fetch, and say whether robots.txt disallows it), obey (refuse a disallowed URL), ignore.
schemaNoRows instead of prose, returned as `extracted`. E.g. `{"name": "products", "base_selector": "div.product", "fields": [{"name": "title", "selector": "h2 a"}, {"name": "url", "selector": "a", "type": "attribute", "attribute": "href"}]}`; types text (default), attribute, number, exists, list, html, markdown. A named schema is remembered per domain, and a selector a redesign breaks is relocated and reported as `healed`.
scrollNoScroll a page that loads as you go before reading it: "auto" until it stops growing (up to 40 screens, one "load more" click), or a number of rounds. Implies a browser tier.
tablesNoReturn the page's data tables as typed rows, `tables: [{caption, header, rows}]`, instead of prose: a fraction of the markdown, columns kept. Layout tables are skipped.
headersNoExtra request headers (http tier only).
profileNoProfile saved by web_login whose cookies to use. Implies a browser tier.
timeoutNoTimeout in ms for the whole ladder. Default 60000.
isolatedNoA throwaway browser profile for this fetch alone: no cookies in, nothing left behind.
max_tierNoHighest tier the ladder may climb to: http, browser, stealth, real, warm (default).
out_fileNoWrite the content to this file and return the path instead: measured, a 418-character response against the 34 746 characters of the page it wrote. Relative paths land in ~/.svipall/out/. With `schema` or `tables` a .csv, .json or .jsonl name writes the rows in that format.
text_onlyNoSkip images, fonts, stylesheets and video in browser tiers. Faster on heavy pages; off by default because some anti-bot scripts notice a page whose images never loaded.
extractionNomarkdown (default), text, or html (the raw markup, many times the tokens).
max_tokensNoCap on the content returned, cut on block boundaries. Default 25000. A truncated result carries a `cursor`.
css_selectorNoKeep only the elements this CSS selector matches, e.g. "article" or "#prices".
include_linksNoAdd `links`, split into internal and external, plus images.
include_qualityNoAdd `quality_detail`: integrity verdict with reasons, optimisation traits, near-duplicates in the cache, provenance (byline, date, citations). For judging a source; the compact `quality` field is always present.
include_metadataNoAdd `metadata`: canonical URL, language, author, dates, OpenGraph, JSON-LD, feeds.
main_content_onlyNoDrop navigation, footers and sidebars. Default true; false returns the whole body.
use_site_templateNoStrip what this site repeats on every page (banners, footers), learned from earlier fetches of the same site. Off by default: it can take a word of real content with it. A response it changed says `"template": {"learned_from": 16, "removed_blocks": 3}`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.3

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnly and openWorld annotations, it discloses the automatic tier ladder, per-domain tier memory, token-reduction options, default return fields, link handling, and blocked-response behavior. The instruction to act on blocked_reason/note and never retry blindly is important operational guidance.

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 dense but front-loaded: purpose first, then default behavior, token controls, sibling routing, return fields, and failure handling. Every sentence contributes useful context for a 28-parameter fetch tool.

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?

For a complex open-world fetch tool with no output schema, the description covers the main behavior, default return shape, blocked-case behavior, and sibling alternatives. The remaining parameter and output details are fully covered by the rich input schema.

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 the baseline is already strong. The description adds high-level semantics for key parameters such as query, css_selector, max_tokens/cursor, out_file, schema, tables, and mode, though the detailed per-parameter semantics still come primarily from the schema.

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 states a specific verb and resource: fetch one URL and return its main content as markdown, PDF/office, or rows via schema/tables. It also distinguishes itself from web_snapshot, web_capture, and web_fetch_many, so an agent can identify its role without opening the 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?

It explicitly calls itself the default way to read a page and explains that mode=auto should be used rather than set by hand. It names alternatives for clicking, JSON APIs, and multiple known URLs, giving clear when-to-use and when-not-to-use guidance.

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