Skip to content
This repository was archived by the owner on Apr 13, 2026. It is now read-only.
This repository was archived by the owner on Apr 13, 2026. It is now read-only.

Gemma3 tool calls not executed - output treated as plain text while Qwen2.5 works #151

Description

@ParzivalRealm

Tool calls from PetrosStav/gemma3-tools:12b are displayed as plain JSON text in the chat instead of being executed, while the same setup works correctly with qwen2.5:7b. The model generates valid tool call JSON, and Ollama's API returns proper tool_calls structure, but mcpHost doesn't recognize/execute them.
This was working previously (approximately 1-2 weeks ago) and stopped working without any intentional changes to the setup.

Environment

mcpHost version: mcphost version dev
Ollama version: 0.5.7
OS: Ubuntu (WSL2)
Models tested:

PetrosStav/gemma3-tools:12b - tool calls NOT executed
qwen2.5:7b - tool calls executed correctly

MCP Server Configuration

{
"mcpServers": {
"winccoa": {
"command": "npx",
"args": [
"mcp-remote",
"https://[redacted].trycloudflare.com/mcp"
]
}
}
}

Steps to Reproduce

Configure mcpHost with an MCP server (any server with tools)
Run: mcphost --debug -m ollama:PetrosStav/gemma3-tools:12b
Enter prompt: get the value of Water_Tank_1.Liters
Observe: Model outputs JSON but tool is not executed

Expected Behavior
mcpHost should recognize the tool call and execute it, when using Gemma3 Instead it just show the raw Json as a text response:

{"name": "winccoa__get-value", "parameters": {"dpe": "Water_Tank_1.Liters"}}

No tool called.

Ollama Returns Valid tool_calls Structure Direct API test confirms Ollama is returning proper tool_calls format.

This may be related to Issue #114 "ollama: tools only called with Qwen2.5"

Additional Context

The MCP server is confirmed working (tools load successfully, Qwen can execute them)
This setup was working with Gemma3 approximately 1-2 weeks ago
No intentional configuration changes were made
Possible that an update to mcpHost, mcp-remote, or Ollama caused a regression

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions