Skip to main content
Glama

Perpetual contract rules

get_perp_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_perp_quotes_across_venues or compare_funding_rates_across_venues). 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_by_risk.

Input Schema

NameRequiredDescriptionDefault
venueNoVenue: sandbox, hyperliquid, okx, bybit or binance. Omitted: the agent's only venue, else hyperliquid, else your only connected venue, else 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. First observed

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, so the description focuses on what annotations cannot express: the account constraint ('without an account: hyperliquid only'), the venue-resolution default, and the units conventions for prices, sizes and rates. That is real added context, though it does not mention rate limits or caching freshness of the funding figures.

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?

Front-loads purpose, then usage, then exclusions/alternatives, then input conventions, then the next step, in a tight set of sentences. The field enumeration is dense but each item carries information an agent needs to interpret the response.

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 and full annotation coverage, everything an agent needs is present: scope, exclusions, auth/venue constraint, unit conventions and a follow-up tool. Return-value formatting is correctly left 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% and the schema already spells out the venue resolution order, so the baseline is 3. The description goes further by fixing the semantics of the values involved ('symbol (base coin, e.g. BTC)', 'prices in USD per coin, sizes in the base coin, rates as fractions'), which prevents unit mistakes even though it partly describes output rather than inputs.

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?

States a specific verb and resource: 'Rules and current funding for one perpetual futures contract on one exchange', then enumerates the exact fields returned (mark price, size step, min size, price tick, max leverage, funding rate). It explicitly distinguishes itself from the comparison siblings by name, so an agent can pick it without opening a schema.

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 when ('when a limit price or leverage must fit the venue'), an explicit when-not ('not needed for market orders (sizing and preview round for you)'), and names two alternatives for the adjacent comparison task. It also adds a 'Next:' pointer to size_position_by_risk, which routes the follow-up call.

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