Skip to main content
Glama

get_token_info

Retrieve metadata and pricing for Solana tokens including name, symbol, image, USD price, DEX, market cap, and liquidity using mint addresses.

Instructions

Get metadata and pricing for one or more Solana tokens. Returns name, symbol, image, USD price, DEX, market cap, and liquidity. Pass a single mint or array of up to 10.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mintsYesToken mint address(es) — single string or array of up to 10 mints

Implementation Reference

  • The handleGetTokenInfo function performs the core logic for the get_token_info tool, which includes input processing, parallel API calls for metadata and dex information, and data normalization.
    export async function handleGetTokenInfo(input: GetTokenInfoInput): Promise<string> {
      try {
        const mintList = Array.isArray(input.mints) ? input.mints : [input.mints];
    
        if (mintList.length > 10) {
          return JSON.stringify({ success: false, error: 'Maximum 10 mints per request' });
        }
    
        // Fetch metadata and market data in parallel
        const [metadata, ...detections] = await Promise.all([
          getTokenMetadata(mintList),
          ...mintList.map(mint => detectDex(mint).catch(() => null)),
        ]);
    
        const tokens = mintList.map((mint, i) => {
          const meta = metadata.find(m => m.mint === mint);
          const detection = detections[i];
    
          return {
            mint,
            name: meta?.name || detection?.tokenName || 'Unknown',
            symbol: meta?.symbol || detection?.tokenSymbol || 'Unknown',
            image: meta?.image,
            priceUsd: meta?.price || detection?.priceUsd,
            dex: detection?.dex,
            poolAddress: detection?.poolAddress,
            marketCapUsd: detection?.marketCapUsd,
            liquidityUsd: detection?.liquidityUsd,
          };
        });
    
        return JSON.stringify({
          success: true,
          tokens,
        }, null, 2);
      } catch (error) {
        return JSON.stringify({
          success: false,
          error: error instanceof Error ? error.message : String(error),
        });
      }
    }
  • Defines the Zod schema for validating the input to the get_token_info tool.
    export const getTokenInfoSchema = z.object({
      mints: z.union([
        z.string().min(32).max(44),
        z.array(z.string().min(32).max(44)),
      ]).describe('Token mint address(es) — single string or array of up to 10 mints'),
    });
  • src/index.ts:70-74 (registration)
    Registration of the get_token_info tool using the server object in the main entry file.
    'get_token_info',
    'Get metadata and pricing for one or more Solana tokens. Returns name, symbol, image, USD price, DEX, market cap, and liquidity. Pass a single mint or array of up to 10.',
    getTokenInfoSchema.shape,
    async (input) => ({
      content: [{ type: 'text', text: await handleGetTokenInfo(input) }],
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the return format (name, symbol, image, USD price, DEX, market cap, liquidity) and the array limit (up to 10 mints), which are useful behavioral traits. However, it doesn't mention rate limits, authentication needs, error handling, or whether this is a read-only operation (though implied by 'Get').

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 with zero waste. The first sentence states purpose and return values, the second specifies parameter handling. Every word contributes directly to tool understanding, and information is front-loaded appropriately.

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 single-parameter tool with no annotations and no output schema, the description provides good coverage: it explains what the tool does, what it returns, and parameter constraints. The main gap is lack of explicit behavioral context (e.g., rate limits, errors), but given the tool's apparent simplicity, this is reasonably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the 'mints' parameter thoroughly. The description adds marginal value by restating the array limit ('up to 10') and clarifying it can accept 'a single mint or array', but doesn't provide additional semantic context beyond what's in the schema. Baseline is 3, but the slight reinforcement earns a 4.

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 action ('Get metadata and pricing'), the resource ('Solana tokens'), and the scope ('one or more'). It distinguishes from sibling tools like 'get_sol_price' (specific to SOL) and 'detect_dex' (different functionality). The verb+resource combination is specific and unambiguous.

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 usage by specifying what it returns (metadata and pricing for Solana tokens), but doesn't explicitly state when to use it versus alternatives like 'get_sol_price' or 'detect_dex'. No guidance on prerequisites, error conditions, or when-not-to-use scenarios is provided.

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/RefundYourSOL/refundyoursol-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server