Skip to content

read_file returns empty content for extensionless/unrecognized file types instead of error #394

@JesperLive

Description

@JesperLive

Description

ead_file silently returns empty content (just fileName/filePath/fileType metadata, no actual content) for files it classifies as unsupported or doesn't recognize. This happens with:

  • Extensionless files (e.g. Electron Preferences, Local State)
  • JSON files that return ileType: 'text' but with empty content body
  • Files like mcp-info.json, supported-features-info.json in the Claude Desktop logs folder

Expected behavior

Either:

  1. Return the raw text content (these are all valid text/JSON files), or
  2. Return an explicit error indicating the file type is unsupported, so the caller knows to use an alternative method

Actual behavior

Returns a response with metadata but no content field:
json {fileName:Preferences,filePath:C:\\Users\\...\\Preferences,fileType:unsupported}

No error is raised, so the caller (LLM) believes the file was read successfully but is empty.

Workaround

Using start_process with Get-Content / cat to read these files instead.

Environment

  • Desktop Commander v0.2.38
  • Windows 11
  • Claude Desktop (Electron)
  • Node.js 25.7.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions