Skip to main content
Glama

get_instruments

Read-onlyIdempotent

Retrieve all Hyperliquid perpetual and spot instruments with leverage, decimals, and active status to discover valid coin symbols for further queries.

Instructions

List all available Hyperliquid perpetual and spot instruments with leverage, decimals, and active status. Use this to discover valid coin symbols before querying other endpoints.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
recordsYesArray of result records
countYesTotal number of records in the full result set
nextCursorNoCursor for next page, if more results available

Implementation Reference

  • src/index.ts:463-467 (registration)
    Registration of the 'get_instruments' tool via registerInstrumentsTool, which delegates to the SDK's hyperliquid.instruments.list()
    registerInstrumentsTool(
      "get_instruments",
      "List all available Hyperliquid perpetual and spot instruments with leverage, decimals, and active status. Use this to discover valid coin symbols before querying other endpoints.",
      () => api().hyperliquid.instruments.list()
    );
  • Helper function that wraps instrument-list tools with an empty input schema, calls the SDK function, and formats the response. Used by get_instruments.
    function registerInstrumentsTool(
      name: string,
      description: string,
      sdkCall: () => Promise<unknown[]>
    ): void {
      registerTool(name, description, {}, ListOutputSchema, async () => {
        const data = await sdkCall();
        return formatResponse(data);
      });
    }
  • Generic tool registration helper that calls server.registerTool with API key gating, error handling, and annotations. The actual handler for get_instruments executes via this wrapper.
    function registerTool(
      name: string,
      description: string,
      inputSchema: ZodRawShape,
      outputSchema: ZodRawShape,
      handler: (params: any) => Promise<McpContent>
    ): void {
      server.registerTool(
        name,
        {
          description,
          inputSchema,
          outputSchema,
          annotations: TOOL_ANNOTATIONS,
        },
        async (params: any) => {
          if (!client) {
            return {
              content: [{ type: "text" as const, text: MISSING_KEY_MESSAGE }],
              isError: true,
            };
          }
          try {
            return await handler(params);
          } catch (err) {
            const error = err instanceof OxArchiveError ? err : new OxArchiveError(String(err), 500);
            return formatError(error);
          }
        }
      );
    }
  • Output schema for the get_instruments tool - returns an array of records with count and optional pagination cursor.
    const ListOutputSchema: ZodRawShape = {
      records: z.array(z.record(z.unknown())).describe("Array of result records"),
      count: z.number().describe("Total number of records in the full result set"),
      nextCursor: z
        .string()
        .optional()
        .describe("Cursor for next page, if more results available"),
    };
Behavior5/5

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

Annotations already declare it as read-only, idempotent, and non-destructive. The description adds value by confirming it returns all available instruments with leverage, decimals, and active status, which aligns with and enriches the annotations without contradiction.

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 extremely concise: two sentences covering what it does and when to use it. No redundant information. Every word serves a purpose.

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?

Given the tool has no parameters and a likely straightforward output schema, the description provides all necessary context: what it returns (leverage, decimals, active status) and why it's useful (discovering symbols). It is complete for the tool's simplicity.

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?

There are no parameters (0), so schema coverage is 100%. The description does not need to explain parameters. It focuses on the output semantic (list of instruments with specific fields), which is adequate for a parameterless tool.

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 lists all available Hyperliquid perpetual and spot instruments with specific details (leverage, decimals, active status). This differentiates it from singular instruments (get_instrument) and version-specific variants (get_hip3_instruments, get_lighter_instruments) by emphasizing 'all available' and the scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises using this tool to discover valid coin symbols before querying other endpoints, establishing a clear prerequisite. It does not explicitly mention when not to use it or alternatives, but the context implies it's the primary discovery tool.

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/0xArchiveIO/0xarchive-mcp'

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