Skip to main content
Glama
qualienai

qualien-mcp

Official
by qualienai

Read Text File

filesystem__read_text_file
Read-only

Reads the entire text content of a file, optionally limiting to first or last N lines, to examine file contents within allowed directories.

Instructions

Read the complete contents of a file from the file system as text. Handles various text encodings and provides detailed error messages if the file cannot be read. Use this tool when you need to examine the contents of a single file. Use the 'head' parameter to read only the first N lines of a file, or the 'tail' parameter to read only the last N lines of a file. Operates on the file as text regardless of extension. Only works within allowed directories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
headNoIf provided, returns only the first N lines of the file
pathYes
tailNoIf provided, returns only the last N lines of the file

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes
Behavior3/5

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

Annotations already provide readOnlyHint=true and no destructive hints, so the agent knows it is safe. The description adds that it handles various text encodings, provides detailed error messages, and operates on all files as text regardless of extension. These are useful but not critical beyond the annotations. No contradiction with annotations.

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 concise at four sentences with no wasted words. It front-loads the primary purpose, then adds parameter usage notes, then scope restrictions. Every sentence earns its place without redundancy.

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?

Given the tool has an output schema (so return format is documented), annotations provide safety info, and the description covers purpose, parameter usage, and allowed directory restrictions. It could briefly mention that reading multiple files requires a different tool, but overall it is adequate for a straightforward read operation.

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?

The schema covers path (required), head, and tail with descriptions for head and tail but not path. The description explains head and tail parameters in more detail (first/last N lines). Schema description coverage is 67%, so the description compensates for the missing path description. Overall adds moderate value beyond 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 'Read the complete contents of a file from the file system as text', specifying a concrete verb (read) and resource (file contents). It differentiates from sibling tools like filesystem__read_file (similar) and filesystem__read_media_file by emphasizing it handles text encodings and works on any extension as text, not media.

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 explicit guidance on when to use the head and tail parameters to read partial content, and mentions it 'only works within allowed directories'. However, it does not differentiate from filesystem__read_file (identical purpose) or specify when to use read_multiple_files instead, so some sibling differentiation is missing.

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/qualienai/qualien-mcp'

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