Gemini 3 Pro unable to call MCP tools

It goes into thinking loop after simple prompt

Get my GitHub username with MCP

it retrieves name of the tool to get user info (github mcp behind mcpproxy) but never calls it falling into thinking loop. Other models like Gemini Flash or Claude Sonnet do work just fine

This happens last 3-5 days.

2 Likes

Example of another model in the same scenario

  1. SYSTEM CONTEXT

The agent is attempting to execute mcp_MCPProxy_call_tool_read to invoke the upstream tool GitHub:get_me.
This proxy tool requires three specific arguments:

  • name (String): The target tool ID (e.g., “GitHub:get_me”)
  • args_json (String): Target tool arguments serialized as a JSON string.
  • intent (Object): Operation metadata (e.g., {"operation_type": "read"}).
  1. THE CORE ISSUE: “Intent Object Complexity”

The agent runtime consistently crashes during the Generation Phase when the intent object is populated with keys, regardless of the args_json value.

The Crash Pattern:

  • Trigger: Populating the intent object (e.g., intent: {"operation_type": "read"}).
  • Error: encountered an improper format stop reason
  • Behavior: The request is aborted by the system’s safety/parsing layer. It never reaches the MCPProxy. It does not appear in chat. It triggers an invisible retry loop.
  1. EXPERIMENTAL EVIDENCE

A. POPULATED INTENT (CRASHES)
Attempting to send a valid intent, even with empty args:

{
  "name": "GitHub:get_me",
  "args_json": "", 
  "intent": { "operation_type": "read" }
}

→ RESULT: SYSTEM ERROR (Improper Format Stop Reason). The agent fails to generate/parse this structure.

B. EMPTY INTENT (EXECUTES)
Attempting to send an empty intent:

{
  "name": "GitHub:get_me",
  "args_json": "",
  "intent": {}
}

→ RESULT: SUCCESSFUL GENERATION. The request successfully reaches the MCPProxy tool execution layer. The code executes and returns a standard validation error: intent.operation_type is required.

  1. CONCLUSION

The issue is explicitly located in the parsing of the intent object within the tool call generation.
The system accepts an empty object {} for intent, but crashes when it contains keys (like operation_type).
This creates a deadlock since the tool logic requires operation_type to be present, but the generation layer crashes if it is present.

1 Like

This is 100% on Google’s side, but I’ve opened a “workaround request” issue, as i don’t believe Google can fix it quickly

I encountered similar issue of “Improper Format Stop Reason“ in Antigravity with all Gemini models. I found switching to Claude would solve the issue.

The bug is triggered after certain customized MCP tool call (likely related to MCP json parser), then the whole session would get poisoned. Built-in MCP tools like task_boundary and multi_replace_file_content would trigger “Improper Format Stop Reason“ error, and the agent very often gets stuck in an infinite thinking loop.
This looks like a serious bug on Google’s side. Please help us look into this.

1 Like