Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Filesystem MCP: move_file tool returns array instead of string (Error -32602)

Đang mở Phù hợp với người mới
#3,093 3 bình luận 2 reaction 0 người được giao Xem trên GitHub

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.

  • #3166 của @cardmagic — đã đóng, không merge
  • #3776 của @haroldfabla2-hue — đang mở
  • #4003 của @Jim1874 — đang mở

Đá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ả

bug

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

  1. Configure @modelcontextprotocol/server-filesystem as an MCP server
  2. Call the move_file tool with:
    • source: Source file path
    • destination: Destination file path
  3. 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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của modelcontextprotocol/servers

Tất cả issue của modelcontextprotocol/servers

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.