Skip to main content
Glama
Universal Quant Tournament MCP

Universal Quant Tournament MCP

sync_or_execute_alpaca

Sync Alpaca account equity, buying power, positions, and open orders, execute a confirmed bracket order payload, or cancel an open order via Alpaca Trading API v2.

Instructions

Directly connects to Alpaca Paper or Live Trading REST API v2 to (1) sync live account equity, buying power, open positions, and open orders, (2) execute a confirmed alpaca_bracket_order payload generated by build_universal_bracket_order, or (3) cancel an open order.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sync_or_execute_alpaca"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionNoAction to perform on Alpaca API v2.get_account_and_orders
paper_tradingNoTrue for Alpaca Paper Trading (paper-api.alpaca.markets), false for Live.
order_id_to_cancelNoAlpaca order ID to cancel (when action is 'cancel_order').
alpaca_order_payloadNoThe alpaca_bracket_order object generated by build_universal_bracket_order (required when action is 'execute_order').
user_confirmed_executionNoMUST be false until the user explicitly confirms the exact symbol, qty, entry, stop_loss, and take_profit in chat.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.3

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It usefully discloses that the tool talks directly to a live brokerage endpoint, that paper vs live is a switch, and that execution requires a "confirmed" payload, but it says nothing about irreversibility of placed orders, failure/partial-fill behavior, rate limits, or what a live-vs-paper mistake means for real funds.

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 front-loaded sentence with three enumerated branches; no filler, no restatement of the tool name, and the most operationally important detail (the target API and its paper/live duality) comes first.

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?

For a tool that can place real-money orders, with no annotations and no output schema, the definition covers the three modes but leaves the agent without return-shape expectations, error semantics, or any warning about the consequences of the live branch. Adequate for routing, thin for safe invocation of the execute/cancel paths.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description goes beyond the schema by tying `alpaca_order_payload` to its producing tool (`build_universal_bracket_order`) and by framing the three action values as distinct operating modes rather than opaque enum strings. The `user_confirmed_execution` gating semantics are still left to the schema text.

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 the concrete resource and endpoint ("Alpaca Paper or Live Trading REST API v2") and enumerates exactly three operations: sync account equity/positions/orders, execute a confirmed bracket payload, and cancel an order. The mention of Alpaca REST v2 versus the sibling `sync_or_execute_local_mt5` makes the scope boundary legible without opening the schema.

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?

The numbered list maps each of the three actions to a situation, and it names `build_universal_bracket_order` as the required producer of the payload for the execute branch, which is genuine routing guidance. It stops short of stating when *not* to use this tool (e.g. preferring the MT5 sibling for local accounts) or what to do if the payload was not built by that tool.

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