Skip to main content
Glama

files_read

Read-onlyIdempotent

Read text content of an attached file. Works for: .txt, .md, .json, code files, and PDFs (after files.ingest extracts text). DO NOT call on binary files — for IMAGES use files.get_base64, for AUDIO/VIDEO it cannot be transcribed via this tool, and for non-PDF DOCUMENTS run files.ingest first, THEN files.read. Calling on a binary mime-type returns an error — saves you a turn to read the routing hint before deciding.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYesID of the file to read (from attachment_file_ids in context).
encodingNoText encoding to use (default: utf-8).utf-8
max_charsNoMaximum characters to return (default: 10000). Use smaller values for large files.
summarizeNoIf true, generate AI summary instead of returning raw content. Use for 'summary', 'summarize', 'краткое содержание' requests. OMIT to return raw content (the default).
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  2. Added
  3. Removed
  4. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, so the safety profile is covered. The description adds genuine value beyond that by disclosing failure behavior ('calling on a binary mime-type returns an error') and the ingest-then-read ordering for documents. It stops short of describing truncation/pagination behavior around max_chars.

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-loads the core purpose in the first sentence, then the routing rules. Mostly tight, though the closing clause ('saves you a turn to read the routing hint before deciding') is rationale-flavored padding that could be trimmed.

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?

For a read-only tool with no output schema, the description tells the agent what content is returned (text), which formats work, what fails, and how to route elsewhere. Complete enough to call correctly; only minor gaps around truncation limits remain, which the schema's max_chars partially covers.

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 all five parameters (including encoding, max_chars, summarize, in_workspace) are already documented in the schema. The description adds no additional parameter semantics, so the baseline 3 applies.

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 text content of an attached file') and enumerates the supported formats (.txt, .md, .json, code, PDFs after ingest). It clearly distinguishes itself from files.get_base64 and files.ingest by naming them as the correct routes for other content types.

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?

Gives explicit when-to-use ('read text content') and when-not-to-use guidance with named alternatives: images -> files.get_base64, non-PDF documents -> files.ingest first, audio/video unsupported. This is the model routing guidance an agent needs to pick the right sibling.

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.