Skip to main content
Glama

syntax_check

Validate MQL4/5 source file syntax to identify errors before compilation. Accepts an absolute Windows path and optional timeout.

Instructions

DEPRECATED (removed in 0.6.0): use compile(source, syntax_only=true).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesAbsolute Windows path to the .mq4/.mq5/.mqh source file.
timeout_secNoGive up after this many seconds.

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 / source / description
      Added value: +"Absolute Windows path to the .mq4/.mq5/.mqh source file."
    • addedInput schema / properties / timeout_sec / description
      Added value: +"Give up after this many seconds."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "syntax_checkDictOutput",
      +  "type": "object"
      +}
  2. First observedv0.4.1

TDQS

A4.1/5.0
Behavior3/5

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

Annotations are all false, so the description carries the burden. It discloses the deprecation and removal version, which is critical behavioral context, but does not state what happens if called (e.g., error, no-op). A warning about deprecation is transparent, but incomplete regarding actual runtime behavior.

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?

One dense sentence that front-loads the deprecation and provides the exact alternative. Zero wasted words.

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?

For a deprecated tool, the most important context is the replacement, which is clearly provided. The output schema exists, so return values are not the focus; the description fully informs an agent of its status and the correct action.

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 parameters. The description adds nothing about parameters, which is acceptable given the high schema coverage; baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The name and description together make it clear this checks syntax, and the description explicitly states it is deprecated and directs to compile(source, syntax_only=true) as a replacement. It distinguishes from siblings by naming the substitute, though it doesn't explicitly restate the verb+resource.

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

Usage Guidelines5/5

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

The description gives explicit guidance: never use this tool, and exactly what to use instead (compile with syntax_only=true). This is the clearest possible direction for an agent.

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