Skip to main content
Glama

read_file

Read a text file from allowed directories without modification, with byte limit and UTF-8 decoding. Returns truncated output or error for denied paths.

Instructions

Lees een tekstbestand onder allowed_read_dirs zonder het te wijzigen.

path moet een bestaand regulier bestand zijn. max_bytes bepaalt hoeveel bytes maximaal worden gelezen; zonder waarde geldt de geconfigureerde max_bytes, en iedere opgegeven waarde wordt begrensd tot 1–die configuratielimiet. Bytes worden als UTF-8 gedecodeerd waarbij ongeldige tekens worden vervangen. Als meer gegevens beschikbaar zijn, eindigt de tekst met [...truncated...]. De {success, data, error, meta}-response bevat de tekst of een fout voor een geweigerd pad, ontbrekend bestand of ontbrekende leespermissie. Gebruik head of tail wanneer alleen regels aan het begin of einde nodig zijn.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
max_bytesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Despite no annotations, the description thoroughly discloses behavior: no modification, file must exist and be regular, max_bytes clamping, UTF-8 decoding with replacement, truncation indicator, and error responses.

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 a single paragraph but is well-structured: opening purpose, then constraints, behavior, response format, and finally alternative tools. It is concise yet comprehensive.

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

Completeness5/5

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

Given no annotations and the presence of an output schema, the description covers all necessary context: purpose, file requirements, parameter details, truncation behavior, error handling, and sibling tool distinctions.

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

Parameters5/5

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

Although schema coverage is 0%, the description explains both parameters: path must be an existing regular file, max_bytes has a default and is clamped between 1 and a configured limit. This adds meaningful context beyond the 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 the tool reads a text file under allowed directories without modifying it. It distinguishes itself from siblings by indicating when to use head or tail instead.

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

Usage Guidelines5/5

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

Explicit guidance is given: 'Use `head` or `tail` when only lines at the beginning or end are needed.' This tells the agent when not to use this tool.

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/gerard-kanters/mcp-linux-tools'

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