Skip to main content
Glama
PublicDotCom

Public.com MCP Server

Official
by PublicDotCom

place_multileg_order

Place multi-leg options orders such as spreads and straddles by specifying leg details, quantity, and limit price. Executes real trades, so run preflight verification first.

Instructions

Place a multi-leg order (options strategies: spreads, straddles, etc.).

⚠️ This executes a real trade. Consider running preflight_multileg_order first.

Args: legs: List of leg objects. Each leg must have: - symbol (str): The option/equity symbol (e.g. "SPY260313P00670000") - type (str): EQUITY or OPTION - side (str): BUY or SELL - open_close_indicator (str, optional): OPEN or CLOSE (required for options) - ratio_quantity (int, optional): Ratio between legs (default 1) Example: [{"symbol": "SPY260313P00670000", "type": "OPTION", "side": "SELL", "open_close_indicator": "OPEN", "ratio_quantity": 1}, {"symbol": "SPY260313P00665000", "type": "OPTION", "side": "BUY", "open_close_indicator": "OPEN", "ratio_quantity": 1}] quantity: Number of spreads. Must be > 0. limit_price: Limit price. Positive for debit, negative for credit. time_in_force: DAY or GTD. Default is DAY. expiration_time: Required when time_in_force is GTD. ISO 8601 format. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
legsYes
quantityYes
account_idNo
limit_priceYes
time_in_forceNoDAY
expiration_timeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.4.0
    • addedInput schema / $defs
      Added value: +{
      +  "OrderLeg": {
      +    "description": "One leg of a multi-leg options/equity order.",
      +    "properties": {
      +      "open_close_indicator": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "OPEN",
      +              "CLOSE"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "OPEN for new positions, CLOSE to close existing. Required for option legs.",
      +        "title": "Open Close Indicator"
      +      },
      +      "ratio_quantity": {
      +        "default": 1,
      +        "description": "Ratio between legs in the spread (default 1).",
      +        "title": "Ratio Quantity",
      +        "type": "integer"
      +      },
      +      "side": {
      +        "description": "Order side.",
      +        "enum": [
      +          "BUY",
      +          "SELL"
      +        ],
      +        "title": "Side",
      +        "type": "string"
      +      },
      +      "symbol": {
      +        "description": "Option OCC symbol (e.g. 'SPY260313P00670000') for options, or ticker (e.g. 'AAPL') for equity.",
      +        "title": "Symbol",
      +        "type": "string"
      +      },
      +      "type": {
      +        "description": "Instrument type.",
      +        "enum": [
      +          "EQUITY",
      +          "OPTION"
      +        ],
      +        "title": "Type",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "symbol",
      +      "type",
      +      "side"
      +    ],
      +    "title": "OrderLeg",
      +    "type": "object"
      +  }
      +}
    • addedInput schema / properties / legs / items / $ref
      Added value: +"#/$defs/OrderLeg"
    • removedInput schema / properties / legs / items / additionalProperties
      Removed value: -true
    • removedInput schema / properties / legs / items / type
      Removed value: -"object"
  2. First observedv0.3.1

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=false; description adds 'executes a real trade' warning and references preflight, providing useful behavioral context beyond annotations.

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?

Front-loaded with purpose and warning, then clear parameter breakdown with example; every sentence earns its place with no redundancy.

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?

Covers all parameters with explanations and example, references relevant sibling tool (preflight_multileg_order), and output schema exists so return format is not required.

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?

Despite 0% schema description coverage, the description extensively documents each parameter (e.g., limit_price meaning, leg structure with example), adding significant value beyond the 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?

Clearly states 'Place a multi-leg order (options strategies: spreads, straddles, etc.)' – specific verb and resource, and distinguishes from siblings like place_order and specific spread tools.

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?

Explicitly warns about real trade execution and recommends running preflight_multileg_order first, providing clear context for when to use this tool vs. the preflight alternative.

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