Skip to main content
Glama

read_file

Read-only

Read a file (up to 1 MiB). Text comes back as text; other bytes as base64 with encoding='base64'. Works on your workspaces and any public one. For larger files use get_file_link.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe file to read, like 'drafts/report.md'.
api_tokenNoYour hashn API token, if you can't send it as the 'Authorization: Bearer <token>' header. Omit it when the header is set.
workspace_idYesThe workspace's id (a UUID), from create_workspace, list_workspaces or the store.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / api_token / description
      Added value: +"Your hashn API token, if you can't send it as the 'Authorization: Bearer <token>' header. Omit it when the header is set."
    • addedInput schema / properties / path / description
      Added value: +"The file to read, like 'drafts/report.md'."
    • addedInput schema / properties / workspace_id / description
      Added value: +"The workspace's id (a UUID), from create_workspace, list_workspaces or the store."
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and openWorldHint=false, but the description adds real behavioral context: the 1 MiB ceiling, the text-vs-base64 return encoding, and the cross-workspace read scope. The mention of 'encoding=base64' is slightly confusing since no such parameter exists in the schema, which keeps this from 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.

Conciseness5/5

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

Three short sentences with zero filler; the capability and its size bound are front-loaded, and the alternative routing is stated last where it belongs.

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?

With no output schema, the description usefully explains the return format (text vs base64) and the size ceiling, which is exactly what an agent needs. It is nearly complete, though the dangling 'encoding=base64' reference slightly muddies the return contract.

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%, so path, api_token, and workspace_id are already fully documented in the schema. The description adds no syntax or meaning beyond that, making the baseline 3 appropriate.

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 and resource ('Read a file') and immediately bounds the operation with a size limit ('up to 1 MiB'). This clearly separates it from siblings like write_file, delete_file, and get_file_link.

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?

Explicitly routes the oversized-file case to the right alternative: 'For larger files use get_file_link.' It also clarifies the access scope ('your workspaces and any public one'). It does not cover other adjacent siblings such as file_history or list_files, so it stops short of a full when/when-not map.

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