Skip to content

MCP error -32602: Invalid arguments for tool x #89

@bernreccion

Description

@bernreccion

Describe the bug
Im trying a simple prompt to open google and search dog but having error on the start.

MCP error -32602: Invalid arguments for tool mobile_list_available_devices: [ { "code": "invalid_type", "expected": "object", "received": "undefined", "path": [], "message": "Required" } ] (Code -32602)

then i checked the other tools to check if it's only mobile_list_available_devices that was failing for me. However, it seems that out of the 15 tools, 6 have failed, all of which outputs the same error stated above.

  • mobile_list_available_devices
  • mobile_get_screen_size
  • mobile_take_screenshot
  • mobile_list_apps
  • mobile_get_orientation
  • mobile_list_elements_on_screen

my current config:

"mcpServers": {
    "mobile-mcp": {
      "command": "D:\\nvm4w\\nodejs\\node.exe",
      "args": [
        "D:\\npm-global\\node_modules\\@mobilenext\\mobile-mcp\\lib\\index.js"
      ],
      "env": {
        "ANDROID_HOME": "D:\\Me\\Android\\Sdk"
      }
    }
  }

Configuration (please complete the following information):

  • Agent: Windsurf | Claude 3.7 Sonnet
  • OS: Windows 11
  • Device used: Android Emulator
  • Device version: Android 14
  • Device model: Pixel 8
  • other configs i've done:
    • im using nvm so i installed npm install -g @mobilenext/mobile-mcp
    • put ANDROID_HOME inside my env
    • using node 22.14.0 npm 10.9.2
    • also tried to run windsurf as administrator after running a prompt

To Reproduce
Steps to reproduce the behavior:

  1. Use prompt 'can you open google on our android emulator and search for dog'
  2. See error

Expected behavior
Find my android emulator and connect to it successfully

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwaiting for reporterWaiting for reporter to check again and verify

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions