Skip to main content
Glama
simple-vwap-slippage

simple-vwap-slippage

Price a market order as VWAP

quote_market_order
Read-only

Prices a Bybit spot market order against live order-book depth, returning VWAP, slippage in basis points, depth sufficiency, and levels consumed. Estimate fill cost before trading; no order is placed.

Instructions

Price a market order against the current Bybit spot book and report the VWAP, the slippage versus the best price, whether the book is deep enough, and the number of levels consumed. 'amount' is sized in the quote currency (USDT) for a buy and in base coins for a sell, which is how each side is normally described; pass amount_unit to override. Slippage is expressed as a fraction and in basis points and is always positive when the fill is worse than the touch. No order is placed. Example: symbol='BTCUSDT', side='buy', amount=5000.

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": {
      "symbol": "<symbol>",
      "side": "<side>",
      "amount": "<amount>"
    },
    "name": "quote_market_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
sideYes'buy' to consume the asks, 'sell' to consume the bids.
amountYesOrder size. Buy orders are sized in the quote currency (USDT) by default and sell orders in base coins; pass amount_unit to say otherwise.
symbolYesSpot pair in Bybit notation, base coin first, such as 'BTCUSDT', 'ETHUSDT' or 'PEPEUSDC'. Case does not matter here.
max_levelsNoHow deep to walk the book while pricing, from 1 to 1000. The default of 200 covers most retail orders; raise it for large ones.
amount_unitNo'quote' sizes the order by how much USDT you spend or receive; 'base' by how many coins you buy or sell. The default is 'quote' for a buy and 'base' for a sell, which is how each side is normally described.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint, and the description meaningfully extends them: it confirms no order is placed, states the price comes from the live spot book at call time, defines the slippage sign convention ('always positive when the fill is worse than the touch'), and reports a depth-sufficiency flag. It stops short of describing rate limits or failure modes when the book is too thin.

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?

Outputs and the 'no order placed' assurance are front-loaded, followed by unit semantics and the example, so the important facts come first. Minor redundancy with the schema language ('which is how each side is normally described' repeats the amount field wording).

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?

With annotations, a full schema, and an output schema already covering the return shape, the description supplies what those structured fields cannot: the simulation nature of the call, the unit convention rationale, and slippage sign interpretation. Nothing essential for a correct invocation appears missing.

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 coverage is 100%, so the baseline is 3, but the description goes beyond restating fields by explaining why amount is quote-denominated for buys and base-denominated for sells and pointing at amount_unit as the override. The worked example ('symbol=BTCUSDT, side=buy, amount=5000') grounds the otherwise ambiguous unit semantics.

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?

The description pairs a specific verb and resource ('price a market order against the current Bybit spot book') with the concrete outputs it produces: VWAP, slippage vs. best price, depth sufficiency, and levels consumed. That makes it clearly distinguishable from a raw book dump, but it never names a sibling (e.g. get_order_book or get_slippage_curve) to route the agent explicitly.

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 is implied rather than stated: 'No order is placed' signals this is a pre-trade simulation, and the max_levels note ('raise it for large ones') gives sizing guidance. There is no explicit when-to-use versus alternatives guidance and no stated preconditions beyond the example call.

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