Skip to main content
Glama

read_file

Securely retrieve file contents from allowed directories, detecting MIME types and validating file sizes to prevent unsafe access.

Instructions

Read file contents securely within allowed directories with MIME type detection and size validation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the full disclosure burden. It goes beyond a plain 'read file' statement by mentioning security containment, MIME type detection, and size validation, which are meaningful behavioral constraints an agent should know.

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?

One compact sentence front-loads the core action, then supplies key constraints without redundancy. Every phrase adds relevant value and the description is well-sized for the tool.

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 single-parameter file-reading tool with an output schema, the description covers the essential context: security boundary and validation behavior. It still lacks explicit guidance on path format and failure behavior, which prevents a perfect score.

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 has no description for 'path', and the textual description adds limited guidance about path semantics. It implies the path must reside within allowed directories, but it does not define path format, allowed roots, or other details.

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 identifies a specific verb ('Read'), a resource ('file contents'), and a distinct scope ('within allowed directories'). This distinguishes it from sibling tools like list_directory and search_local_files, which have different purposes.

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 makes it clear that this tool is for reading file contents, not for listing or searching. However, it does not explicitly mention when not to use it or name sibling alternatives as options.

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/Dhananjayrbiraris/github-mcp'

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