Skip to main content
Glama

compile_and_deploy

Destructive

Compile MetaTrader source and, on success, deploy the fresh binary to the Experts/ folder for immediate use in backtests or smoke tests.

Instructions

Compile a source and, if it succeeds, copy the fresh binary into the terminal's Experts/ folder.

Use this before run_backtest or smoke_test. Returns the compile result plus deploy; ok is false if either stage failed (compile errors are in compile.errors).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesAbsolute Windows path to the .mq4/.mq5/.mqh source file.
ea_nameNoFile name for the binary inside Experts/; defaults to <stem>.ex5.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.5.0
    • addedInput schema / properties / ea_name / description
      Added value: +"File name for the binary inside Experts/; defaults to <stem>.ex5."
    • addedInput schema / properties / source / description
      Added value: +"Absolute Windows path to the .mq4/.mq5/.mqh source file."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "compile_and_deployDictOutput",
      +  "type": "object"
      +}
  2. First observedv0.4.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already mark this as destructive and non-idempotent, so the bar for extra behavioral disclosure is lower. The description adds valuable conditional behavior: deploy only happens after successful compile, and `ok` is false if either stage fails, with compile errors surfaced in `compile.errors`.

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?

Three short sentences, each earning its place: the core operation, the intended usage context, and the return/error semantics. The most important information is front-loaded.

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 two-stage tool with an output schema and destructive annotations, the description covers the essential sequence, failure behavior, and when to use it. It could mention that deploying may overwrite an existing binary, but the annotations already signal destructiveness, so this is not a major gap.

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 the schema already documents both `source` and `ea_name`. The description adds no new parameter-level detail beyond naming the source as the thing compiled, so the baseline 3 is appropriate.

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 names a specific verb and resource: compile a source and, on success, copy the binary into Experts/. It clearly distinguishes itself from siblings like `compile` or `deploy` by describing the combined two-stage operation and the resulting deploy location.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

It explicitly states when to use the tool: before `run_backtest` or `smoke_test`. It does not, however, tell the agent when to prefer standalone `compile` or `deploy` instead, so the guidance is clear but not fully contrastive.

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