Skip to main content
Glama
Public.com MCP Server

Public.com MCP Server

Official
by PublicDotCom

place_multileg_order

Submit real multi-leg options orders such as spreads and straddles with preflight validation and limit checks; refused orders return submitted=false.

Instructions

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

⚠️ This executes a real trade. Before submitting, the server preflights this exact order and refuses it if the preflight fails or breaks a configured limit; when the client supports it, the user is asked to confirm. A refused order comes back with "submitted": false and is not sent.

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "legs": "<legs>",
      "quantity": "<quantity>",
      "limit_price": "<limit_price>"
    },
    "name": "place_multileg_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
legsYes
quantityYes
account_idNo
limit_priceYes
time_in_forceNoDAY
expiration_timeNo

Output 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.2/5.0
Behavior5/5

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

Goes well past the annotations by disclosing that this executes a real trade, that the server preflights the exact order and rejects it on limit violations, that a user confirmation may be triggered, and that a refused order returns "submitted": false and is never sent. The non-idempotent, open-world nature signalled by annotations is reinforced and made concrete. No contradiction with destructiveHint=false, since placing an order is a creation, not a destructive mutation.

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 safety warning is front-loaded and the args section is organized per parameter with the highest-risk information first. The inline leg example is somewhat long but earns its place by showing a valid spread structure that the JSON schema does not demonstrate. Minor redundancy between the leg field list and the nested schema.

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?

For a six-parameter, order-executing tool with an output schema present, the description covers confirmation, refusal semantics, and every argument, so return values need not be explained. It stops short of noting leg-count limits, whether legs must share an underlying/expiration, or whether a separate preflight call is ever needed.

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?

Schema coverage is reported as 0%, and the description fully compensates: it enumerates every leg field with allowed values, gives a concrete two-leg example, explains quantity as number of spreads, and specifies the non-obvious limit_price sign convention (positive debit, negative credit). It also clarifies expiration_time is conditionally required and that account_id falls back to PUBLIC_COM_ACCOUNT_ID.

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?

States a specific verb and resource ("Place a multi-leg order") and scopes it to options strategies such as spreads and straddles, which lets an agent separate it from single-leg place_order. It never names the strategy-specific siblings (place_call_credit_spread, place_put_debit_spread, etc.), so the boundary with those helpers has to be inferred from the tool name alone.

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

Usage Guidelines3/5

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

Usage context is implied rather than stated: the parenthetical about options strategies tells the agent this is the general multi-leg path, and the preflight paragraph implies the server may already do what preflight_multileg_order would do. There is no explicit "use this when X, use preflight_multileg_order / place_order when Y" routing, so the agent must guess between the general and strategy-specific tools.

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