Skip to main content
Glama

read_file_contents

Read-only

Reads a file's text contents from a Pterodactyl-hosted server, truncating large files by default to protect context size; set max_chars to return more.

Instructions

Read the text contents of a file on the server. Automatically truncates very large files to protect context size unless max_chars is increased.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "server_id": "<server_id>",
      "file": "<file>"
    },
    "name": "read_file_contents"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesFile path inside container (e.g. '/package.json')
max_charsNoMaximum characters to return (default 50000)
server_idYesShort server identifier

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

B3.4/5.0
Behavior4/5

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

Goes beyond the readOnlyHint annotation by disclosing truncation behavior for large files and the max_chars escape hatch — a real behavioral trait an agent needs. Doesn't mention permissions or error behavior (e.g., missing file), so not a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences, front-loaded with the core action and then the truncation caveat. Nothing wasted, though it could be slightly more structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read tool with full schema coverage and a readOnly annotation, this covers the essentials. Missing: whether it handles binary files, error behavior, and output format/encoding — modest gaps but the tool is simple.

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?

Schema coverage is 100%, so all three parameters are documented with descriptions and defaults. The description adds only the motivation for max_chars ('unless max_chars is increased'), which is a small increment beyond the schema's 50000 default note.

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?

States a specific verb+resource: 'Read the text contents of a file on the server.' Clearly distinguishes from write_file/delete_files siblings by naming read of text contents. Doesn't explicitly name alternatives but the verb+resource is unambiguous.

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 when-to-use or when-not-to-use guidance. It doesn't mention that this only reads text (not binary), doesn't route to siblings like get_download_url for large/binary files. Usage is only implied by the verb 'read'.

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