Skip to main content
Glama

readFile

Loads a file's contents as text for reviewing resumes, templates, or configuration files. Provide a path plus optional size and encoding parameters.

Instructions

Reads the contents of a file and returns it as text. Useful for loading resumes, templates, or configuration files.

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": {
      "path": "<path>"
    },
    "name": "readFile"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the file (absolute or relative)
maxSizeNoMaximum file size in bytes (default: 10MB)
encodingNoFile encoding (default: "utf-8")utf-8

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and only says the output is text. It does not disclose what happens with binary or oversized files, whether content is truncated at maxSize, whether an error is raised for a missing path, or any permission constraints. For a file-read tool with zero annotation coverage this leaves meaningful gaps.

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 short sentences with the core action front-loaded and no filler. The second sentence is somewhat optional but is short enough to earn its place as a usage hint.

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?

There is no output schema, and the description does state the return form ('as text'), which covers the basics. However, it omits error and truncation behavior that an agent needs to call this reliably against arbitrary paths.

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 description coverage is 100%, and each of the three parameters is documented inline with defaults, so the baseline applies. The description adds no additional meaning about path resolution, encoding fallbacks, or size-limit behavior beyond what the schema already states.

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 gives a specific verb and resource ('Reads the contents of a file') plus the return form ('returns it as text'), which an agent can distinguish from saveToFile by the read/write direction. It stops short of explicitly naming or contrasting any sibling tool, so it is clear but not fully differentiated.

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?

It offers example use cases ('loading resumes, templates, or configuration files'), which implies when to use it, but gives no conditions for when not to use it and no pointer to alternatives like searchFiles or webFetch. Usage is inferable rather than stated.

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