Skip to main content
Glama

files_read

Read-onlyIdempotent

Read text content of an attached file. Works for: .txt, .md, .json, code files, and documents (PDF, .docx, .xlsx, .pptx, .odt, .rtf) once files.ingest has indexed them. DO NOT call on binary files — for IMAGES use files.get_base64, for AUDIO/VIDEO it cannot be transcribed via this tool. Calling on a binary mime-type returns an error — saves you a turn to read the routing hint before deciding.

Input 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.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the description's added value is the failure mode (binary mime-type returns an error rather than garbage), the ingest prerequisite, and the summarize/raw return distinction. The closing sentence about 'saving a turn to read the routing hint' is vaguely worded and slightly muddies an otherwise crisp disclosure.

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 action and format list, then the exclusion, then the routing alternatives — good ordering. The final sentence restates the binary-error point already made and does so ambiguously, so it does not fully earn its place.

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 still covers supported inputs, the ingest prerequisite, the binary error path, and the summarize-vs-raw distinction, which is everything an agent needs before calling. Nothing material is left to inference.

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% and the schema already documents file_id provenance, encoding default, max_chars bounds, and the summarize switch with trigger phrases. The description adds no parameter-level detail beyond reinforcing that the output is text content, 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 supported formats, which lets an agent distinguish it from files_get_base64, files_info, and search_files without opening any schema.

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 names the when-not case (binary files), routes images to files.get_base64, rules out audio/video, and states the prerequisite that documents must first be indexed by files.ingest. The alternative-tool routing is concrete rather than implied.

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.