adk_tool/builtin/
google_search.rs1use adk_core::{Result, Tool, ToolContext};
2use async_trait::async_trait;
3use serde_json::Value;
4use std::sync::Arc;
5
6#[derive(Default)]
11pub struct GoogleSearchTool;
12
13impl GoogleSearchTool {
14 pub fn new() -> Self {
15 Self
16 }
17}
18
19#[async_trait]
20impl Tool for GoogleSearchTool {
21 fn name(&self) -> &str {
22 "google_search"
23 }
24
25 fn description(&self) -> &str {
26 "Performs a Google search to retrieve information from the web."
27 }
28
29 async fn execute(&self, _ctx: Arc<dyn ToolContext>, _args: Value) -> Result<Value> {
30 Err(adk_core::AdkError::Tool("GoogleSearch is handled internally by Gemini".to_string()))
33 }
34}