compile
Compile .mq4/.mq5/.mqh files using MetaEditor CLI with configurable include path and logging.
Instructions
Compile a .mq4/.mq5/.mqh source via MetaEditor CLI.
Args:
source: Absolute path to the source file.
include: Optional MQL root override (parent of Include/). Defaults to terminal MQL root.
log_file: Optional explicit log path. Defaults to .log.
timeout_sec: Subprocess timeout.
Returns: returncode, structured errors/warnings lists, result_errors/result_warnings,
log_path, log_excerpt (last 80 lines), cmd.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source": "<source>"
},
"name": "compile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| include | No | ||
| log_file | No | ||
| timeout_sec | No |