Skip to main content
Glama
alpacahq

alpaca-mcp-server

Official
by alpacahq

Place Stock Order

place_stock_order
Destructive

Execute buy or sell orders for stocks and ETFs using various order types including market, limit, stop, and trailing stop orders.

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 extended hours. Only works with type="limit" and time_in_force="day". 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.

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

The description adds valuable behavioral context beyond annotations. While annotations indicate destructiveHint=true and idempotentHint=false, the description clarifies idempotency behavior for client_order_id ('you can safely retry with the same value'), explains mutual exclusivity rules (qty vs notional), and specifies conditional requirements (e.g., extended_hours only works with specific type/time_in_force combinations).

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 well-structured with a brief purpose statement followed by detailed parameter documentation. While lengthy due to the high parameter count, every sentence adds necessary information. The formatting with clear parameter bullets enhances readability, though the initial purpose statement could be more front-loaded with critical usage context.

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

Completeness4/5

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

Given the high complexity (16 parameters, destructive operation) and 0% schema description coverage, the description provides substantial parameter documentation and behavioral context. With an output schema present, the description appropriately doesn't explain return values. However, it lacks broader usage context like authentication requirements, rate limits, or error scenarios.

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 carries the full burden of explaining parameters. It comprehensively documents all 16 parameters with clear semantics, including examples (e.g., 'AAPL', 'SPY'), valid values, conditional requirements, mutual exclusivity rules, and behavioral implications (e.g., order_class automatically set to 'bracket' when take_profit or stop_loss params are provided).

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 clearly states the tool's purpose as 'Place a stock or ETF order', which is a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'place_crypto_order' or 'place_option_order', though the distinction is implied by the 'stock or ETF' specification.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites (like account permissions or market hours), nor does it reference sibling tools for related functions like 'cancel_order_by_id' or 'replace_order_by_id'.

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/alpacahq/alpaca-mcp-server'

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