Skip to main content
Glama
Erfangit23

MT5 MCP Server

by Erfangit23

close_position

Closes an open MetaTrader 5 position by ticket, fully or partially using a specified volume, to exit trades or reduce exposure.

Instructions

Close an open position by ticket (fully, or partially with volume).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticketYes
volumeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It reveals that closing can be partial, but omits critical trading semantics: whether the close executes at market, what happens if `volume` exceeds the open size, error behavior for an invalid ticket, and whether the action is irreversible.

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?

A single tight sentence with the action and mechanism front-loaded and zero filler. Nothing in it could be cut without losing information.

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

Completeness3/5

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

The description covers the minimum an agent needs to call the tool, but for a financial mutation with no annotations, no output schema, and two undocumented parameters, more operational context (execution style, failure modes, ticket source) should have been supplied.

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 0%, so the description must compensate, and it partially does: it clarifies that `volume` triggers a partial close and that its absence implies a full close. It never explains where `ticket` comes from (e.g., get_positions) or the units of `volume`.

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 description gives a specific verb and resource ("Close an open position") plus the two operating modes, so the agent knows exactly what the tool does. It does not name or contrast itself with siblings like modify_position or cancel_pending_order, so it falls short of a 5.

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?

Usage is implied by the phrase "Close an open position by ticket" — the agent can infer it is the tool for exiting an existing position. However, there is no explicit when-not guidance (e.g., use modify_position to change SL/TP instead, or when a partial close is preferable to a full one).

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