Skip to main content
Glama

fetch_url

Retrieve and extract readable markdown from a URL, using GitHub-aware handling and a fallback cascade; enforce token limits, cache results for 24 hours, and refuse blocked or private addresses.

Instructions

Fetch and extract readable content from any URL. GitHub repo, file, directory and release URLs are fetched via the GitHub API; all other URLs (including GitHub issues, PRs and commits) go through a fetch cascade: Firecrawl → Crawl4AI → raw HTTP. Returns clean markdown where possible. Content is trimmed to a token budget (default ~2000 tokens / 8000 chars; raise with max_tokens). Results cached for 24 hours. Blocked domains and private/internal addresses are refused.

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_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesURL to fetch and extract content from
max_tokensNoApproximate token budget for the returned content (chars ≈ tokens × 4). Omit for the ~2000-token / 8000-char default; max 10000 tokens.
domain_profileNoNamed domain profile to apply: 'homelab', 'dev', or omit for default filters
target_selectorNoCSS selector to scope extraction to a specific element (e.g. 'article', 'main .content'). Honored by Firecrawl/Crawl4AI and applied client-side on the raw-HTTP tier; ignored by fast paths and if it matches nothing.
wait_for_selectorNoCSS selector to wait for before extracting, for JS-rendered pages. Honored by the rendering tiers (Firecrawl/Crawl4AI); ignored on raw HTTP (no JS).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.32.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed3 schema fields changedv3.15.1
    • addedInput schema / properties / max_tokens
      Added value: +{
      +  "description": "Approximate token budget for the returned content (chars ≈ tokens × 4). Omit for the ~2000-token / 8000-char default; max 10000 tokens.",
      +  "maximum": 10000,
      +  "minimum": 100,
      +  "type": "integer"
      +}
    • addedInput schema / properties / target_selector
      Added value: +{
      +  "description": "CSS selector to scope extraction to a specific element (e.g. 'article', 'main .content'). Honored by Firecrawl/Crawl4AI and applied client-side on the raw-HTTP tier; ignored by fast paths and if it matches nothing.",
      +  "maxLength": 500,
      +  "type": "string"
      +}
    • addedInput schema / properties / wait_for_selector
      Added value: +{
      +  "description": "CSS selector to wait for before extracting, for JS-rendered pages. Honored by the rendering tiers (Firecrawl/Crawl4AI); ignored on raw HTTP (no JS).",
      +  "maxLength": 500,
      +  "type": "string"
      +}
  3. First observedv3.12.0

TDQS

A3.5/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the behavioral load; it does so well by disclosing the routing logic (GitHub API vs Firecrawl/Crawl4AI/raw HTTP), 24-hour caching, token trimming, and refusal of blocked/private addresses. It still omits rate limits, authentication expectations, and failure behavior, which are material for an unannotated network tool.

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 paragraph is front-loaded with purpose and then layers in routing, output format, budget, cache, and security details; every sentence carries distinct information. It is dense but not bloated, though the long fetch-cascade sentence could be split for easier scanning.

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 a single-resource fetch tool with no output schema and no annotations, the definition covers the important context: extraction source, output format, token budget, caching, and security refusals. It is slightly incomplete on error/failure output and authentication/rate-limit details, but adequate for correct invocation.

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 coverage is 100%, so the input schema already documents all five parameters thoroughly. The description only reinforces max_tokens ('raise with max_tokens') and the token-budget concept, adding no meaning for domain_profile, target_selector, or wait_for_selector beyond the schema. With schema coverage this high, the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource: 'Fetch and extract readable content from any URL,' so the tool's job is immediately clear. It never contrasts with siblings such as search_and_fetch or crawl_site, however, leaving the agent to infer when a single fetch is preferred over a search or site crawl. That missing sibling differentiation keeps it below a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description contains no explicit when-to-use or when-not-to-use guidance relative to the available siblings; it only implies the tool is for any URL. It does not say whether to use this instead of search_and_fetch for a known URL or crawl_site for a whole site. This is implied usage at best.

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