Skip to main content
Glama

get_lighter_candles

Read-onlyIdempotent

Retrieve OHLCV candle data for any coin from Lighter.xyz, with intervals from 1 minute to 1 week. Includes open, high, low, close, and volume.

Instructions

Get Lighter.xyz OHLCV candle data for a coin. Intervals: 1m to 1w (default 1h). Returns open, high, low, close, volume.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYesLighter.xyz coin symbol, e.g. 'BTC', 'ETH'
startNoStart timestamp (Unix ms or ISO). Defaults to 24h ago.
endNoEnd timestamp (Unix ms or ISO). Defaults to now.
limitNoMax records to return (default 100, max 1000)
cursorNoPagination cursor from previous response's nextCursor
intervalNoCandle interval (default '1h')

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:846-853 (registration)
    Registration of the 'get_lighter_candles' tool using the registerCandleTool helper. It delegates to api().lighter.candles.history() for the actual SDK call.
    registerCandleTool(
      "get_lighter_candles",
      "Get Lighter.xyz OHLCV candle data for a coin. Intervals: 1m to 1w (default 1h). Returns open, high, low, close, volume.",
      (coin, params) =>
        api().lighter.candles.history(coin, params as any),
      LighterCoinParam,
      normalizeLighterCoin
    );
  • The LighterCoinParam Zod schema used for the coin input parameter of get_lighter_candles.
    const LighterCoinParam = z
      .string()
      .describe("Lighter.xyz coin symbol, e.g. 'BTC', 'ETH'");
  • The IntervalParam Zod schema used for the optional interval parameter of get_lighter_candles.
    const IntervalParam = z
      .enum(["1m", "5m", "15m", "30m", "1h", "4h", "1d", "1w"])
      .optional()
      .describe("Candle interval (default '1h')");
  • The normalizeLighterCoin helper function that normalizes coin symbols to uppercase for the Lighter.xyz tools.
    function normalizeLighterCoin(coin: string): string {
      return coin.toUpperCase();
    }
  • The registerCandleTool helper function that wraps registerHistoryTool with an IntervalParam for candle-based tools like get_lighter_candles.
    function registerCandleTool(
      name: string,
      description: string,
      sdkCall: (coin: string, params: Record<string, unknown>) => Promise<{ data: unknown; nextCursor?: string }>,
      coinSchema: z.ZodString,
      normFn: (coin: string) => string
    ): void {
      registerHistoryTool(
        name,
        description,
        sdkCall,
        coinSchema,
        normFn,
        { interval: IntervalParam }
      );
    }
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, openWorldHint=true, so description's burden is lower. It adds that results are OHLCV with specific fields, but does not discuss pagination behavior, time range defaults (e.g., start defaults to 24h ago) beyond the schema, or any rate limits. 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?

Two sentences that front-load the core purpose and key options (intervals, fields). Every word earns its place; no fluff.

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 data retrieval tool with output schema (not shown), description covers main purpose, intervals, and fields. It omits explicit mention of pagination or time range defaults beyond '24h ago', but given the tool's simplicity and the presence of annotations and schema, it is largely sufficient. Could be improved by noting that cursor is for pagination.

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 baseline is 3. Description lists intervals (1m to 1w) and default interval, and mentions returned fields, which adds some context. However, it does not explain each parameter beyond what the schema provides, such as the cursor for pagination or the meaning of start/end timestamps. No significant extra value.

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?

Description clearly states it retrieves Lighter.xyz OHLCV candle data, listing fields (open, high, low, close, volume) and intervals. Distinguishes from sibling tools by specifying 'Lighter.xyz', which differentiates from other candle sources like get_candles or get_hip3_candles.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus siblings (e.g., get_candles, get_hip3_candles). While it mentions intervals and defaults, it does not compare or contrast with alternatives, leaving the agent without direction for source selection.

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