Skip to main content
Glama

Perp basis vs oracle

get_basis
Read-onlyIdempotent

Perp basis for any Hyperliquid perp: its mark price against Hyperliquid's oracle price (the validators' weighted median of spot venues), as a premium or discount in %, with a contango or backwardation read and the funding context. Costs 0.01 USDC per call (x402, USDC on Solana, Base, Polygon, Arbitrum or Arc).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolNoUSDT perp symbol e.g. SOLUSDT, BTCUSDT (default SOLUSDT)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesthe get_basis payload; a real captured example is free at https://x402.ochinimus.app/api/sample/get_basis
toolYesthe tool that produced this payload

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / symbol / description
      Previous value: -"USDT perp symbol e.g. SOLUSDT"New value: +"USDT perp symbol e.g. SOLUSDT, BTCUSDT (default SOLUSDT)"
    • removedInput schema / required
      Removed value: -[
      -  "symbol"
      -]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": {},
      +      "description": "the get_basis payload; a real captured example is free at https://x402.ochinimus.app/api/sample/get_basis",
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "tool": {
      +      "const": "get_basis",
      +      "description": "the tool that produced this payload",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "tool",
      +    "data"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), yet the description adds genuinely new behavioral context: a 0.01 USDC per-call cost and the x402 payment rails (Solana, Base, Polygon, Arbitrum, Arc). That payment/auth detail is valuable and not present in the schema or annotations.

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?

It is a single dense sentence that front-loads the core definition before the cost/payment tail. It is slightly long but every clause (metric definition, oracle methodology, output forms, price) earns its place.

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 an output schema present, return-value detail is not strictly required, yet the description helpfully summarizes what is returned and discloses the cost mechanism. Combined with annotations covering safety, the definition is essentially complete for a one-parameter read tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There is a single optional parameter with 100% schema description coverage (symbol with example values and a default), so the schema already carries the semantics. The description adds nothing beyond confirming the scope is 'any Hyperliquid perp', making the baseline 3 correct.

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 names a specific metric (perp basis = mark price vs Hyperliquid oracle price), and defines the computation and its output form (premium/discount %, contango/backwardation, funding context). An agent can distinguish this clearly from siblings like get_funding_rate, get_perp, or get_spot.

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?

It scopes the tool to 'any Hyperliquid perp' and discloses the per-call cost, which implies usage context, but gives no explicit when-to-use/when-not guidance versus adjacent siblings such as get_funding_rate or get_trade_context. Usage is only implied.

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.