Skip to main content
Glama
P4ST4S

mcp-audit

Read Text File

read_text_file
Read-only

Read the complete contents of a file as text. Use head or tail to read only the first or last N lines.

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
pathYes
tailNoIf provided, returns only the last N lines of the file
headNoIf provided, returns only the first N lines of the file

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes
Behavior5/5

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

The description adds significant behavioral context beyond the readOnlyHint annotation: handles various encodings, provides detailed error messages, operates as text regardless of extension, and restricts to allowed directories. No contradictions.

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 with 4 purposeful sentences, front-loading the core purpose. Each sentence adds unique value without redundancy, creating a well-structured and efficient definition.

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?

For a 3-param tool with an output schema, the description is thorough: covers purpose, usage context, parameters, encoding, error handling, and directory restrictions. No gaps remain for a typical use case.

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?

Schema coverage is 67% (path undocumented). The description adds meaning for head and tail by explaining their line-count behavior, matching schema. For path, it adds context about file system and allowed directories, partially compensating for missing schema description.

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' with a specific verb and resource. It distinguishes from siblings like 'read_media_file' and 'read_multiple_files' by emphasizing single file and text handling.

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 explicitly says 'Use this tool when you need to examine the contents of a single file' and implies alternatives through sibling context. It lacks explicit when-not-to-use but provides clear guidance on using head/tail for partial reads.

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/P4ST4S/mcp-audit'

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