Skip to content

CLI crashing when running commands after setting up mcp servers #2522

@lordshashank

Description

@lordshashank

What happened?

I ran few mcp servers and then cli started to crash, logs were following

{
  "error": {
    "message": "{\"error\":{\"message\":\"{\\n  \\\"error\\\": {\\n    \\\"code\\\": 400,\\n    \\\"message\\\": \\\"* GenerateContentRequest.tools[0].function_declarations[28].parameters.properties[abi].items: missing field.\\\\n* GenerateContentRequest.tools[0].function_declarations[28].parameters.properties[args].items: missing field.\\\\n* GenerateContentRequest.tools[0].function_declarations[29].parameters.properties[args].items: missing field.\\\\n* GenerateContentRequest.tools[0].function_declarations[29].parameters.properties[abi].items: missing field.\\\\n\\\",\\n    \\\"status\\\": \\\"INVALID_ARGUMENT\\\"\\n  }\\n}\\n\",\"code\":400,\"status\":\"Bad Request\"}}",
    "stack": "ApiError: {\"error\":{\"message\":\"{\\n  \\\"error\\\": {\\n    \\\"code\\\": 400,\\n    \\\"message\\\": \\\"* GenerateContentRequest.tools[0].function_declarations[28].parameters.properties[abi].items: missing field.\\\\n* GenerateContentRequest.tools[0].function_declarations[28].parameters.properties[args].items: missing field.\\\\n* GenerateContentRequest.tools[0].function_declarations[29].parameters.properties[args].items: missing field.\\\\n* GenerateContentRequest.tools[0].function_declarations[29].parameters.properties[abi].items: missing field.\\\\n\\\",\\n    \\\"status\\\": \\\"INVALID_ARGUMENT\\\"\\n  }\\n}\\n\",\"code\":400,\"status\":\"Bad Request\"}}\n    at throwErrorIfNotOK (file:///C:/Users/91831/AppData/Roaming/npm/node_modules/@google/gemini-cli/node_modules/@google/genai/dist/node/index.mjs:13101:30)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async file:///C:/Users/91831/AppData/Roaming/npm/node_modules/@google/gemini-cli/node_modules/@google/genai/dist/node/index.mjs:12892:13\n    at async Models.generateContentStream (file:///C:/Users/91831/AppData/Roaming/npm/node_modules/@google/gemini-cli/node_modules/@google/genai/dist/node/index.mjs:14217:24)\n    at async retryWithBackoff (file:///C:/Users/91831/AppData/Roaming/npm/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/utils/retry.js:61:20)\n    at async GeminiChat.sendMessageStream (file:///C:/Users/91831/AppData/Roaming/npm/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/core/geminiChat.js:287:36)\n    at async Turn.run (file:///C:/Users/91831/AppData/Roaming/npm/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/core/turn.js:37:36)\n    at async GeminiClient.sendMessageStream (file:///C:/Users/91831/AppData/Roaming/npm/node_modules/@google/gemini-cli/node_modules/@google/gemini-cli-core/dist/src/core/client.js:175:26)\n    at async file:///C:/Users/91831/AppData/Roaming/npm/node_modules/@google/gemini-cli/dist/src/ui/hooks/useGeminiStream.js:276:26\n    at async file:///C:/Users/91831/AppData/Roaming/npm/node_modules/@google/gemini-cli/dist/src/ui/hooks/useGeminiStream.js:343:38"
  },
  "context": [
    {
      "role": "user",
      "parts": [
        {
          "text": "This is the Gemini CLI. We are setting up the context for our chat.\n  Today's date is Sunday 29 June, 2025.\n  My operating system is: win32\n  I'm currently working in the directory: C:\\Users\\91831\n  Showing up to 200 items (files + folders). Folders or files indicated with ... contain more items not shown, were ignored, or the display limit (200 items) was reached. ..........."
        }
      ]
    },
    {
      "role": "model",
      "parts": [
        {
          "text": "Got it. Thanks for the context!"
        }
      ]
    },
    "Tell me how much eth does vitalik.eth own?"
  ]
}

it threw this error when my mcp server was configured as

"evm-mcp-server": {
      "display_name": "EVM MCP Server",
      "command": "powershell.exe",
      "args": [
        "-Command",
        "cd 'C:\\Users\\91831\\Desktop\\important\\blockchain\\mcp\\modelcontextprotocol\\evm-mcp-server'; & 'C:\\Users\\91831\\.bun\\bin\\bun.exe' run start"
      ]
    }

What did you expect to happen?

cli to work properly.

Client information

  • CLI Version: 0.1.7
  • Git Commit: 55cc809
  • Operating System: win32 v20.18.1
  • Sandbox Environment: no sandbox
  • Model Version: gemini-2.5-pro
  • Memory Usage: 144.1 MB

Login information

With API Key

Anything else we need to know?

when I removed the server it works

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/agentIssues related to Core Agent, Tools, Memory, Sub-Agents, Hooks, Agent Qualitypriority/p1Important and should be addressed in the near term.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions