Skip to main content
Glama
bartest5

Alpaca MCP Server

by bartest5

Place Stock Order

place_stock_order
Destructive

Place buy or sell orders for stocks and ETFs with configurable order type, quantity or notional amount, time-in-force, and advanced routing options.

Instructions

Place a stock or ETF order.

Args: symbol: Stock ticker (e.g., "AAPL", "SPY"). side: "buy" or "sell". qty: Number of shares. Mutually exclusive with notional. notional: Dollar amount to trade. Mutually exclusive with qty. Only valid for market orders with time_in_force="day". type: Order type — "market", "limit", "stop", "stop_limit", "trailing_stop". time_in_force: "day", "gtc", "opg", "cls", "ioc", or "fok". limit_price: Required for limit and stop_limit orders. stop_price: Required for stop and stop_limit orders. trail_price: Dollar trail amount for trailing_stop orders. trail_percent: Percent trail for trailing_stop orders. extended_hours: Allow execution in pre-market, after-hours, and overnight sessions. Only works with type="limit" and time_in_force="day" or "gtc". client_order_id: Unique idempotency key. If the request times out, you can safely retry with the same value — the API will reject duplicates. Recommended for every order. order_class: "simple", "bracket", "oco", or "oto". Automatically set to "bracket" when take_profit or stop_loss params are provided. take_profit_limit_price: Limit price for bracket take-profit leg. stop_loss_stop_price: Stop price for bracket stop-loss leg. stop_loss_limit_price: Limit price for bracket stop-loss leg. advanced_instructions: Alpaca Elite Smart Router routing/algo payload. Stocks-only (the Elite docs explicitly note options and crypto reject the payload). Requires the account to be on Elite Smart Router routing; non-Elite accounts will see the field ignored or rejected by Alpaca's API. Shapes: DMA Gateway (direct routing): {"algorithm": "DMA", "destination": "NYSE"|"NASDAQ"|"ARCA", "display_qty": "<round lot, optional>"} Only with type="limit"|"market" and time_in_force="day"; not compatible with opg/cls/gtc or stop orders. VWAP (Volume-Weighted Average Price): {"algorithm": "VWAP", "start_time": "<RFC3339, optional>", "end_time": "<RFC3339, optional>", "max_percentage": "<0<x<1, optional>"} Does NOT participate in open/close auctions. TWAP (Time-Weighted Average Price): {"algorithm": "TWAP", "start_time": "<RFC3339, optional>", "end_time": "<RFC3339, optional>", "max_percentage": "<0<x<1, optional>"} Does NOT participate in open/close auctions. NOTE: PATCH /v2/orders/{id} already documents advanced_instructions in the OpenAPI spec (PatchOrderRequest), and replace_order_by_id exposes it through auto-generation — this patch only addresses the POST-side asymmetry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qtyNo
sideYes
typeNomarket
symbolYes
notionalNo
stop_priceNo
limit_priceNo
order_classNo
trail_priceNo
time_in_forceNoday
trail_percentNo
extended_hoursNo
client_order_idNo
stop_loss_stop_priceNo
advanced_instructionsNo
stop_loss_limit_priceNo
take_profit_limit_priceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description goes beyond the annotations by disclosing idempotency behavior (client_order_id allows safe retry), account prerequisites (Elite routing requirement for advanced_instructions), and execution constraints (VWAP/TWAP not participating in auctions). No contradiction with annotations.

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 lengthy but well-structured with an 'Args' block. Every sentence contains specific constraints. The advanced_instructions section is verbose but useful, so this is conciseness earned through complexity.

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 17-parameter order tool with no schema descriptions, the description covers all parameters, constraints, and behavioral caveats. The presence of an output schema means return values don't need explanation.

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?

With 0% schema description coverage, the description compensates fully by explaining all 17 parameters, mutual exclusions (qty vs notional), and conditional requirements (limit_price for limit orders). This is exceptional.

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 opens with 'Place a stock or ETF order,' using a specific verb and resource. This clearly distinguishes it from sibling tools like place_crypto_order and place_option_order.

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 title and description explicitly scope this tool to stock/ETF orders, providing clear usage context. It doesn't name alternatives explicitly, but the scope itself separates it from crypto/option order tools, so the context is clear.

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/bartest5/alpacahq_alpaca-mcp-server'

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