Skip to main content
Glama

get_lighter_funding_current

Read-onlyIdempotent

Retrieve the current funding rate for any coin on Lighter.xyz. Returns the latest rate and timestamp.

Instructions

Get the current Lighter.xyz funding rate for a coin. Returns the latest funding rate and timestamp.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYesLighter.xyz coin symbol, e.g. 'BTC', 'ETH'

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesResult data object

Implementation Reference

  • src/index.ts:855-862 (registration)
    Registration of the 'get_lighter_funding_current' tool using the 'registerCurrentTool' helper. It passes a lambda that calls api().lighter.funding.current(coin), the LighterCoinParam schema, and the normalizeLighterCoin normalization function.
    // Lighter Funding Current
    registerCurrentTool(
      "get_lighter_funding_current",
      "Get the current Lighter.xyz funding rate for a coin. Returns the latest funding rate and timestamp.",
      (coin) => api().lighter.funding.current(coin),
      LighterCoinParam,
      normalizeLighterCoin
    );
  • The 'registerCurrentTool' helper used by get_lighter_funding_current. This generates the actual handler: it normalizes the coin parameter, calls the SDK function, and formats the response.
    // Pattern 2: Current snapshot (coin only)
    function registerCurrentTool(
      name: string,
      description: string,
      sdkCall: (coin: string) => Promise<unknown>,
      coinSchema: z.ZodString,
      normFn: (coin: string) => string
    ): void {
      registerTool(name, description, { coin: coinSchema }, ObjectOutputSchema, async (params) => {
        const data = await sdkCall(normFn(params.coin));
        return formatResponse(data);
      });
  • Input schema for the 'coin' parameter of get_lighter_funding_current — a simple string describing a Lighter.xyz coin symbol.
    const LighterCoinParam = z
      .string()
      .describe("Lighter.xyz coin symbol, e.g. 'BTC', 'ETH'");
  • Output schema for get_lighter_funding_current — returns a single data object (the current funding snapshot).
    const ObjectOutputSchema: ZodRawShape = {
      data: z.record(z.unknown()).describe("Result data object"),
    };
  • Coin normalization helper that uppercases the Lighter.xyz symbol before passing it to the SDK.
    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 readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds that it returns 'the latest funding rate and timestamp,' which aligns with read-only behavior but does not disclose caching, update frequency, or rate limits.

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 two sentences front-loaded with the main action. Every word contributes meaning; no superfluous content.

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?

For a single-parameter tool with full schema coverage and an output schema, the description adequately explains what the tool returns and the data source. No missing critical information.

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?

The sole parameter 'coin' is fully described in the schema with examples. The description does not add additional meaning beyond the schema, so baseline of 3 applies.

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 the current Lighter.xyz funding rate for a coin, specifying the exchange and return fields. It distinguishes itself from sibling tools like get_funding_current (generic) and get_hip3_funding_current (HIP3-specific).

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?

The description does not provide when to use this tool versus alternatives like get_funding_history or get_lighter_funding (historical). No exclusions or context about other exchanges or data types is given.

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