Skip to main content
Glama

get_lighter_l3_orderbook

Read-onlyIdempotent

Get order-level L3 orderbook data from Lighter.xyz for a specified coin. Returns individual orders with order IDs, user addresses, prices, and sizes.

Instructions

Get Lighter L3 order-level orderbook (Pro+ tier). Returns individual orders with order IDs, user addresses, prices, and sizes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYesLighter.xyz coin symbol, e.g. 'BTC', 'ETH'
depthNoOrderbook depth — number of price levels per side

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesResult data object

Implementation Reference

  • src/index.ts:958-974 (registration)
    Registration of the get_lighter_l3_orderbook tool via the registerTool helper. Defines input schema (coin + optional depth), output schema (ObjectOutputSchema), and the handler that calls api().lighter.l3Orderbook.get().
    registerTool(
      "get_lighter_l3_orderbook",
      "Get Lighter L3 order-level orderbook (Pro+ tier). Returns individual orders with order IDs, user addresses, prices, and sizes.",
      {
        coin: LighterCoinParam,
        depth: DepthParam,
      },
      ObjectOutputSchema,
      async (params) => {
        const sdkParams = params.depth ? { depth: params.depth } : undefined;
        const data = await api().lighter.l3Orderbook.get(
          normalizeLighterCoin(params.coin),
          sdkParams
        );
        return formatResponse(data);
      }
    );
  • Handler function for get_lighter_l3_orderbook. Calls the SDK's lighter.l3Orderbook.get method, normalizing the coin symbol via normalizeLighterCoin (uppercase) and passing an optional depth parameter. Returns formatted response.
    async (params) => {
      const sdkParams = params.depth ? { depth: params.depth } : undefined;
      const data = await api().lighter.l3Orderbook.get(
        normalizeLighterCoin(params.coin),
        sdkParams
      );
      return formatResponse(data);
    }
  • Input schema for the coin parameter used in get_lighter_l3_orderbook (and all Lighter tools). A simple string describing the coin symbol.
    const LighterCoinParam = z
      .string()
      .describe("Lighter.xyz coin symbol, e.g. 'BTC', 'ETH'");
  • Input schema for the optional depth parameter used in get_lighter_l3_orderbook.
    const DepthParam = z
      .number()
      .optional()
      .describe("Orderbook depth — number of price levels per side");
  • Output schema for get_lighter_l3_orderbook — returns a single data object (the orderbook).
    const ObjectOutputSchema: ZodRawShape = {
      data: z.record(z.unknown()).describe("Result data object"),
    };
  • Helper function to normalize Lighter.xyz coin symbols to uppercase (used by the handler).
    function normalizeLighterCoin(coin: string): string {
      return coin.toUpperCase();
    }
Behavior3/5

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

Annotations already indicate read-only, safe, idempotent behavior. Description adds that it returns individual order details but does not mention rate limits, pagination, or data freshness. Adequate but not rich.

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?

Single sentence that front-loads the purpose and includes tier info. No wasted words; efficient and clear.

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?

Covers purpose and return content. With output schema present, return details are defined. Could clarify that depth parameter limits price levels, but schema covers that. Missing mention of current vs historical data.

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 coverage is 100%, so parameters are already documented. Description does not add additional meaning beyond the schema; it lists return fields but does not elaborate on input parameters.

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?

Clearly states it gets Lighter L3 order-level orderbook with specific return fields (order IDs, user addresses, prices, sizes). Distinguishes from sibling orderbook tools by specifying 'L3' and 'order-level' and noting 'Pro+ tier'.

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?

Implies usage via 'Get Lighter L3 order-level orderbook' but does not explicitly differentiate from similar tools like get_lighter_l2_orderbook or get_lighter_orderbook. No when-not or alternative guidance.

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