Skip to main content
Glama
PublicDotCom

Public.com MCP Server

Official
by PublicDotCom

preflight_order

Read-only

Estimate trade costs and impact before placing an order. Get commission, fees, order value, buying power, and margin impact without executing the trade.

Instructions

Estimate costs and impact of a potential single-leg trade before placing it.

Returns estimated commission, regulatory fees, order value, buying power requirements, and margin impact. Does NOT place an order.

Args: symbol: Ticker symbol (e.g. "AAPL"). instrument_type: EQUITY, OPTION, or CRYPTO. order_side: BUY or SELL. order_type: MARKET, LIMIT, STOP, or STOP_LIMIT. time_in_force: DAY or GTD. Default is DAY. quantity: Number of shares/contracts (mutually exclusive with amount). amount: Dollar amount (mutually exclusive with quantity). limit_price: Required for LIMIT and STOP_LIMIT orders. stop_price: Required for STOP and STOP_LIMIT orders. open_close_indicator: For options only — OPEN or CLOSE. expiration_time: Required when time_in_force is GTD. ISO 8601 format. equity_market_session: CORE or EXTENDED. For equity orders only. tax_lot_matching_instructions: Optional list of specific tax lots to sell, each a dict {"tax_lot_id": str, "quantity": str}. Constraints enforced by the API: at most 8 per request; only for a SELL equity order with open_close_indicator=CLOSE; every lot must be the same symbol as the order; only MARKET or good-for-day LIMIT orders; the quantities must sum to the order quantity; and the account's tax-lot information must have been updated today. Omit to let the broker apply its default lot-matching. account_id: Account ID. Optional if PUBLIC_COM_ACCOUNT_ID is set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountNo
symbolYes
quantityNo
account_idNo
order_sideYes
order_typeYes
stop_priceNo
limit_priceNo
time_in_forceNoDAY
expiration_timeNo
instrument_typeYes
open_close_indicatorNo
equity_market_sessionNo
tax_lot_matching_instructionsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already mark readOnlyHint=true and destructiveHint=false. The description adds that the tool returns estimated fees, buying power, and margin impact, and emphasizes no order placement. This contextualizes the read-only behavior well.

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 front-loaded with the core purpose, followed by a summary of outputs, then a well-organized parameter list. Every sentence adds value; no wasted words.

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 tool's complexity (14 params, 4 required) and the presence of an output schema, the description fully covers all parameters and their constraints. It provides necessary context for correct invocation.

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 0%, so the description carries the full burden. It provides detailed inline explanations for all 14 parameters, including defaults, mutual exclusivity (quantity vs amount), required conditions (e.g., limit_price for LIMIT), and constraints on tax_lot_matching_instructions. This adds significant meaning.

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 explicitly states 'Estimate costs and impact of a potential single-leg trade before placing it.' This clearly identifies the verb (estimate), resource (costs/impact), and distinguishes from sibling tools like place_order (which places) and preflight_multileg_order.

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?

The description explains it returns estimates and does NOT place the order, providing clear context. However, it does not explicitly exclude other preflight tools or specify when not to use; sibling differentiation is implied by 'single-leg trade'.

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/PublicDotCom/publicdotcom-mcp-server'

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