Make HTTP requests to external APIs and web pages.
The fetch tool lets agents make HTTP requests to external URLs. The agent can read web pages, call REST APIs, download data, and interact with web services — with support for multiple URLs in a single call.
agents: root: model: anthropic/claude-3-7-sonnet-latest description: Web content analyzer instruction: | You are a web content analyzer that fetches web pages and provides concise summaries. When asked to summarize a website: 1. Use the fetch tool to retrieve the content. 2. Analyze the content and extract key information. 3. Provide a clear, structured summary. toolsets: - type: fetch
Fetch vs. API tool: The fetch tool gives the agent full control over HTTP requests at runtime. The API tool lets you predefine specific API calls as named tools with typed parameters. Use fetch for general-purpose HTTP access; use api for well-known endpoints you want to expose as structured tools.
The fetch tool makes outbound network requests to any URL the agent chooses. If your agent should only access specific URLs, use the API tool or an MCP server that restricts the allowed endpoints.