Skip to main content
Glama

Read File

file_read
Read-only

Read a file's contents as UTF-8 text or base64 for binary data, with configurable byte limits and path-based access controls.

Instructions

Read a file's contents as utf8 text or base64 (for binary data), capped at maxBytes. Path is checked against MACCTL_ALLOWED_PATHS/MACCTL_DENIED_PATHS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
encodingNoDefaults to utf8.
maxBytesNoDefaults to 1,000,000 bytes.
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds meaningful behavior: support for utf8/base64, maxBytes cap, and path validation against MACCTL_ALLOWED_PATHS/DENIED_PATHS. It does not disclose whether truncation occurs when maxBytes is exceeded, but this is not a contradiction.

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?

Two tightly written sentences with no fluff. The verb and object are front-loaded, and every sentence carries useful information.

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 read-only tool with helpful annotations, the description covers purpose, encoding modes, size cap, and access control. Missing details about error behavior on exceeding maxBytes, but overall it is sufficient for an agent to select and invoke the tool correctly.

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 covers encoding and maxBytes with defaults, but path lacks a description. The description adds meaning to path by explaining the access control check, and reinforces the maxBytes cap. This compensates for the 67% schema coverage.

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 file's contents as utf8 text or base64 for binary data, with a maxBytes cap. This distinguishes it from sibling write/manage tools by focusing on the read operation.

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

Usage Guidelines3/5

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

The description gives context about reading files and path access control, but does not explicitly mention when to use this tool versus alternatives like file_write or file_search. Usage is implied rather than stated as a clear rule.

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/sitharaj88/macctl'

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