Skip to main content
Glama
alpacahq

alpaca-mcp-server

Official
by alpacahq

Place Option Order

place_option_order
Destructive

Execute options trades through the Alpaca MCP server, supporting both single-leg and multi-leg strategies to manage positions.

Instructions

Place an options order (single-leg or multi-leg).

For single-leg orders, provide symbol, side, and qty. For multi-leg orders, provide qty, legs, and optionally order_class="mleg" (auto-inferred). Symbol and side on the parent are not needed for multi-leg.

Args: qty: Number of contracts. Required for both single-leg and multi-leg orders. For multi-leg, this is the strategy multiplier — each leg's ratio_qty is scaled by this value (e.g., qty="10" with ratio_qty="2" = 20 contracts for that leg). type: "market" or "limit". time_in_force: "day" only. Options do not support other values. symbol: OCC option symbol (e.g., "AAPL250321C00150000"). Required for single-leg. side: "buy" or "sell". Required for single-leg. position_intent: "buy_to_open", "buy_to_close", "sell_to_open", or "sell_to_close". Clarifies whether the trade opens or closes a position. Optional but recommended. limit_price: Required for limit orders. For multi-leg, this is the net debit/credit (positive = debit/cost, negative = credit/proceeds). 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: Set to "mleg" for multi-leg orders. Automatically inferred when legs are provided. legs: List of leg dicts for multi-leg orders (max 4). Each leg requires "symbol" and "ratio_qty" (string). Optional per-leg fields: "side" ("buy" or "sell") and "position_intent".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qtyYes
typeNomarket
time_in_forceNoday
symbolNo
sideNo
position_intentNo
limit_priceNo
client_order_idNo
order_classNo
legsNo

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: it explains idempotency behavior ('If the request times out, you can safely retry with the same value — the API will reject duplicates'), clarifies that 'time_in_force' is restricted to 'day' only for options, and explains the financial implications of limit_price signs. While annotations provide safety hints (destructiveHint: true), the description adds practical implementation details.

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 clear sections: purpose statement, single-leg vs multi-leg differentiation, and detailed parameter explanations. While comprehensive, every sentence serves a purpose - no wasted words. The front-loaded distinction between order types is particularly effective for agent comprehension.

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?

Given the complexity of options trading with 10 parameters, 0% schema coverage, and destructiveHint: true annotation, the description provides complete context. It covers all parameter semantics, usage conditions, behavioral constraints, and financial implications. The presence of an output schema means return values don't need explanation, allowing focus on input semantics and usage guidance.

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 fully compensates by providing detailed semantic explanations for all 10 parameters. It explains qty's dual role as contract count and strategy multiplier, clarifies symbol format requirements, defines position_intent values, explains limit_price sign conventions, and provides comprehensive leg structure details. This adds substantial value beyond the bare 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?

The description starts with a specific verb ('Place') and resource ('options order'), clearly stating the tool's function. It immediately distinguishes between single-leg and multi-leg orders, providing explicit differentiation from sibling tools like place_stock_order and place_crypto_order by focusing specifically on options trading.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use specific parameters: 'For single-leg orders, provide symbol, side, and qty' and 'For multi-leg orders, provide qty, legs, and optionally order_class="mleg"'. It also clarifies exclusions: 'Symbol and side on the parent are not needed for multi-leg.' This gives clear conditional usage rules.

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