Skip to contents

Built-in tool that enables Claude to fetch and read web page content.

Usage

claude_web_fetch()

Value

An ellmer tool object for use with claude_new().

Details

Allows Claude to retrieve content from URLs. Useful for reading documentation, articles, or any web-accessible content.

Unlike claude_web_search(), which searches the web, claude_web_fetch() retrieves specific URLs that you or Claude identify.

Examples

if (FALSE) { # \dontrun{
# Fetch and analyze a specific URL
chat <- claude_new(tools = list(claude_web_fetch()))
chat$chat("Read https://cran.r-project.org/web/packages/ellmer/index.html
  and summarize the package")

# Combine with web search for research workflows
chat <- claude_new(tools = list(
  claude_web_search(),
  claude_web_fetch()
))
chat$chat("Search for R package best practices, then read the top result")
} # }