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.

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 sandboxhyperliquid
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. Added

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered; the description instead adds operational constraints the annotations cannot carry, notably that without an account only hyperliquid is available. It also fixes units ('Prices in USD per coin, sizes in the base coin, rates as fractions'), which prevents downstream conversion errors. No mention of caching or rate limits, so short of a 5.

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?

Purpose, exclusions, alternatives, input conventions and the next step are packed into four dense sentences with no filler; the tool's function is front-loaded before the routing guidance.

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?

With only two parameters, full schema coverage, an output schema and complete annotations, the description covers everything an agent still needs: what the tool returns, when not to call it, where to go instead, and the unit conventions. Nothing relevant to calling it correctly is 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 the schema by pinning down that symbol is a base coin (e.g. BTC) and by adding the venue caveat 'without an account: hyperliquid only', which the venue enum in the schema does not state. That caveat materially changes how an agent picks the parameter.

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 ('Rules and current funding for one perpetual futures contract on one exchange') and enumerates exactly which fields come back: mark price, size step, minimum size, price tick, maximum leverage, funding rate. It is immediately distinguishable from sibling tools like get_order_book or get_my_positions.

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?

Gives an explicit trigger ('when a limit price or leverage must fit the venue'), an explicit exclusion ('not needed for market orders (sizing and preview round for you)'), and names the correct alternatives for a different intent ('use compare_venue_prices or compare_funding_rates'). It even routes forward ('Next: size_position').

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