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); a document still being indexed is awaited briefly. DO NOT call on binary files — for IMAGES use files.get_base64, for AUDIO/VIDEO use files.transcribe (transcript + key frames). 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. Changed2 schema fields changed
    • removedInput schema / properties / summarize / default
      Removed value: -false
    • changedInput schema / properties / summarize / description
      Previous value: -"If true, generate AI summary instead of returning raw content. Use for 'summary', 'summarize', 'краткое содержание' requests."New value: +"If true, generate AI summary instead of returning raw content. Use for 'summary', 'summarize', 'краткое содержание' requests. OMIT to return raw content (the default)."
  5. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered structurally; the bar is lower. The description does add real context — the brief wait on files still being indexed and the error on binary mime-types — but says nothing about truncation or how content is returned when max_chars is hit.

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 exclusions, so the most important information comes first. Slightly verbose in the closing clause ('saves you a turn to read the routing hint before deciding'), which restates the benefit already implied by naming the alternatives.

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 should say something about what comes back; it says only 'text content' and never mentions truncation behavior or the summary variant, leaving a small gap. The routing guidance and indexing note are otherwise sufficient for correct invocation.

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 summarize and max_chars are fully documented in the schema, making 3 the baseline. The description adds no parameter-level meaning beyond what the schema provides — notably it never mentions the summarize mode in the body text.

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+resource ('Read text content of an attached file') and immediately enumerates the supported formats, which pins down the exact operation. It also explicitly distinguishes itself from files_get_base64 and files_transcribe, so an agent can tell the three file-reading routes apart without opening a 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?

Explicit when-not ('DO NOT call on binary files') plus named alternatives for each excluded case (images → files.get_base64, audio/video → files.transcribe). The consequence of misuse ('returns an error') is given too, which is exactly the routing guidance an agent needs.

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