Read one MQL5 draft
get_draftRetrieve a full MQL5 draft's source code, compiler log, and diagnostics to understand why it failed to compile or to inspect the current code.
Instructions
Read one MQL5 draft the API key owns: its full source code, its compiler log, its diagnostics, and whether the last compile still matches the current source. Use it to answer "why did this fail to compile" or "show me the code". draftId is the id field from list_drafts. THE RESPONSE CAN BE LARGE — a draft may hold up to 192 KiB of source plus 16 KiB of compiler log, and this server returns that content twice (once as text, once as structured data) — roughly 105,000 tokens worst case. Attachment source is NOT included; the attachments are listed with their size, and list_draft_attachments returns their code. For a cheap overview of every draft, call list_drafts instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| draftId | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| name | Yes | ||
| notes | Yes | ||
| createdAt | Yes | ||
| updatedAt | Yes | ||
| sourceCode | Yes | ||
| attachments | Yes | ||
| logTruncated | Yes | ||
| eaDefinitionId | Yes | ||
| lastCompileLog | Yes | ||
| compiledUpToDate | Yes | ||
| lastCompileStatus | Yes | ||
| lastCompileDiagnostics | Yes |