Skip to main content
Glama
VENTURE-AI-LABS

CryptoDataAPI MCP Server

get_open_interest

Retrieve cross-exchange open interest data for perpetual futures contracts to analyze market positioning and trend strength through OI changes and price movements.

Instructions

Get cross-exchange open interest data. Open interest is the total value of outstanding perpetual futures contracts. Rising OI with rising price = new money entering (trend continuation). Rising OI with falling price = new shorts opening (bearish). Falling OI = positions closing (deleveraging). Returns per-exchange OI in USD with 24h change percentages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exchangeNoFilter by exchange name (e.g., 'binance', 'hyperliquid'). Omit for all exchanges.
typeNoMarket type filter (e.g., 'perps'). Omit for default.
limitNoNumber of results to return. Default 250.

Implementation Reference

  • The handler function for 'get_open_interest' tool which calls the API.
    export async function handler(args: z.infer<typeof schema>) {
      return apiGet("/api/v1/market-intelligence/open-interest", {
        exchange: args.exchange,
        type: args.type,
        limit: args.limit,
      });
    }
  • Input schema definition for the 'get_open_interest' tool.
    export const schema = z.object({
      exchange: z
        .string()
        .optional()
        .describe("Filter by exchange name (e.g., 'binance', 'hyperliquid'). Omit for all exchanges."),
      type: z
        .string()
        .optional()
        .describe("Market type filter (e.g., 'perps'). Omit for default."),
      limit: z
        .number()
        .optional()
        .describe("Number of results to return. Default 250."),
    });
  • src/index.ts:55-79 (registration)
    Registration loop that registers all imported tools, including 'get_open_interest', to the McpServer instance.
    for (const tool of tools) {
      server.tool(tool.name, tool.description, tool.schema.shape, async (args: Record<string, unknown>) => {
        const result = await tool.handler(args as any);
        if (result.ok) {
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(result.data, null, 2),
              },
            ],
          };
        } else {
          return {
            content: [
              {
                type: "text" as const,
                text: `API Error (${result.status}): ${result.error}`,
              },
            ],
            isError: true,
          };
        }
      });
    }
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes what the tool returns (per-exchange OI in USD with 24h change percentages) and provides context on how to interpret OI trends (e.g., rising OI with rising price indicates new money entering). However, it lacks details on rate limits, error handling, or data freshness.

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 description is efficiently structured in two sentences: the first defines the tool's purpose and output, and the second explains OI interpretation for market analysis. Every sentence adds value without redundancy, making it front-loaded and easy to parse.

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?

For a read-only data retrieval tool with no annotations and no output schema, the description is reasonably complete. It covers the tool's purpose, output format, and interpretive context. However, it could be more complete by mentioning data sources, update frequency, or example use cases, given the complexity of financial data analysis.

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?

Schema description coverage is 100%, so the schema already documents all three parameters (exchange, type, limit) with clear descriptions. The description does not add any parameter-specific semantics beyond what the schema provides, such as example values for 'type' beyond 'perps' or clarification on 'limit' behavior. Baseline score of 3 is appropriate given high schema coverage.

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 clearly states the tool retrieves cross-exchange open interest data for perpetual futures contracts, specifying it returns per-exchange OI in USD with 24h change percentages. It distinguishes from siblings by focusing on open interest metrics rather than other market data like funding rates or liquidations.

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?

The description implies usage for analyzing market trends through OI patterns (e.g., rising OI with price changes indicating trend continuation or bearish signals), but it does not explicitly state when to use this tool versus alternatives like get_funding_rates or get_liquidations for related market insights. No exclusions or prerequisites are mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/VENTURE-AI-LABS/cryptodataapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server