Skip to main content
Glama

Read file

read_file
Read-onlyIdempotent

Read a file (text, or base64 for binary)

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": "read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
encodingNo
project_idNoProject id (or use session from use_project)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so the safety profile is fully covered elsewhere. The description adds the useful behavioral detail that binary content comes back base64-encoded, but says nothing about missing-file errors, path scoping, or how project_id/session resolution affects reads.

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?

A single short sentence with the core action front-loaded and the encoding caveat immediately after. Nothing is redundant, though the brevity is also the source of the definition's gaps.

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

Completeness2/5

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

For a three-parameter file-read tool with no output schema and low schema coverage, the description is too thin. It should explain path resolution, project scope, and error behavior, because those are not documented anywhere else in the structured data.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 33%, so the description should compensate. It only hints at the encoding parameter via "base64 for binary" and adds no meaning for path (scope, absolute vs relative, sandbox root) or project_id beyond the schema's own note about use_project sessions.

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?

"Read a file" states a specific verb and resource, and the parenthetical clarifies output modality (text vs base64 for binary). It implicitly distinguishes from siblings like write_file, edit_file, and delete_file, but never names an alternative, so an agent must infer the boundary itself.

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?

There is no when-to-use guidance, no mention of prerequisites such as the file existing or permission requirements, and no pointer to alternatives such as glob_files for locating a path before reading. The agent gets the bare action and nothing about context of 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