Skip to main content
Glama

get_lighter_instrument

Read-onlyIdempotent

Get market details for a Lighter.xyz instrument by coin symbol: market ID, fees, decimals, and active status.

Instructions

Get details for a single Lighter.xyz instrument by coin symbol. Returns market ID, fees, size/price decimals, and active status.

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:783-789 (registration)
    Registration of the tool 'get_lighter_instrument' via registerCurrentTool helper. It uses LighterCoinParam for input schema, calls api().lighter.instruments.get(coin) as the handler, and normalizes the coin with normalizeLighterCoin.
    registerCurrentTool(
      "get_lighter_instrument",
      "Get details for a single Lighter.xyz instrument by coin symbol. Returns market ID, fees, size/price decimals, and active status.",
      (coin) => api().lighter.instruments.get(coin),
      LighterCoinParam,
      normalizeLighterCoin
    );
  • The generic handler function (registerCurrentTool) that wraps the actual SDK call. For get_lighter_instrument, this becomes: normalizes the coin with normalizeLighterCoin, calls api().lighter.instruments.get(coin), and formats the response.
    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 param for the Lighter coin symbol. Defines a simple string parameter described as 'Lighter.xyz coin symbol, e.g. BTC, ETH'.
    const LighterCoinParam = z
      .string()
      .describe("Lighter.xyz coin symbol, e.g. 'BTC', 'ETH'");
  • Normalizes the Lighter coin symbol to uppercase before passing to the SDK call.
    function normalizeLighterCoin(coin: string): string {
      return coin.toUpperCase();
    }
Behavior4/5

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

Annotations already declare readOnly, non-destructive, idempotent, open-world. The description adds return field context, which is useful beyond annotations. No contradictions.

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: first states purpose, second lists return 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.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple retrieval tool with one parameter and an output schema, the description covers purpose, return fields, and example inputs. Output schema likely documents field details.

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% and parameter 'coin' already described as symbol. Description reiterates 'e.g. 'BTC', 'ETH'' but adds no new meaning beyond schema.

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 details for a single Lighter.xyz instrument by coin symbol, listing returned fields (market ID, fees, decimals, active status). It distinguishes from sibling tools like get_lighter_instruments (plural) and get_instrument (non-Lighter).

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?

The description implies use for single instrument lookup but does not explicitly state when to use alternatives (e.g., get_lighter_instruments for multiple) or provide any exclusions.

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