Skip to main content
Glama
Public.com MCP Server

Public.com MCP Server

Official
by PublicDotCom

buy_event_contract

Place a real DAY limit order to buy the YES or NO side of a prediction market; the server preflights and can refuse the order before submission.

Instructions

Buy an event contract (a YES or NO side of a prediction market) with a DAY limit order.

⚠️ 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. For a recurring market such as a 15-minute window, find the window with get_current_event, its contracts with get_event_details, and the result with wait_for_settlement.

Args: contract_symbol: The contract to buy, from get_event_details, e.g. "KALSHI.KXBTC15M-26OCT201200-00.Y" (".Y" = YES, ".N" = NO). Not the "-EVENTCONTRACT" symbol that get_event_contract_bars takes. quantity: Number of contracts (default "1"); at most 2 decimal places. limit_price: Most to pay per contract, in dollars with whole cents between 0.01 and 0.99 (e.g. "0.55"). If omitted, the contract's current ask is looked up via event_symbol and rounded up to a whole cent. event_symbol: The contract's eventSymbol, e.g. "KALSHI.KXBTC15M-26OCT201200". Required when limit_price is omitted. 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": {
      "contract_symbol": "<contract_symbol>"
    },
    "name": "buy_event_contract"
  }
}

Input Schema

NameRequiredDescriptionDefault
quantityNo1
account_idNo
limit_priceNo
event_symbolNo
contract_symbolYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=true) by disclosing that this moves real money, that the server preflights the exact order and refuses it on failure or limit breach, that the user is prompted to confirm where supported, and that a refusal returns "submitted": false and is never sent. That failure-mode and confirmation behavior is exactly the context annotations cannot carry.

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?

Purpose and the real-trade warning are front-loaded, and the per-argument block is justified by the empty schema descriptions. A few sentences are longer than needed (the preflight sentence packs four distinct facts), but nothing is redundant.

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 non-idempotent, open-world financial mutation, the description covers risk, confirmation, refusal semantics, symbol provenance, and the parameter fallback chain, while the existing output schema removes any need to describe return values. Nothing an agent needs before firing this tool is missing.

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 description coverage is 0%, yet the Args block documents all five parameters: contract_symbol's format and .Y/.N suffix, quantity's default and two-decimal cap, limit_price's 0.01–0.99 whole-cent range, event_symbol's role, and account_id's env-var fallback. It also exposes a cross-parameter dependency absent from the schema — event_symbol is required precisely when limit_price is omitted — which no schema field states.

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?

Opens with a specific verb and resource ('Buy an event contract (a YES or NO side of a prediction market) with a DAY limit order'), which immediately distinguishes it from read-only siblings like get_event_details and from preflight_buy_event_contract. It also disambiguates the resource itself by defining what a YES/NO side is.

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?

Gives concrete workflow guidance — locate the window with get_current_event, the contract with get_event_details, and the result with wait_for_settlement — and warns that the symbol differs from the one get_event_contract_bars accepts. It stops short of an explicit 'when-not-to-use', e.g. pointing to preflight_buy_event_contract for a dry run, so the alternative-selection picture is clear but not complete.

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