Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Web Tools

fetch_url

Fetch a web page and return its content as markdown text.

Permission: Read

Parameters

NameTypeRequiredDescription
urlstringyesThe URL to fetch
max_lengthintegernoMaximum characters to return (default: 30000, 0 for no limit)
headersobjectnoCustom HTTP headers (overrides defaults like User-Agent)
regexstringnoIf provided, return only matching content (matches joined by newlines)
rawbooleannoReturn raw HTML instead of converting to markdown (default: false)
scratchpadstringnoSave output to the scratchpad under this name

Behavior

  • Fetches the page via HTTP GET.
  • Converts HTML to Markdown using fast_html2md (unless raw is true).
  • Truncates the output to max_length characters (default: 30,000).
  • HTTP timeout: 30 seconds.
  • Returns the HTTP status code as an error if the request fails (e.g., 404, 500).

Image URLs

If the response Content-Type is a supported raster image format, fetch_url returns a multimodal Image content block instead of markdown. No disk is touched — bytes are base64-encoded in memory.

Provider-native formats (passed through unchanged):

  • image/png, image/jpeg (and image/jpg), image/gif, image/webp, image/bmp (and image/x-ms-bmp)

Convertible formats (decoded and re-encoded as PNG transparently):

  • image/tiff, image/vnd.microsoft.icon / image/x-icon, image/vnd.radiance (HDR), image/x-exr, image/x-targa, image/x-portable-* (PNM), image/qoi, image/vnd.ms-dds, image/x-farbfeld

Unsupported formats (fall through to the text branch): image/svg+xml, image/jxl, image/heic, image/avif.

  • The max_length, regex, and raw options do not apply to image responses.
  • Size cap of ~3.75 MB applies to the output bytes (after conversion). Conversion can enlarge an image, so a 1 MB TIFF may produce a larger PNG.
  • Detection uses the response’s actual Content-Type header, so redirect chains and extension-less URLs are handled correctly.

Only fetch image URLs when the current model supports vision input — text-only models will either error or silently drop the image block.


Search DuckDuckGo and return the top results.

Permission: Read

Parameters

NameTypeRequiredDescription
querystringyesThe search query
headersobjectnoCustom HTTP headers (overrides defaults like User-Agent)
scratchpadstringnoSave output to the scratchpad under this name

Behavior

  • Returns up to 10 results per search.
  • Each result includes the title, source domain, URL, and a snippet with matched terms emphasised in bold.
  • Snippets are capped at 300 characters; use fetch_url on the result URL for the full page.
  • Uses HTML scraping (no API key required).
  • HTTP timeout: 30 seconds.

CAPTCHA detection

DuckDuckGo occasionally serves a bot-challenge page instead of results (detected by the anomaly-modal element). web_search returns a distinct error so the agent doesn’t silently retry:

DuckDuckGo served a CAPTCHA challenge (bot detection / rate limit).
Retry later.

If this happens often in your environment, configure a search-capable MCP server — see the MCP configuration examples for patterns that work well.