Skip to main content
Glama

read_file

Read files from WSL, returning UTF-8 text or base64 binary. Supports offset/limit for large files and optional SHA-256 hash verification for data integrity.

Instructions

Read a file from WSL. Text files return UTF-8 content; binary files return base64 with a mimeType. Supports offset/limit for large files; sha256=true returns a hash of the read bytes for round-trip verification.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute POSIX path in WSL (use ~ for home)
limitNoMax bytes to read
distroNo
offsetNoByte offset to start reading
sha256NoReturn sha256 (hex) of the read bytes
Behavior4/5

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

With no annotations, the description carries the full burden for behavioral disclosure. It clearly states that text files return UTF-8 content, binary files return base64 with a mimeType, and describes partial reads and hashing. It does not mention distro selection or error behavior, but the disclosed behaviors are significant and well stated.

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?

The description is two sentences long and wastes no words. It front-loads the core action, then packs return-type behavior and advanced parameters into concise, purposeful clauses.

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?

With no output schema, the description appropriately explains return values for both text and binary files. It covers offset/limit and sha256, which addresses the main usage complexities. However, the distro parameter is not explained at all, and there is no mention of error conditions or path resolution nuances, leaving slight gaps.

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

Parameters4/5

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

The schema already covers path, limit, offset, and sha256 (80% coverage), so the baseline is 3. The description adds value by explaining how binary files are returned (base64 + mimeType) and what sha256=true actually does, beyond the schema's description. The distro parameter remains undocumented, preventing a higher score.

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 opens with 'Read a file from WSL', specifying both the action and resource, and differentiates this tool from siblings by detailing text vs. binary handling. It clearly distinguishes read_file from read_multiple_files and list_directory.

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?

The description provides clear context for when to use offset/limit (large files) and sha256 (round-trip verification), implying appropriate use cases. It does not explicitly mention alternatives or exclusions, but the guidance is sufficient for selecting this tool over siblings.

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/Darling209/wsl-bridge-mcp'

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