Filesystem MCP: move_file tool returns array instead of string (Error -32602)
Maintainer thường phản hồi trong vòng 1 ngày
@haroldfabla2-hue đang làm issue này rồi.
Từ ngày 1/4/2026.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 64/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- typescript
- Lĩnh vực
- tooling
Hướng nghiên cứu
Tái hiện lệnh gọi move_file được cung cấp, sau đó tìm phần triển khai move_file và schema đầu ra của nó trong package server-filesystem. Xác nhận rằng kết quả thành công là một chuỗi và chạy lại cùng yêu cầu MCP để xác minh rằng việc xác thực đầu ra vượt qua mà không có lỗi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Filesystem MCP: move_file tool returns array instead of string (Error -32602)
Summary
When executing the move_file tool from @modelcontextprotocol/server-filesystem, error code -32602 (Invalid params) occurs.
Root Cause: The tool returns an array instead of a string, causing MCP protocol validation to fail.
Error Details
Error Code: -32602 (JSON-RPC Invalid params)
Error Message:
Output validation error: Invalid structured content for tool move_file: [
{
"expected": "string",
"code": "invalid_type",
"path": ["content"],
"message": "Invalid input: expected string, received array"
}
]
Problem Location: The content field is an array (should be a string)
Steps to Reproduce
- Configure @modelcontextprotocol/server-filesystem as an MCP server
- Call the move_file tool with:
- source: Source file path
- destination: Destination file path
- Error occurs
Example:
{
"source": "C:\path\to\file.txt",
"destination": "C:\path\to\new\file.txt"
}
Expected Behavior
The move_file tool should return a string message when file movement succeeds.
Example:
"Successfully moved file from source to destination"
Actual Behavior
The move_file tool returns an array, causing MCP protocol validation to fail.
Environment
OS: Windows 10 (build 26100)
Node.js: 22.21.1 (Built-in Claude Desktop)
Package: @modelcontextprotocol/server-filesystem@latest
MCP Client: Claude Desktop 1.0.1307
Log Excerpts
Request:
2025-11-30T09:57:51.155Z [filesystem] [info] Message from client:
{
"method": "tools/call",
"params": {
"name": "move_file",
"arguments": {
"source": "C:\Users\skiku\Documents\MCP_Learning\chapter01\test1.txt",
"destination": "C:\Users\skiku\Documents\MCP_Learning\chapter01\テストファイル\test1.txt"
}
},
"jsonrpc": "2.0",
"id": 26
}
Response (Error):
2025-11-30T09:57:51.174Z [filesystem] [info] Message from server:
{
"jsonrpc": "2.0",
"id": 26,
"result": {
"content": [{
"type": "text",
"text": "MCP error -32602: Output validation error: Invalid structured content for tool move_file: ..."
}],
"isError": true
}
}
Additional Information
- Other file operation tools (read_file, write_file, create_directory, etc.) work correctly
- The move_file tool appears in the available tools list but fails at runtime
- This issue prevents file movement functionality from being used
Related Issues
I checked GitHub Issues but found no known problems related to the move_file tool. This appears to be an unreported bug.
Suggested Labels
- bug
- server-filesystem
- schema-validation
- Ngôn ngữ chính
- TypeScript
- Star
- 91k
- Fork
- 11.8k
- Merge trung bình
- 6 giờ 23 phút
- Pull request đã merge (30 ngày)
- 81
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelcontextprotocol/servers
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/servers#5071 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
git: git_create_branch is marked non-destructive but silently resets an existing packed branchĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
modelcontextprotocol/servers#5059 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
mcp-server-fetch: `fetch` prompt returns JSON-RPC error code 0 with the raw exception text for an invalid URLCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/servers#4914 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CLAUDE.md: tool-naming rule (kebab-case) disagrees with filesystem and memory serversCó thể đã có người làm @liang0417 đã nhận 11 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
modelcontextprotocol/servers#4892 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Filesystem README recommends deprecated MCP Roots protocol for restricting directory accessCó thể đã có người làm @its-amann đã nhận 15 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
modelcontextprotocol/servers#4844 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của modelcontextprotocol/servers
Issue tương tự
-
[Bug] The clients language filter cannot select the rows the page labels as unknownCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
apache/rocketmq-dashboard#6103 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
cockpit-project/cockpit-machines#2835 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
cloudflare/kumo#866 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:connector bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
autoInject recall silently drops memory injection on long / non-Latin prompts (HTTP 400 Query too long)Có thể đã có người làm @Epsilon006 đã nhận hôm nay. Đang mởintegration:coding-agents
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
vectorize-io/hindsight#5476 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày