Skip to main content
Glama
dchumari
by dchumari

Read an MQL5 source file

read_file

Reads a text file such as .mq5 or .mqh from a sandboxed MQL5 data folder to inspect MQL5 source code.

Instructions

Reads a text file (e.g. .mq5/.mqh) from under the sandboxed MQL5 data folder.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYese.g. "Experts/Advisors/MyEA.mq5"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full behavioral burden. It usefully discloses that the scope is sandboxed and text-only, but it omits permissions, error behavior, encoding, size limits, and whether the operation is strictly read-only, leaving key operational traits unstated.

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?

The definition is a single front-loaded sentence with no wasted words. The scope constraint and examples are included immediately, making it easy for an agent to parse.

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 simple one-parameter read tool, the schema fully documents the path and the description supplies the sandbox scope and file-type context. The only minor gap is that it does not explicitly describe the return value, though 'Reads a text file' strongly implies file contents.

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 description coverage is 100% and the path parameter already has an example. The description still adds meaning by clarifying that the file must live under the sandboxed MQL5 data folder and by naming expected source-file extensions (.mq5/.mqh), which goes beyond the schema's bare example string.

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 gives a specific verb ('Reads'), a resource ('text file'), an examples list (.mq5/.mqh), and a clear scope ('sandboxed MQL5 data folder'). This is sufficient to distinguish it from sibling tools such as write_file, delete_file, and list_files 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 Guidelines3/5

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

The sandboxed MQL5 data folder context implies when the tool is appropriate for reading source files, but there is no explicit guidance on when to use it versus list_files for discovery or write_file for modification. No exclusions or prerequisites are stated.

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