Gemma 4 31B

Runs MCP tools

The largest dense model in Google’s Gemma 4 family, released April 2026 under Apache 2.0. It is built to run on a single workstation GPU, with native function calling and thinking you switch on when you need it.

Vendor
Google DeepMind
Released
2 April 2026
Context
262K tokens
Input
Text, image, video

Paste a server URL, pick a model, and watch it call your tools in a real conversation. No install.

No server of your own? Leave it blank and use one of the public mock servers.

MCP Evals

Can Gemma 4 31B actually complete tasks with your server?

One chat shows the tool calls work. An eval writes real tasks from your tool schemas, has Gemma 4 31B drive each one, and reports where it got the wrong answer even though every call succeeded. Pick Gemma 4 31B as the driver.

What Gemma 4 31B is

Gemma 4 31B is a 30.7B-parameter dense model from Google DeepMind. It alternates local sliding-window attention with full global attention to reach a 256K window, and takes text, image and video input. Unlike earlier Gemma releases, it has native support for structured tool use and a thinking mode, turned on by a token at the start of the system prompt. Gemma 4 26B, a mixture-of-experts model with 4B active, is the lighter model in the family, and both are available here.

What Google DeepMind says

  • LiveCodeBench v6: 80.0%. Codeforces Elo: 2150.
  • GPQA Diamond: 84.3%. AIME 2026: 89.2%.
  • MMLU Pro: 85.2%.

These are the vendor’s own claims, not measurements of ours. Run the model against your own server to find out whether they hold for your tools.

How it reaches MCP

  • The open weights in Ollama, LM Studio, llama.cpp or vLLM, behind any local MCP client
  • Google AI Studio and Vertex AI, where Gemma 4 is served alongside Gemini
  • MCP Playground’s Agent Studio: paste your server URL above and run Gemma 4 31B against it in the browser, with nothing to download

What to watch for

  • Thinking is off unless it is turned on. Self-hosted, that means adding the thinking token to the system prompt; on OpenRouter it is the reasoning parameter. Test multi-step chains both ways.
  • Google’s published numbers are reasoning and coding benchmarks, not agent or tool-use scores. There is no vendor figure for how it handles tools, so the only evidence is your own run.
  • When you serve it yourself, tool calling depends on the chat template your runtime applies. If calls come back as plain text instead of tool_calls, check the template before blaming the model.

Run the complex-schema mock on Gemma 4 31B and Gemini 3.8 Flash with the same prompt. If Gemma makes the same calls, you have an open model you can run next to your server during development, and switch to Gemini in production. All the mock servers →

Available here

ModelModel ID
Gemma 4 31Bgoogle/gemma-4-31b-it

Go deeper

Frequently asked questions

Does Gemma 4 support function calling?
Yes. Gemma 4 has native structured tool use, and OpenRouter lists tools and tool_choice for the 31B. MCP servers work through any client that turns MCP tools into function calls.
Is Gemma 4 31B open source?
Yes, under Apache 2.0, which allows commercial use. The weights are on Hugging Face.
How do I turn on thinking in Gemma 4?
Put the thinking token at the start of the system prompt when self-hosting, or use the reasoning parameter on OpenRouter. Without it, the model answers directly.
Gemma 4 31B or Gemma 4 26B?
The 31B is dense, so every parameter works on every token. The 26B is a mixture-of-experts with 4B active, so it is faster and lighter. Both have 256K windows and are available here.

Sources

Gemma 4 31B for MCP: Specs & Tool Calling — Test Free | MCP Playground