Skip to main content
Glama

Read a file

read_file
Read-onlyIdempotent

Read a file of the organization, such as a chart or report a run saved: text comes back as text, an image (PNG, JPEG, GIF, WebP) as an image you can see, and anything else (a .docx, .xlsx, .pdf) as an embedded resource with its contents in base64; the file's details follow. Files up to max_bytes (default 1 MiB, at most 5 MiB); a larger one is refused with its details, to download through the REST API (GET /v1/files/{id}) or the dashboard's Files page.

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": {
      "id": "<id>"
    },
    "name": "read_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe file's id (or its name: the newest file with that name).
max_bytesNoThe largest file to return (default 1 MiB).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already establish readOnly, idempotent, non-destructive, closed-world behavior, and the description adds substantial context beyond them: the return encoding varies by file type (text, viewable image, base64 embedded resource), the size cap is enforced with a refusal that returns details rather than silent truncation, and a fallback path exists. That is exactly the kind of behavior an agent needs before calling.

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?

Front-loaded with purpose and return-type behavior, and every clause carries information. The second sentence is a long semicolon-and-parenthetical chain that takes effort to parse, but no wording is genuinely expendable.

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

Completeness5/5

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

With no output schema, the description carries the full burden of explaining return values and does so by enumerating all three response shapes plus the trailing file details. Size limits, failure behavior, and a workaround are all covered for a simple two-parameter tool.

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 both parameters are already documented, including the id-or-name resolution and the 1 MiB default / 5 MiB maximum. The description restates the max_bytes limit and adds only the refusal consequence for exceeding it, which is a modest increment over the schema rather than new parameter meaning.

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?

States a specific verb ('Read') and resource ('a file of the organization'), and disambiguates scope with concrete examples ('a chart or report a run saved'). An agent can tell this apart from list_files, upload_file, or delete_file from the description alone.

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

Usage Guidelines4/5

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

Implies the retrieval use case clearly through the enumerated file kinds and return formats, and gives an explicit escape hatch for oversized files (REST API GET /v1/files/{id} or the Files page). It does not explicitly route the agent to list_files for discovering an id, but the guidance present is clear and actionable.

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