Gemini Function Calling Is Not an Agent Runtime A developer explains that Gemini's function calling is not an agent runtime, emphasizing that the model proposes tool calls but the application must handle validation, authorization, and execution. The post outlines a production-grade pipeline with schema validation, policy checks, and idempotent execution, using the Google Gen AI SDK and Gemini 2.5 Flash as examples. Gemini function calling makes tool use look simple. You describe a function, provide its input schema, and let the model decide whether the user's request requires it. A traveler asks, "Find hotels in Paris under $250," Gemini requests search hotels , your application executes it, and the model turns the result into a useful answer. That is an important capability, but it is not an agent runtime. Function calling tells your application what the model proposes to do. It does not decide whether the action is authorized, whether the arguments are trustworthy, whether the same action already succeeded, or whether a retry would make the situation worse. The model proposes. The runtime disposes. With the Google Gen AI SDK, a function declaration can look like this: js import { GoogleGenAI, Type } from "@google/genai"; const ai = new GoogleGenAI { apiKey: process.env.GEMINI API KEY, } ; const searchHotels = { name: "search hotels", description: "Search available hotels in a city under an optional nightly price", parameters: { type: Type.OBJECT, properties: { city: { type: Type.STRING, description: "City and country, for example Paris, France", }, maxNightlyPriceUsd: { type: Type.NUMBER, description: "Maximum nightly price in US dollars", }, }, required: "city" , }, }; const response = await ai.models.generateContent { model: "gemini-2.5-flash", contents: "Find hotels in Paris under $250 per night", config: { tools: { functionDeclarations: searchHotels } , }, } ; const proposedCall = response.functionCalls?. 0 ; The returned function call contains a name and structured arguments. Google is explicit about the next boundary: the model does not execute your business function. Your application is responsible for executing it and returning the result. That boundary is where production engineering begins. User request │ ▼ Gemini proposes a function call │ ▼ Schema validation → authorization → policy → budget │ │ │ └── block / request confirmation ▼ Idempotent tool executor with timeout │ ▼ Normalized result + decision record │ ▼ Result returned to Gemini for the final response The tool schema helps Gemini produce better arguments, but it should not replace runtime validation. Model-generated arguments cross the same trust boundary as an HTTP request. js import { z } from "zod"; const SearchHotelsArgs = z.object { city: z.string .trim .min 2 .max 120 , maxNightlyPriceUsd: z.number .positive .max 10 000 .optional , } ; type ExecutionContext = { runId: string; userId: string; permissions: Set