Skip to main content
Glama

Read a file

read_file
Read-only

Returns a file's contents (up to 1 MB). Text is returned as UTF-8; binary files (images, etc.) as base64.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath relative to the website root (public_html), e.g. "index.html" or "css/style.css". Start with "~/" for the private account home folder.
siteYesThe website's domain, as shown by list_sites (e.g. "example.com" or "name.hostingfor.ai").

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
sizeYes
contentYes
encodingYes
modifiedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

The annotation readOnlyHint=true indicates the operation is read-only, and the description adds useful context by stating the 1 MB limit, UTF-8 decoding for text, and base64 encoding for binary files. This goes beyond what annotations specify.

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, two sentences, with no fluff. The key information (size limit, encoding) is front-loaded, making it efficient for an agent to parse.

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 output schema exists and covers return types, the description covers the essential behavior (limits and encoding) that an agent needs to predict the output. Missing details like error cases or special file handling are not critical for basic selection.

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 descriptions for 'path' and 'site' are detailed, covering relative paths, examples, and the special '~/' prefix. Descriptions add some value by clarifying path resolution and site format, but with 100% schema coverage, the baseline is 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns file contents with a specific size limit and distinguishes between text and binary formats. It doesn't explicitly differentiate from sibling tools like list_files, but the purpose is clear.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives like list_files or write_file. The description doesn't mention exclusions, such as when not to use it or context for appropriate use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources