Skip to main content
Glama

read_file

Retrieve file contents from the hub using a numeric fileId. Text files up to 1 MB are returned inline; larger or binary files provide metadata for out-of-band sharing.

Instructions

Read the contents of a hub-stored file by fileId. Use this whenever a prompt mentions fileId=N and you need to see what the file contains (the operator uploaded it on their side; the bytes live on the hub, not your local FS). Text-mime content is returned inline up to 1 MB; binary or oversized files return an error with metadata — the operator can share those out-of-band. Access is gated by the channel-token owner's role on the file's session, so cross-tenant fileId guesses are denied.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileIdYesThe numeric fileId from the prompt (e.g. 16 for `fileId=16`).
Behavior5/5

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

Despite no annotations, the description details key behaviors: text inline up to 1MB, binary/oversized return error with metadata, access gated by role, and cross-tenant denial. This provides full transparency.

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?

Five sentences, each adding distinct value: purpose, usage trigger, content handling, access control, and security. Front-loaded with the core action, no extraneous text.

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?

Given no annotations or output schema, the description fully covers what the agent needs: input format, behavior for different content types, error handling, and authorization. It is self-sufficient.

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

Parameters4/5

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

Schema coverage is 100% for the single parameter, and the description adds context that fileId comes directly from a prompt (e.g., 'fileId=16'), reinforcing usage. This goes beyond the schema's description.

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?

The description clearly states it reads a hub-stored file by fileId with a specific verb and resource. It distinguishes from sibling tools by focusing only on file reading, and no sibling is a file read tool.

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

Usage Guidelines5/5

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

Explicitly says to use when a prompt mentions fileId=N and provides context about file location. It also notes that binary/oversized files return an error, implying when not to use effectively.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/clawborrator/channel_v1'

If you have feedback or need assistance with the MCP directory API, please join our Discord server