Skip to main content
Glama

Perpetual contract rules

get_contract_rules
Read-onlyIdempotent

Rules and current funding for one perpetual futures contract on one exchange: mark price, size step, minimum size, price tick, maximum leverage, funding rate per interval and annualised. Use when a limit price or leverage must fit the venue; not needed for market orders (sizing and preview round for you). Not for comparing exchanges (use compare_venue_prices or compare_funding_rates). Inputs: symbol (base coin, e.g. BTC), venue (without an account: hyperliquid only). Prices in USD per coin, sizes in the base coin, rates as fractions. Next: size_position.

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>"
    },
    "name": "get_contract_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
venueNoVenue: sandbox, hyperliquid, okx, bybit or binance. Omitted: the agent's only venue, else hyperliquid if connected, else your only connected exchange, else the sandbox
symbolYesBase coin, e.g. BTC

Output Schema

NameRequiredDescriptionDefault
venueYesVenue name
symbolYesBase coin
min_sizeYesSmallest order, in the base coin (e.g. BTC), not USD
size_stepYesSmallest size increment, in the base coin (e.g. BTC), not USD
mark_priceYesMark price, USD per coin
price_tickYesSmallest price increment, USD per coin
deprecationNoPresent only while this tool is deprecated: replacement, removal_date, changelog
funding_rateYesFunding rate per interval, as a fraction (0.0001 = 0.01%); positive: longs pay
max_leverageYesHighest leverage the venue allows for this contract
funding_annualizedYesfunding_rate scaled to a year, as a fraction
funding_interval_hoursYesHours between funding payments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / properties / venue / default
      Removed value: -"hyperliquid"
  2. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint=false, openWorldHint), so the description's added value is the constraint that without an account only hyperliquid is available, plus the unit conventions (USD per coin, sizes in the base coin, rates as fractions). It does not mention freshness/caching or that mark price and funding are live venue data, which is a minor remaining gap for a read tool.

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?

Front-loaded with purpose and fields, then use/avoid guidance, then labelled 'Inputs:' and 'Next:' blocks — a clean structure. It is dense and telegraphic in places ('sizing and preview round for you'), but nearly every clause carries actionable information.

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 two-parameter read tool with an output schema, the description covers what is returned, when to call it, when not to, the venue restriction, and unit conventions. Nothing an agent needs in order to call it correctly is missing, and return-value detail is correctly delegated to the output schema.

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 adds meaning beyond the schema: it clarifies that symbol is a base coin (BTC), and notably narrows venue by stating that without an account only hyperliquid works, a constraint the schema's enum of five venues does not express. The units sentence further disambiguates what the returned values mean.

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?

Names a specific verb+resource ('Rules and current funding for one perpetual futures contract on one exchange') and enumerates the concrete fields returned: mark price, size step, minimum size, price tick, maximum leverage, funding rate per interval and annualised. It is immediately distinguishable from compare_venue_prices and compare_funding_rates, which the description explicitly excludes.

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?

States the triggering condition ('when a limit price or leverage must fit the venue'), an explicit non-use case ('not needed for market orders, sizing and preview round for you'), and routes to named alternatives for cross-venue comparison. It also gives the natural next step ('Next: size_position'), leaving nothing to infer.

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.

Resources