Skip to main content
Glama
ak40u

mt4ctl

by ak40u

mt4_deploy

Idempotently deploy a strategy bundle to an MT4 terminal, updating only managed charts and experts while preserving other files.

Instructions

Deploy a strategy bundle to a terminal — idempotent, managed-subset.

Pushes pre-built charts + experts so the terminal's managed files match the bundle, while leaving foreign files (e.g. a watchdog's chart) untouched. This is apply-only: it does NOT select strategies, set lots/magic, generate charts, or compile — the caller owns the bundle's contents.

bundle is a LOCAL directory on this machine (read here and pushed over SSH — NOT a path on the remote host). It mirrors the MT4 layout:

<bundle>/
  profiles/default/<name>.chr        # ready charts (one expert each)
  MQL4/Experts/<folder>/<ea>.ex4     # the experts those charts reference

Always run with dry_run=true first to preview the add/update/remove/foreign plan. Re-running the same bundle is a no-op (reports "no changes"). A terminal tagged env=live requires confirm=true. There is no rollback command: to recover, re-deploy the previous bundle (a pre-apply backup is also retained and is restored automatically if an apply fails).

reset_market_watch deletes symbols.sel in the stopped window (backed up first) so MT4 rebuilds Market Watch on the deploy's own start — caps unbounded symbol carry-over; it forces a stop/start cycle even with no file changes. After the restart, verify polls up to verify_timeout seconds rather than taking a single snapshot, so normal reconnect timing is not reported as a failed deploy.

Args: terminal: terminal id. bundle: local bundle directory path. dry_run: preview the plan without changing anything (no lock, no upload). confirm: must be true to deploy to a terminal tagged env=live. reset_market_watch: rebuild Market Watch by deleting symbols.sel while stopped. verify_timeout: seconds to poll post-restart health before reporting (default ~120).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
terminalYes
bundleYes
dry_runNo
confirmNo
reset_market_watchNo
verify_timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With zero annotations, the description fully bears the burden of disclosing behavioral traits. It thoroughly explains idempotency ('re-running the same bundle is a no-op'), the apply-only nature, no rollback but recovery via previous bundle, backup retention, and precise details on reset_market_watch and verify_timeout. It also lists what the tool does not do, which is excellent for transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: a one-sentence summary followed by paragraphs on key behaviors and parameter details. It is front-loaded with the core action. While somewhat lengthy, the detail is necessary given zero schema coverage, and every sentence adds value. A slight reduction in verbosity (e.g., condensing the reset_market_watch explanation) could improve conciseness, but it remains clear.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema (not detailed in description), the description covers all behavioral aspects, including idempotency, what is and isn't done, parameter semantics, error handling (dry run, confirm), recovery strategy, and specifics of reset_market_watch and verify_timeout. For a deployment tool with six parameters and no annotations, this description is remarkably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must define all parameters. It does so comprehensively: terminal is a terminal id, bundle a local directory path with expected structure, dry_run for preview, confirm for live deployments, reset_market_watch deletes symbols.sel, verify_timeout a polling duration. The description adds context beyond the schema, like the bundle's MT4 layout and the effect of reset_market_watch on restart timing.

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 clearly states the tool deploys a strategy bundle to a terminal, is idempotent, and manages only a subset of files. It specifies what the tool does (push pre-built charts + experts) and, notably, what it does NOT do (select strategies, set lots, etc.), making the purpose unmistakable. The verb 'Deploy' and resource 'bundle to a terminal' are specific and distinguish it from sibling tools like mt4_autotrading or mt4_control.

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 description provides implicit usage guidance (e.g., always run with dry_run=true first, confirm required for live terminals) but does not explicitly state when to use this tool versus its siblings. It mentions idempotency and no rollback, but without direct comparisons to mt4_adopt, mt4_ea_list, etc. The guidance is clear for the tool's own usage but lacks exclusion criteria or alternative tool recommendations.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ak40u/mt4ctl'

If you have feedback or need assistance with the MCP directory API, please join our Discord server