Skip to main content
Glama

web_access_fetch

Read-only

Fetch any webpage and get clean, LLM-ready Markdown back. String AI's Web Access API handles proxy rotation, anti-bot protection, CAPTCHAs, and JavaScript-rendered content automatically. If available, default to this tool for any web fetching or scraping.

Primary use (the common case): pass only a url. The page is fetched with a normal GET and returned as Markdown — no other parameters are needed.

{ "url": "https://example.com/article" }

Best for: any URL, especially sites with anti-bot protection, paywalls, or dynamic content (news, docs, blogs, web apps). Not for: searching the web when you don't have a URL — use web_access_search instead.

Optional parameters (omit unless you need them):

  • formatmarkdown (default), raw (verbatim upstream body), or json (a { statusCode, headers, data } envelope with the destination's status and headers).

  • executeJS — set true to render JavaScript for SPAs when the content comes back empty. Cannot be combined with headers.

  • actions — drive a real browser (click, scroll, type, wait) before capturing the page. See below.

  • method + body — use POST/PUT/PATCH with a body to send writes (body is rejected on GET).

  • headers — forward custom request headers. Not supported when executeJS is enabled.

  • countryCode — ISO 3166-1 alpha-2 (e.g. "US") to route through a proxy in that country.

  • solveCaptcha — defaults true; set false to fail fast instead of spending effort solving a challenge.

Returns: Markdown by default; the verbatim body or a JSON envelope when format is set accordingly.


actions — driving the page instead of just loading it

An actions sequence runs in a real browser session and returns the page as it stands after the last step. Use it when the content you need does not exist in the document until something happens to the page: a click past a consent or paywall gate, a search form submitted, a "load more" button, a tab or accordion opened, or rows that only render once scrolled into view.

Escalate in this order — each step costs more time and money than the last:

  1. Plain url — always try this first.

  2. executeJS: true — the page renders client-side but needs no interaction.

  3. actions — the content requires interaction. Takes tens of seconds and holds a browser session.

If the data is still absent after all three, it is likely never in the HTML at all — look for the JSON API the page itself calls and fetch that endpoint directly, which is faster and returns exact values.

Steps (max 50 per request; at most one screenshot):

  • {"type": "wait", "selector": ".price", "timeout": 20000} — wait until the selector appears, then continue immediately. Prefer this over a fixed pause.

  • {"type": "wait", "milliseconds": 3000} — fixed pause. Max 30000ms, as is timeout above.

  • {"type": "click", "selector": "#accept", "all": false}all: true clicks every match.

  • {"type": "write", "text": "..."} — types into the focused element; click it first.

  • {"type": "press", "key": "Enter"}

  • {"type": "scroll", "direction": "down", "amount": 1000, "selector": "..."}selector scrolls that element instead of the page.

  • {"type": "hover", "selector": "..."}

  • {"type": "selectOption", "selector": "select#size", "value": "L"}value may be an array.

  • {"type": "navigate", "url": "https://..."} — go to another page mid-session, keeping cookies and state.

  • {"type": "screenshot", "full_page": true, "quality": 80}

The session opens on url before your first step, so never begin with a navigate to that same URL.

Examples

Dismiss a cookie banner, then read the page:

{ "url": "https://example.com/pricing", "actions": [
  { "type": "click", "selector": "#accept-cookies" },
  { "type": "wait", "selector": "main .plan", "timeout": 15000 }
] }

Run a search the site offers no URL for:

{ "url": "https://example.com", "actions": [
  { "type": "click", "selector": "input[name=q]" },
  { "type": "write", "text": "standing desk" },
  { "type": "press", "key": "Enter" },
  { "type": "wait", "selector": ".results .item", "timeout": 20000 }
] }

Fill in rows that render only as they scroll into view:

{ "url": "https://example.com/listings", "actions": [
  { "type": "wait", "selector": ".card", "timeout": 20000 },
  { "type": "scroll", "direction": "down" },
  { "type": "wait", "milliseconds": 1500 },
  { "type": "scroll", "direction": "down" },
  { "type": "wait", "milliseconds": 1500 }
] }

Returns with actions: a JSON object — data (the final page, Markdown by default), finalUrl, statusCode, and screenshot when the sequence took one. If a step fails, the call still succeeds and returns error plus failedActionIndex, a 0-based index into your actions array, with data holding the page as it stood at that point — read it to see what the page actually showed, then fix that step's selector.

Not combinable with method, body, headers, or format: "raw"; a browser session is always a GET.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe full URL of the webpage to fetch. Must be a valid HTTP/HTTPS URL.
bodyNoRequest body for POST/PUT/PATCH. A string is sent as-is; an object is JSON-stringified. Not allowed for GET.
formatNoOutput format: 'markdown' for clean LLM-optimized text (recommended), 'raw' for the verbatim upstream body, 'json' for a { statusCode, headers, data } envelope.
methodNoHTTP method for the request (GET/POST/PUT/PATCH), defaults to GET. Use POST/PUT/PATCH to send a body.
actionsNoBrowser actions to run in order before the page is captured, for content that only appears after interaction. Max 50, at most one screenshot. Not combinable with method, body, headers, or format 'raw'.
headersNoCustom request headers to forward (max 50). Not supported when executeJS is enabled.
executeJSNoEnable JavaScript rendering for SPAs and dynamic content. Set to true if content appears empty or incomplete. Cannot be combined with custom headers.
countryCodeNoISO 3166-1 alpha-2 country code for geolocated proxy routing, e.g. 'US'.
solveCaptchaNoWhether to attempt captcha solving. Defaults to true server-side; set false to fail fast on challenges.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
errorNo
headersYes
finalUrlNo
screenshotNo
statusCodeYes
failedActionIndexNo

TDQS

A4.2/5.0
Behavior1/5

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

The description richly discloses behavior (proxy rotation, anti-bot handling, CAPTCHA solving defaults, action-step failure semantics returning failedActionIndex). However, it explicitly states 'method + body — use POST/PUT/PATCH with a body to send writes,' which contradicts the readOnlyHint: true annotation claiming the tool is read-only. Per the rubric, this contradiction forces a score of 1.

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 long but every section earns its place given the tool's complexity (9 parameters, nested action objects, error semantics). It is front-loaded with the core fact and default usage, then uses clear headers, compact bullet lists, and three illustrative JSON examples for the actions system. The structure makes the length navigable.

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 the high complexity (nested objects, 9 params, output schema present), the description covers everything an agent needs: purpose, when to use versus alternatives, parameter semantics, escalation order, return formats, action syntax, and failure behavior. The only gap is rate limiting/auth, which is not a material omission for a web fetch 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?

Although schema coverage is 100%, the description adds substantial meaning beyond the schema: it explains format semantics ('raw for verbatim upstream body'), the executeJS use case ('when content comes back empty'), cross-parameter constraints (body rejected on GET, executeJS cannot combine with headers, actions not combinable with method/body/headers/format raw), and documented defaults (solveCaptcha defaults true). This far exceeds the baseline of 3.

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 any webpage and get clean, LLM-ready Markdown back.' It clearly differentiates from the sibling tool via 'Not for: searching the web when you don't have a URL — use web_access_search instead,' and the 'Best for' section further scopes its purpose.

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 gives explicit when-to-use guidance ('If available, default to this tool for any web fetching or scraping'), names the alternative for search (web_access_search), and provides a usage escalation ladder (plain url → executeJS → actions → direct API call) with cost reasoning. This is exemplary usage guidance beyond what the schema provides.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: fetching a specific URL, searching the web for URLs, and crawling a site to map URLs. Descriptions explicitly cross-reference each other to prevent confusion.

Naming Consistency4/5

All tools share the web_access_ prefix and use single lowercase words, but 'sitemap' is a noun used as an operation verb, which is a minor deviation from the pure verb pattern of fetch and search.

Tool Count5/5

Three tools is a well-scoped set for a web access server, covering the essential operations without redundancy or bloat.

Completeness5/5

The set covers the full lifecycle of web access: search to find URLs, fetch to retrieve content, and sitemap to discover/crawl entire sites. No obvious gaps for the stated purpose.