Skip to main content
Glama
bybit-exchange

Bybit MCP Server

Official

getPredictionOrderEstimate

Read-only

Get prediction order estimates before every buy or sell to reveal expected fill price, shares, fees, and FOK full-fill feasibility.

Instructions

Get estimated execution details for a prediction market order before placing it. Returns estimated average fill price, total shares received/sold, fee, and whether the FOK order can be fully filled.

Mandatory before any buy or sell. AI agent must show estimated results to the user before proceeding to execution.

  • BUY: set side=1, amount = USDC to invest, payTokenCode = "USDC"

  • SELL: set side=2, amount = number of shares to sell

Phase 1 supports orderType=1 (FOK) only. A FOK order that cannot be fully filled will be cancelled entirely.

Agent hint: REQUIRED before calling buy or sell. Always show the estimate to the user first. side=1 is BUY (amount in USDC), side=2 is SELL (amount in shares). orderType=1 (FOK) is the only supported type in Phase 1. Show estimatedCost, estimatedReceive, feeAmount, and toWin (BUY only) to the user. Do NOT call buy/sell without user confirmation after viewing the estimate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideYes
amountYes
eventIdYes
tokenIdYes
orderTypeYes
payTokenCodeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.1.15

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark the tool read-only, but the description adds important behavioral context: it returns an estimate rather than executing, a FOK order that cannot be fully filled will be cancelled entirely, and the tool is required before execution. This goes beyond the annotations and clarifies the operational consequences.

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 description is front-loaded with the core purpose and structured with helpful bullets and bold emphasis. There is some redundancy, particularly in the 'Agent hint' section which repeats the mandatory-before-buy/sell rule and parameter semantics already stated above, but the repetition does not significantly harm usability.

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?

Since there is no output schema, the description appropriately names key return fields to show the user (estimatedCost, estimatedReceive, feeAmount, toWin). It covers required parameter semantics, side-specific behavior, FOK limitations, and confirmation requirements. The only notable omission is guidance on obtaining or interpreting tokenId/eventId, but overall it is sufficiently complete for this complex tool.

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?

Schema description coverage is 0%, so the description carries the burden. It clearly explains side=1 vs side=2, amount units (USDC for buy, shares for sell), payTokenCode for buy, and orderType=1. However, tokenId and eventId are not explained beyond their names, leaving a small gap in an otherwise strong parameter explanation.

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 clearly states the tool's function: getting estimated execution details for a prediction market order before placing it. It lists concrete outputs (estimated average fill price, total shares received/sold, fee, FOK fill status) and explicitly frames it as pre-execution, distinguishing it from sibling tools like executePredictionBuy and executePredictionSell.

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

Usage Guidelines5/5

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

The description explicitly says this tool is 'Mandatory before any buy or sell' and instructs the agent to show results to the user before execution. It also gives precise buy/sell parameter setup, states Phase 1 supports only orderType=1 (FOK), and warns not to call buy/sell without user confirmation. This is strong, actionable usage guidance.

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

Deploy Server

Other Tools