2025-12-01 11:38:48 -08:00
|
|
|
# Web search tool (`google_web_search`)
|
2025-06-07 10:47:30 -07:00
|
|
|
|
|
|
|
|
This document describes the `google_web_search` tool.
|
|
|
|
|
|
2025-06-24 15:31:58 -07:00
|
|
|
## Description
|
|
|
|
|
|
2025-10-09 08:17:37 -04:00
|
|
|
Use `google_web_search` to perform a web search using Google Search via the
|
|
|
|
|
Gemini API. The `google_web_search` tool returns a summary of web results with
|
|
|
|
|
sources.
|
2025-06-24 15:31:58 -07:00
|
|
|
|
|
|
|
|
### Arguments
|
|
|
|
|
|
|
|
|
|
`google_web_search` takes one argument:
|
|
|
|
|
|
|
|
|
|
- `query` (string, required): The search query.
|
|
|
|
|
|
|
|
|
|
## How to use `google_web_search` with the Gemini CLI
|
|
|
|
|
|
2025-10-09 08:17:37 -04:00
|
|
|
The `google_web_search` tool sends a query to the Gemini API, which then
|
|
|
|
|
performs a web search. `google_web_search` will return a generated response
|
|
|
|
|
based on the search results, including citations and sources.
|
2025-06-24 15:31:58 -07:00
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
google_web_search(query="Your query goes here.")
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## `google_web_search` examples
|
|
|
|
|
|
|
|
|
|
Get information on a topic:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
google_web_search(query="latest advancements in AI-powered code generation")
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Important notes
|
|
|
|
|
|
2025-10-09 08:17:37 -04:00
|
|
|
- **Response returned:** The `google_web_search` tool returns a processed
|
|
|
|
|
summary, not a raw list of search results.
|
|
|
|
|
- **Citations:** The response includes citations to the sources used to generate
|
|
|
|
|
the summary.
|