API pricing · Reporting

Gemini Tool Retrieval: count the extra model pass before claiming savings

Google's new preview loads tool schemas on demand. A smaller first prompt can still cost more across the task: compare search passes, retained schemas and cached tokens.

Hypothetical two-request token comparison: 20 tools use 36,000 static versus 39,600 retrieval input-side tokens; 100 tools use 84,000 versus 46,800.
Original illustrative calculation, not API measurements. Two API requests and one server-side search; fixed 12,000-token context, 300 tokens per full schema, two schemas loaded, deferred-list assumptions of 600/3,000 tokens and 200 instruction tokens. Excludes caching, output, tool-result tokens and history growth. AI API Cost · original token-accounting illustration · Source ↗

A new loading strategy, not a cheaper token rate

Google introduced Tool Retrieval on November 19, letting Gemini load tool parameter schemas only when needed. If your agent carries a large integration catalog, the useful question is not just how much smaller the first prompt gets. How many model passes does the complete task now require?

The preview runs on the Interactions API with Gemini 3.6 and later models. Server-side retrieval uses tool_search and defer_loading: true; tool names and descriptions remain visible while parameter schemas wait. This does not make the surrounding API a new preview: Google's overview says Interactions itself became generally available in June. The retrieval guide requires v1beta and excludes generateContent.

Google's pricing page lists no separate retrieval fee, but the search is not free inference. A server-side search triggers another model call inside the same API request. Its prompt is charged at the input-token rate. Treat the public request count and the billed model-pass count as different quantities.

Compare the whole loop, including the hidden pass

Consider a hypothetical catalog of 20 tools with 300-token schemas and a fixed 12,000-token conversation. Assume a 600-token deferred list, 200 tokens of search instructions and two loaded schemas totaling 600 tokens. These are chosen accounting inputs, not tokenizer results or Google's measured overhead.

Two static prompts would process 36,000 input tokens. Each contains 12,000 context tokens and 6,000 schema tokens. Retrieval begins at 12,800; one search adds a 13,400-token pass, and a follow-up after the function result adds another 13,400. Total: 39,600. Repeat the same simplified comparison with 100 tools and a 3,000-token list: static becomes 84,000; retrieval becomes 46,800.

The table deliberately freezes context and excludes generated output, tool-result tokens, history growth and caching. It explains why catalog size changes the trade-off, not what your invoice will be. A long tool result or another search changes the arithmetic; real comparisons must retain those differences rather than reuse these totals.

Two requests, one search: a hypothetical token budget

Scroll sideways to read all columns.

CatalogStatic: 2 promptsRetrieval: 3 promptsDifference
20 tools36,000 tokens39,600 tokens+3,600 tokens
100 tools84,000 tokens46,800 tokens−37,200 tokens
Illustrative input-side tokens, checked November 20, 2026; not measurements. Fixed context C=12,000; each full schema=300; loaded schemas L=600; search instructions H=200; deferred list D=600 or 3,000. Static=2×(C+all schemas). Retrieval initial I=C+D+H; total=I+(I+L)+(I+L), counting one server search and a follow-up. No caching, output, tool-result tokens or history growth; not a dollar quote.Source 1 ↗Source 2 ↗

Choose a pilot by task outcome, not prompt size

For a trial you control, keep the model and task set fixed. Include requests that need no integration, one known function, several functions and an unavailable capability. Record completed tasks, wrong selections, retries and elapsed time alongside token usage. A smaller initial payload is not a successful optimization if the user must repeat the request.

Inspect total_input_tokens and total_tool_use_tokens together, with total_cached_tokens and generated-token fields, rather than comparing only the first prompt. The retrieval guide says loaded schemas remain in context, so repeat-turn behavior matters too. Use the selected model's current input, cached and output rates for an actual cost comparison.

For application-run functions, finding a schema does not execute its code. Google's function-calling guide leaves execution to your application and recommends validation and authentication. A refund-like action still needs your normal permission checks. Test the billing boundary and the action boundary separately; neither a cheaper prompt nor a retrieved function name proves that an action was authorized.

Sources & verification

Provider documentation supports the facts referenced below. Our explanations and recommendations are editorial interpretation.

  1. Google: Introducing Tool Retrieval in the Gemini API ↗Checked Nov 20, 2026
  2. Gemini API Tool retrieval guide ↗Checked Nov 20, 2026
  3. Gemini Developer API pricing: pricing for tools ↗Checked Nov 20, 2026
  4. Gemini Interactions API overview ↗Checked Nov 20, 2026
  5. Function calling with the Gemini API ↗Checked Nov 20, 2026

Corrections: hello@aiapicost.com

Keep reading