Skip to content

filesystem read_multiple_files and edit_file Input validation error: Invalid arguments: expected array, received string #13350

Description

@audioscavenger

Before submitting your bug report

Relevant environment info

- OS: Windows 10 LTSC 21H2
- Continue version: 2.0.0
- IDE version: VSCodium 1.135.06.55
- Model: qwen3.8:27b
- config:
  
name: Local Max VRAM Config
version: 1.0.0
schema: v1
models:
  - name: Qwen 3.8 27b (256K)
    provider: ollama
    model: qwen3.8:27b
    contextLength: 64000
    defaultCompletionOptions:
      temperature: 0
      contextLength: 32000
      maxTokens: 16000
    capabilities:
      - tool_use
    roles: [chat, edit, apply, summarize]
    timeout: 120000

  - name: Qwen 2.5 coder 32b (32K)
    provider: ollama
    model: qwen2.5-coder:32b
    contextLength: 32000
    defaultCompletionOptions:
      temperature: 0
      contextLength: 32000
      maxTokens: 16000
    roles: [chat, edit, apply, autocomplete]
    timeout: 120000

  - name: Apply model
    provider: ollama
    model: qwen2.5-coder:1.5b
    contextLength: 32000
    defaultCompletionOptions:
      temperature: 0
      contextLength: 32000
      maxTokens: 16000
    roles: [apply, autocomplete]
    timeout: 120000

  - name: Nomic Embed
    provider: ollama
    model: nomic-embed-text:latest
    roles:
      - embed
mcpServers:
  - name: filesystem
    command: node
    args:
      - "E:\\GPT\\Ollama\\mcp-tee.js"
      - "-y"
      - "@modelcontextprotocol/server-filesystem"
      - "E:\\www\\letbox\\docker\\dms\\dms-gui"
  

VScodium about:

Version: 1.135.06055
Commit: 1a46a584725d5dd330e0bcd7f5510f24990efcf2
Date: 2026-08-25T14:26:52Z
Electron: 42.8.1
ElectronBuildId: undefined
Chromium: 148.0.7778.280
Node.js: 24.18.1
V8: 14.8.178.38-electron.0
@github/copilot: Unknown
@github/copilot-sdk: Unknown
OS: Windows_NT x64 10.0.19044

Description

Continue intermittently fails to pass an array to the tools requiring an array. I got the bug with read_file and therefore, resorted to use nodeJS mcp filesystem tool with same problems.

  • project: classic ReactJS I am trying to fix bugs for
  • prompt: Fix the blatant bugs in @DataTable.jsx and offer code change with comments above the changes, directly into the file. Add more context by reading maximum 3 files that either use this component or are critical for the component to work.
  • result:
Image
  • Errors seen from the IDE:
filesystem_read_multiple_files failed with the message: [{"type":"text","text":"MCP error -32602: Input validation error: Invalid arguments for tool read_multiple_files: Invalid input: expected array, received string at paths"}]
filesystem_edit_file failed with the message: [{"type":"text","text":"MCP error -32602: Input validation error: Invalid arguments for tool edit_file: Invalid input: expected array, received string at edits\nInvalid input: expected boolean, received string at dryRun"}]

To reproduce

I have concentrated my research on filesystem_read_multiple_files because it's easy to reproduce. The first call works, it reads the files, the second call fails, always.

In both cases, the TRACE log from ollama always reports the same command:

time=2026-10-05T16:30:29.366-07:00 level=TRACE source=qwen3coder.go:117 msg="qwen events parsed" events="[{raw:\n<function=filesystem_read_multiple_files>\n<parameter=paths>\n[\"common.mjs\",\"frontend/src/frontend.mjs\", \"frontend/src/components/AlertMessage.jsx\"]\n</parameter>\n</function>\n}]" state=0 acc=""
time=2026-10-05T16:30:42.541-07:00 level=TRACE source=qwen3coder.go:117 msg="qwen events parsed" events="[{raw:\n<function=filesystem_read_multiple_files>\n<parameter=paths>\n[\"frontend/src/pages/Logins.jsx\",\"frontend/src/pages/Accounts.jsx\",\"frontend/src/components/Translate.jsx\"]\n</parameter>\n</function>\n}]" state=0 acc=""

VSCodium dev console logs nothing at all, so I resorted to a trick to log what Continue sends to the filesystem server: Put a small wrapper between Continue and the server that copies everything Continue sends it into a file.

const { spawn } = require('child_process');
const fs = require('fs');
const log = fs.createWriteStream('"E:\\GPT\\Ollama\\mcp-tee.log', { flags: 'a' });
const child = spawn('npx.cmd', process.argv.slice(2), { stdio: ['pipe', 'inherit', 'inherit'], shell: true });
process.stdin.on('data', d => { log.write(d); child.stdin.write(d); });
process.stdin.on('end', () => child.stdin.end());
child.on('exit', c => process.exit(c));

The config.yaml reflects the use of that wrapper. The wrapper log is telling!

{"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"continue-client","version":"1.0.0"}},"jsonrpc":"2.0","id":0}
{"method":"notifications/initialized","jsonrpc":"2.0"}
{"method":"tools/list","params":{},"jsonrpc":"2.0","id":1}
{"method":"tools/call","params":{"name":"read_multiple_files","arguments":{"paths":["common.mjs","frontend/src/frontend.mjs","frontend/src/components/AlertMessage.jsx"]}},"jsonrpc":"2.0","id":2}
{"method":"tools/call","params":{"name":"read_multiple_files","arguments":{"paths":"[\"frontend/src/pages/Accounts.jsx\",\"frontend/src/components/Translate.jsx\"]"}},"jsonrpc":"2.0","id":3}
{"method":"tools/call","params":{"name":"read_text_file","arguments":{"path":"frontend/src/pages/Accounts.jsx"}},"jsonrpc":"2.0","id":4}
{"method":"tools/call","params":{"name":"read_text_file","arguments":{"path":"frontend/src/components/Translate.jsx"}},"jsonrpc":"2.0","id":5}

That capture is the strongest evidence: the same tool, the same schema, and the same kind of valid model output, yet call 3 arrives at the server as a quoted string while call 2 arrives as a real array.

So the string is created before Continue writes to the MCP server. The wrapper only sees the end of the chain, so it can't say whether Ollama returned a string or Continue stringified it.

The two suspects are:

  • Ollama's qwen3coder parser
  • Continue after it receives the call.

It's really sad because everything else almost work.

Log output

filesystem_read_multiple_files failed with the message: [{"type":"text","text":"MCP error -32602: Input validation error: Invalid arguments for tool read_multiple_files: Invalid input: expected array, received string at paths"}]
filesystem_edit_file failed with the message: [{"type":"text","text":"MCP error -32602: Input validation error: Invalid arguments for tool edit_file: Invalid input: expected array, received string at edits\nInvalid input: expected boolean, received string at dryRun"}]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions