Skip to content

Gemini Built-in tools

Gemini Built‑in tools is a simple way to add Google’s Gemini built‑in tools to your automation. It lets you ask the model to run a web search or execute a short code snippet and then use the result in your next steps.

How it Works

When you add this component to a flow, you choose which built‑in tools you want to use (google_search, code_execution). The component sends the user’s instruction to the Gemini model, which runs the selected tool and returns the output. The result is then available as the component’s output for other components to consume. No extra coding is required – you just pick the tools and write the query or code you want to run.

Inputs

  • Built-in tool: Select one or more tools that the Gemini model should use. The current options are google_search and code_execution.
  • Input or instruction: The text you want the model to act on. For a search, type the query. For code execution, paste the code you want to run.
  • GenAI Language Model: Pick the Gemini model that will perform the task. The model must have built‑in tools enabled; otherwise the component will not work.

Outputs

The component returns the raw output from the chosen tool. For a web search it gives the search results (title, snippet, URL). For code execution it returns the program’s output or any error messages. This output can be fed into other components, displayed to the user, or stored for later use.

Usage Example

  1. Drag the Gemini Built‑in tools component into your flow.
  2. In the Built‑in tool field, check google_search.
  3. In Input or instruction, type “What are the latest trends in AI for 2025?”
  4. Choose a Gemini model that has tools enabled.
  5. Connect the component’s output to a text‑display component to show the search results to the user.

Important Notes

🔒 Code execution poses security risks 🔴
Only run code snippets from trusted sources. Executing unverified code can lead to malicious actions or compromise your environment.

⚠️ Development version may be unstable 🟡
This component is marked as in development; some features may not work consistently. Use it in a controlled environment and report any issues you encounter.

⚠️ Only Google Search and Code Execution tools available 🟢
The component currently supports only the built‑in google_search and code_execution tools. Other web or API interactions are not supported.

💡 Use concise queries for Google Search 🟢
Provide clear, specific search terms to obtain relevant results; vague queries can return irrelevant or noisy data.

💡 Verify code before execution 🟡
The code_execution tool runs code. Always review the code and its expected output to avoid accidental execution of unsafe or unwanted operations.

⚙️ Enable built‑in tools in Gemini model 🟡
Ensure the Gemini model you are using has built‑in tools enabled; otherwise the component will not be able to access google_search or code_execution.

Tips and Best Practices

  • Keep search queries short and to the point.
  • Review any code before letting the component run it.
  • Test the component in a sandbox before deploying it to production.
  • Keep your Google Generative AI API key secure and rotate it regularly.

Security Considerations

Because the component can execute arbitrary code, it is essential to restrict its use to trusted users and to review any code snippets before execution. Avoid exposing the component to untrusted input sources.