Skip to main content
Glama

get_lighter_trades_recent

Read-onlyIdempotent

Fetches the most recent trades for a specified coin from Lighter.xyz. Returns recent trades without requiring a time range.

Instructions

Get most recent Lighter.xyz trades for a coin. Returns the latest trades without needing a time range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYesLighter.xyz coin symbol, e.g. 'BTC', 'ETH'
limitNoMax records to return (default 100, max 1000)

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:828-843 (registration)
    Registration of the 'get_lighter_trades_recent' tool via registerTool(). Accepts coin (LighterCoinParam) and optional limit. Calls api().lighter.trades.recent().
    registerTool(
      "get_lighter_trades_recent",
      "Get most recent Lighter.xyz trades for a coin. Returns the latest trades without needing a time range.",
      {
        coin: LighterCoinParam,
        limit: LimitParam,
      },
      ListOutputSchema,
      async (params) => {
        const data = await api().lighter.trades.recent(
          normalizeLighterCoin(params.coin),
          params.limit
        );
        return formatResponse(data);
      }
    );
  • Handler function for get_lighter_trades_recent. Normalizes the coin symbol via normalizeLighterCoin (uppercase), calls api().lighter.trades.recent() on the SDK, and formats the response.
    async (params) => {
      const data = await api().lighter.trades.recent(
        normalizeLighterCoin(params.coin),
        params.limit
      );
      return formatResponse(data);
    }
  • Input schema for get_lighter_trades_recent: coin (LighterCoinParam) and optional limit (LimitParam). Output uses ListOutputSchema.
    {
      coin: LighterCoinParam,
      limit: LimitParam,
    },
  • ListOutputSchema defines the output shape: records array, count, and optional nextCursor.
    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"),
    };
  • Helper function normalizeLighterCoin that uppercases the coin symbol before passing 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 declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, covering safety. The description adds only that it 'returns the latest trades' without time range, which does not contradict annotations but adds limited behavioral insight beyond them.

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, front-loaded, no unnecessary words. Every sentence provides essential information about the tool's function and key differentiator.

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?

With an output schema present, the description does not need to explain return values. It covers the core function (latest trades, no time range). Could be slightly more specific about what 'recent' means, but overall adequate for selection.

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?

Input schema has 100% description coverage for both parameters. The description does not add meaning beyond the schema—it mentions 'for a coin' but no additional details. Baseline 3 due to 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 verb 'Get', the resource 'most recent Lighter.xyz trades', and the scope 'for a coin'. It distinguishes from sibling tools like get_lighter_trades by noting 'without needing a time range', making its purpose unambiguous.

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 implies use for retrieving the latest trades without a time range, contrasting with get_lighter_trades. However, it lacks explicit guidance on when not to use or alternatives like get_hip3_trades_recent. Still, the key differentiator is clear.

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