Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto Apto para principiantes
#3,093 3 comentarios 2 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@haroldfabla2-hue ya está trabajando en esto.

Desde el 1/4/2026.

  • #3166 de @cardmagic — cerrado sin fusionar
  • #3776 de @haroldfabla2-hue — abierto
  • #4003 de @Jim1874 — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
64/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Tranquilo
Stack tecnológico
typescript
Área
tooling

Línea de trabajo

Reproduce la llamada move_file proporcionada, luego localiza la implementación de move_file y su esquema de salida en el paquete server-filesystem. Confirma que el resultado exitoso es un string y vuelve a ejecutar la misma solicitud MCP para verificar que la validación de la salida se complete sin errores.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
JavaScript
Estrellas
91.2k
Forks
11.8k
Merge medio
6 h 52 min
PR fusionados (30 d)
107

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de modelcontextprotocol/servers

Todos los issues de modelcontextprotocol/servers

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.