TLDR: tool parameters using the common JSON Schema pattern `anyOf: [$ref, null]` are rendered into the prompt as empty `type` fields. This strips the useful schema information before the model sees it. -- Long, rambling version: Gemma 4 was having issues with calling my custom MCP tool on >3 inferen