files_read
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, THE...
This record as markdown: /tools/io-github-saloprj-dialogbrain/files-read.md
What files_read does on Dialogbrain
AI agents call files_read to retrieve information from Dialogbrain without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
file_id | integer | Yes | ID of the file to read (from attachment_file_ids in context). |
encoding | string | — | Text encoding to use (default: utf-8). |
max_chars | integer | — | Maximum characters to return (default: 10000). Use smaller values for large files. |
summarize | boolean | — | If true, generate AI summary instead of returning raw content. Use for 'summary', 'summarize', 'краткое содержание' requests. OMIT to return raw content (the de |
Parameters from the server's own tool schema.
Why files_read is rated Low
This tool retrieves and queries file content without side effects. It is a pure read operation that extracts text from documents. The safeguards mentioned (error on binary files, routing hints for other file types) further confirm it is read-only and non-destructive.
From the tool's definition Tool description explicitly states "Read **text content** of an attached file" and lists supported formats (.txt, .md, .json, code files, PDFs). No modification, deletion, or execution capabilities are described.
Attacks that exploit this kind of access
The rule that runs files_read safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Dialogbrain, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For files_read, this is the rule to start with:
files_read is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Dialogbrain, apply this rule, and every files_read call is checked against it from then on.
Questions about files_read
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. It is categorised as a Read tool in the Dialogbrain MCP Server, which means it retrieves data without modifying state.
files_read accepts 4 parameters: file_id, encoding, max_chars, summarize. Required: file_id. The full parameter table on this page comes from the server's own tool schema.
Register the Dialogbrain MCP server in PolicyLayer and add a rule for files_read: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Dialogbrain. Nothing to install.
files_read is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the files_read rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for files_read. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
files_read is provided by the Dialogbrain MCP server (https://api.dialogbrain.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Dialogbrain, and thousands of servers like it.
This server
Across the catalogue