Files
gemini-cli/docs/tools/web-fetch.md
T

36 lines
1.2 KiB
Markdown
Raw Normal View History

# Web fetch tool (`web_fetch`)
2025-06-24 15:31:58 -07:00
The `web_fetch` tool allows the Gemini agent to retrieve and process content
from specific URLs provided in your prompt.
2025-06-24 15:31:58 -07:00
## Technical reference
2025-06-24 15:31:58 -07:00
The agent uses this tool when you include URLs in your prompt and request
specific operations like summarization or extraction.
2025-06-24 15:31:58 -07:00
### Arguments
- `prompt` (string, required): A request containing up to 20 valid URLs
(starting with `http://` or `https://`) and instructions on how to process
them.
2025-06-24 15:31:58 -07:00
## Technical behavior
2025-06-24 15:31:58 -07:00
- **Confirmation:** Triggers a confirmation dialog showing the converted URLs.
- **Processing:** Uses the Gemini API's `urlContext` for retrieval.
- **Fallback:** If API access fails, the tool attempts to fetch raw content
directly from your local machine.
- **Formatting:** Returns a synthesized response with source attribution.
2025-06-24 15:31:58 -07:00
## Use cases
2025-06-24 15:31:58 -07:00
- Summarizing technical articles or blog posts.
- Comparing data between two or more web pages.
- Extracting specific information from a documentation site.
2025-06-24 15:31:58 -07:00
## Next steps
2025-06-24 15:31:58 -07:00
- Follow the [Web tools guide](../cli/tutorials/web-tools.md) for practical
usage examples.
- See the [Web search tool reference](./web-search.md) for general queries.