Automatic function calling — Python only
The Python SDK can run the entire tool loop for you. Pass plain callables to tools=[...]; the SDK introspects type hints + docstring, builds the declarations, and handles the call/response loop internally. Only available in Python. TypeScript still requires the manual loop.
Two built-in tools you can hand the model directly
Google ships two tools that they execute, not you:
- Code execution (
ToolCodeExecution) — the model writes Python, Google runs it server-side, returns the output. Useful for math, parsing, plotting. - Google Search (
GoogleSearch) — model issues a search and reads results. Provides grounding for current events.
You don't write a dispatcher for these — they execute inside Google's infrastructure.
Combining tools
You can mix custom function declarations with built-in tools in the same call. The model picks whichever fits the user's intent.