Desc:
When calling tools that expect a json object for an argument (e.g., the args in execute_command), the Python list is incorrectly serialized as a single string instead of a JSON array. This causes "Invalid argument" errors, specifically "Expected array, received string".
Scene 1:
Failed calling tool: execute_command
Tool call
execute_command(
command = "git",
args = ["add", "."]
)
Response
Error: Error: [
{
"code": "invalid_type",
"expected": "array",
"received": "string",
"path": [
"args"
],
"message": "Expected array, received string"
}
]
Scene 2:
Failed calling tool: execute_command
Tool call
execute_command(
command = "git add ."
)
Response
Error: Command execution failed: Command execution failed: spawn git add . ENOENT
Android Studio version:
Android Studio Otter 2 Feature Drop | 2025.2.2 Canary 3
Build #AI-252.25557.131.2522.14357309, built on October 30, 2025
Runtime version: 21.0.8+-14196175-b1038.72 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 5.4.0-218-generic
Ubuntu 20.04.6 LTS; glibc: 2.31
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 6144M
Cores: 16
Registry:
ide.experimental.ui=true
gradle.phased.sync.enabled=true
com.android.studio.ml.activeModel=com.android.studio.ml.AidaModel
Non-Bundled Plugins:
com.pingfangx.plugin.legacylayoutinspector (1.2.0)
cn.yiiguxing.plugin.translate (3.8.0)
Current Desktop: ubuntu:GNOME
Related Links
https://developer.android.com/studio/gemini/add-mcp-server
Desc:
When calling tools that expect a json object for an argument (e.g., the
argsinexecute_command), the Python list is incorrectly serialized as a single string instead of a JSON array. This causes "Invalid argument" errors, specifically "Expected array, received string".Scene 1:
Scene 2:
Android Studio version:
Android Studio Otter 2 Feature Drop | 2025.2.2 Canary 3
Build #AI-252.25557.131.2522.14357309, built on October 30, 2025
Runtime version: 21.0.8+-14196175-b1038.72 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 5.4.0-218-generic
Ubuntu 20.04.6 LTS; glibc: 2.31
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 6144M
Cores: 16
Registry:
ide.experimental.ui=true
gradle.phased.sync.enabled=true
com.android.studio.ml.activeModel=com.android.studio.ml.AidaModel
Non-Bundled Plugins:
com.pingfangx.plugin.legacylayoutinspector (1.2.0)
cn.yiiguxing.plugin.translate (3.8.0)
Current Desktop: ubuntu:GNOME
Related Links
https://developer.android.com/studio/gemini/add-mcp-server