Skip to main content
Glama

get_token_supply

Retrieve the total circulating supply of any SPL token on the Solana blockchain by providing its mint address. Use this tool to verify token availability and track distribution metrics.

Instructions

Get the total supply of a token

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenMintYesToken mint address

Implementation Reference

  • The handler function that implements get_token_supply: fetches mint info using getMint, computes human-readable supply by dividing raw supply by 10^decimals, and returns detailed mint information.
    async function handleGetTokenSupply(args: any) { const { tokenMint } = args; ensureConnection(); const tokenMintPubkey = new PublicKey(tokenMint); const mintInfo = await getMint(connection, tokenMintPubkey); const supply = Number(mintInfo.supply) / Math.pow(10, mintInfo.decimals); return { tokenMint, supply, rawSupply: mintInfo.supply.toString(), decimals: mintInfo.decimals, mintAuthority: mintInfo.mintAuthority ? mintInfo.mintAuthority.toString() : null, freezeAuthority: mintInfo.freezeAuthority ? mintInfo.freezeAuthority.toString() : null, isInitialized: mintInfo.isInitialized }; }
  • Tool definition including name, description, and input schema requiring 'tokenMint' string.
    { name: "get_token_supply", description: "Get the total supply of a token", inputSchema: { type: "object", properties: { tokenMint: { type: "string", description: "Token mint address" } }, required: ["tokenMint"] } },
  • src/index.ts:1348-1350 (registration)
    Switch case in the main CallToolRequestSchema handler that dispatches to the get_token_supply handler function.
    case "get_token_supply": result = await handleGetTokenSupply(args); break;

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/ExpertVagabond/solana-mcp-server'

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