Skip to main content
Glama
riparino

@modelcontextprotocol/server-wsl

by riparino

read_file

Reads text file contents from a WSL Linux distribution using an absolute path. Returns file content as UTF-8 string.

Instructions

Read the contents of a file from the WSL filesystem. Returns the file content as a UTF-8 string. Supports any text file accessible to the default WSL user. For binary files, consider piping through base64 using run_command instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the file within the WSL filesystem, e.g. '/home/user/project/main.py' or '/etc/hosts'.
distroNoName of the WSL distribution that contains the file. Defaults to the system default distribution.
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Discloses return format (UTF-8 string), accessibility constraints, and suggests alternative for binary files. Lacks details on error behavior, size limits, or encoding issues, but covers core traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with purpose, then return format, then a usage tip. No wasted words; every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with 2 parameters and no output schema, the description covers return type, a key constraint (user accessibility), and an important edge case (binary files). Slightly lacking on error conditions, but adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. Description adds example for path but does not enrich distro parameter beyond the existing schema description. Minimal added value over schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it reads file contents from the WSL filesystem, specifying the resource and action. It distinguishes from sibling tools like write_file and run_command by focusing on reading text files.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance for binary files (use run_command with base64) and mentions accessibility by default WSL user, offering context for when to use. Does not fully exclude other scenarios but gives a clear alternative for a common edge case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/riparino/wsl-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server