Skip to main content
Glama
johnamcruz

projectx-mcp

by johnamcruz

Close position

close_position
Destructive

Exit a full position in a contract at market. Resting stop or target orders are not canceled, so review open orders and cancel any leftovers.

Instructions

Flatten the whole position in a contract at market. Does NOT cancel resting stop/target orders; check list_open_orders and cancel leftovers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoWhy; saved to the journal.
accountIdYesTrading account ID from list_accounts.
contractIdYesContract ID, e.g. "CON.F.US.MNQ.Z25". Get it from search_contracts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already signal mutation/destruction, but the description adds crucial behavior beyond that: the close executes at market and does NOT cancel resting stop/target orders. It also instructs the agent to check and cancel leftovers, which materially changes how the tool should be used.

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?

Two short sentences with no filler: the main action comes first, and the critical caveat and follow-up action are second. Every sentence adds operational value.

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 destructive market-close tool with rich schema descriptions and safety annotations, the description covers what the tool does, what it does not do, and what to do next. No output schema exists, but an agent has enough to invoke it correctly.

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 accountId, contractId, and reason. The description reinforces that contractId refers to the contract whose whole position is flattened, but it does not add substantial parameter-level meaning beyond the schema.

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?

States a specific verb and resource: flatten the whole position in a contract at market. 'Whole' and 'at market' clearly distinguish this from partial_close_position and other order-related siblings.

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?

Provides clear context for when to use it (flatten whole position) and an explicit behavioral warning with follow-up routing to list_open_orders and cancel_order. It does not explicitly name partial_close_position as the alternative for partial closes, but 'whole position' makes that boundary clear.

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