Skip to main content
Glama

Kalshi Perp Liquidation — where a leveraged position gets closed out

perp_liquidation
Read-only

Use for "where does a 5x bitcoin long liquidate on Kalshi". Estimates a Kalshi perp's liquidation price and the % move to it from Kalshi's risk parameters (a 5x BTC long is about 8% away, not the 20% the 100÷leverage rule implies), plus fees and expected funding. An estimate; Kalshi's app shows the exact one. Assets: btc, eth, sol, xrp, doge, hype, link, gold, silver, platinum, palladium. Free.

Input Schema

NameRequiredDescriptionDefault
sideNoDirection. One of: long · short.
assetNoThe perp.
entryNoEntry price (default: the live price).
marginNoMargin in dollars (default 1000).
leverageNoLeverage, e.g. 5 or "5x". Capped at Kalshi’s maximum for the size and side.
hold_daysNoDays held, for the funding estimate (default 7).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / asset / description
      Previous value: -"The perp. One of: btc · eth · sol · xrp · doge · hype · link · gold · silver · platinum · palladium."New value: +"The perp."
    • changedInput schema / properties / entry / description
      Previous value: -"Entry price (default: the live price). Accepts a number or a numeric string (\"+150\", \"62%\", \"2.5\")."New value: +"Entry price (default: the live price)."
    • changedInput schema / properties / margin / description
      Previous value: -"Margin in dollars (default 1000). Accepts a number or a numeric string (\"+150\", \"62%\", \"2.5\")."New value: +"Margin in dollars (default 1000)."
  2. Changed6 schema fields changed
    • removedInput schema / properties / entry / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • addedInput schema / properties / entry / type
      Added value: +[
      +  "number",
      +  "string"
      +]
    • removedInput schema / properties / leverage / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • addedInput schema / properties / leverage / type
      Added value: +[
      +  "number",
      +  "string"
      +]
    • removedInput schema / properties / margin / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • addedInput schema / properties / margin / type
      Added value: +[
      +  "number",
      +  "string"
      +]
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=true. The description adds meaningful behavioral context beyond that: it is an estimate, Kalshi's app shows the exact value, it includes fees and funding, leverage is capped at Kalshi's maximum, and the tool is free. The exactness caveat is particularly useful for a read-only estimator.

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 front-loaded example query immediately anchors the tool's use case, followed by the core estimate, caveat, supported assets, and cost. Every sentence earns its place and there is no redundant restatement of schema fields.

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 no output schema, the description must indicate what comes back. It does so at a high level: liquidation price, % move, fees, and expected funding. It does not specify units or response structure for fees and funding, but for a read-only estimator this is close to complete.

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 100%, so the baseline is 3. The description adds conceptual meaning by explaining that a 5x BTC long is about 8% away rather than the 20% implied by 100÷leverage, which clarifies how leverage and entry interact with the liquidation estimate. It also notes funding depends on hold_days, though not each parameter in detail.

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 states a specific verb and resource: 'Estimates a Kalshi perp's liquidation price and the % move to it,' plus fees and expected funding. It also distinguishes its result from the naive 100÷leverage rule, making the purpose concrete and separable from generic calculators like calculate_ev or kelly_size.

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 example query 'where does a 5x bitcoin long liquidate on Kalshi' gives a clear when-to-use signal. However, it does not explicitly name or exclude alternatives like perps_board, so the agent must infer that this tool is for liquidation distance rather than broad perp exploration.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.