Skip to main content
Glama
bartest5

Alpaca MCP Server

by bartest5

Place Option Order

place_option_order
Destructive

Place options orders for single-leg or multi-leg strategies using market or limit types, specifying contract quantity and position intent to open or close 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
legsNo
sideNo
typeNomarket
symbolNo
limit_priceNo
order_classNo
time_in_forceNoday
client_order_idNo
position_intentNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Adds significant behavioral context beyond annotations: client_order_id as idempotency key with retry safety, time_in_force restricted to 'day', multiplier logic for multi-leg, limit_price as net debit/credit, and max 4 legs. These details are not available in the annotations and are crucial for safe execution.

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?

The description is well-structured with a purpose statement followed by an organized Args list. It is thorough but efficient, with no redundant sentences. Front-loads the main purpose and then systematically covers each parameter.

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 complex options order tool with 10 parameters and no parameter descriptions in the schema, the description provides complete information: required fields, optional fields, constraints, and examples. It covers both single-leg and multi-leg scenarios, making it fully actionable.

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 explains every parameter in detail, including formats (e.g., OCC symbol example, string values), required vs optional status, and specific behavior (e.g., qty as strategy multiplier). This fully compensates for the sparse 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 opens with 'Place an options order (single-leg or multi-leg)', clearly stating the verb and resource. It distinguishes from sibling order tools (stock/crypto) by specifying options, and further differentiates between single-leg and multi-leg orders.

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 usage guidance for single-leg vs multi-leg orders, specifying required parameters for each. However, it does not explicitly mention alternative tools (e.g., place_stock_order, place_crypto_order) or state 'use this tool for options only', so it lacks explicit when-not-to-use guidance.

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