Editorial illustration for Gemma 4 Executes Sequential Tool Calls to Inspect Folder and Compute Results
Gemma 4 Executes Sequential Tool Calls to Inspect Folder...
Look at the files. Compute the total size. Two simple instructions, but for a small language model they demand sequential reasoning.
Gemma 4 delivers. It inspects the folder, five files, from README.md to sales_report.py, then runs a Python script to sum their sizes and round to two decimals. The result: 15.33 KB.
All on a laptop, no GPU required. The model doesn’t guess; it acts. Each tool call is a brick in a logical wall.
That’s agentic grounding at its most elegant.
In this tutorial, we will give Gemma 4 two new tools and watch the model decide, on its own, when to look around and when to compute.
A two-billion-parameter model, running on a laptop without a GPU, just orchestrated two tools in sequence, inspection, then computation, to deliver a grounded, correct answer. The filesystem tool tames the model’s tendency to hallucinate; the interpreter tool tames its arithmetic. Together, they turn raw directory contents into a verifiable number: 15.33 KB.
This isn’t just a parlor trick. It’s a blueprint for how small, efficient models can perform real, agentic work when given the right scaffolding, and it raises the question: what else can they do with the same hooks?
Common Questions Answered
How does Gemma 4 perform sequential tool calls to complete complex tasks?
Gemma 4 executes tool calls in a logical sequence, first using a filesystem tool to inspect folder contents and identify files, then using an interpreter tool to compute results based on that inspection. Each tool call acts as a building block in a logical workflow, allowing the model to break down complex instructions like "look at files and compute total size" into manageable steps that lead to a grounded, verifiable answer.
What are the key advantages of running Gemma 4 on a laptop without a GPU?
Gemma 4 is a two-billion-parameter model that can run efficiently on standard laptop hardware without requiring GPU acceleration, making advanced agentic capabilities accessible to more users. This efficiency doesn't sacrifice functionality; the model can still orchestrate multiple tools sequentially and deliver accurate results like computing file sizes to two decimal places.
How do the filesystem and interpreter tools reduce hallucination in Gemma 4?
The filesystem tool grounds Gemma 4 by providing verified directory contents rather than allowing the model to guess or fabricate file information, while the interpreter tool handles arithmetic computations accurately instead of relying on the model's tendency to produce incorrect calculations. Together, these tools transform raw data into verifiable numbers by anchoring the model's reasoning to concrete, executable operations.
What specific task does Gemma 4 complete in the article example?
Gemma 4 inspects a folder containing five files (README.md through sales_report.py), then executes a Python script to calculate the total size of all files and rounds the result to two decimal places, arriving at the answer of 15.33 KB. This demonstrates the model's ability to perform real, agentic work by combining sequential tool calls with accurate computation.
Further Reading
- Bring state-of-the-art agentic skills to the edge with Gemma 4 — Google Developers Blog
- Function calling with Gemma 4 — Google AI for Developers
- How to Implement Tool Calling with Gemma 4 and Python — MachineLearningMastery
- FunctionGemma: Bringing bespoke function calling to the edge — Google Blog
- Gemma 4 native tool calls are not parsed, so the OpenAI-compatible ... — GitHub