Skip to main content
Glama

get_nft_metadata

Retrieve detailed NFT metadata including name, image, and attributes using contract addresses and token IDs for EVM chains or mint addresses for Solana.

Instructions

Get detailed metadata for a specific NFT (name, image, attributes, CAIP-19 assetId). EVM: contractAddress:tokenId, Solana: mintAddress.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
token_identifierYesNFT identifier. EVM: {contractAddress}:{tokenId}. Solana: {mintAddress}.
networkYesNetwork identifier (e.g., "ethereum-mainnet", "solana-mainnet" or CAIP-2 "eip155:1").
wallet_idNoTarget wallet ID. Required for multi-wallet sessions.

Implementation Reference

  • Handler implementation for get_nft_metadata tool which calls the API client to fetch NFT metadata.
    async (args) => {
      const params = new URLSearchParams();
      params.set('network', args.network);
      if (args.wallet_id) params.set('walletId', args.wallet_id);
      const result = await apiClient.get(
        `/v1/wallet/nfts/${encodeURIComponent(args.token_identifier)}?${params.toString()}`,
      );
      return toToolResult(result);
    },
  • Tool registration function for get_nft_metadata.
    export function registerGetNftMetadata(
      server: McpServer,
      apiClient: ApiClient,
      walletContext?: WalletContext,
    ): void {
      server.tool(
        'get_nft_metadata',
        withWalletPrefix(
          'Get detailed metadata for a specific NFT (name, image, attributes, CAIP-19 assetId). EVM: contractAddress:tokenId, Solana: mintAddress.',
          walletContext?.walletName,
        ),
        {
          token_identifier: z.string().describe('NFT identifier. EVM: {contractAddress}:{tokenId}. Solana: {mintAddress}.'),
          network: z.string().describe('Network identifier (e.g., "ethereum-mainnet", "solana-mainnet" or CAIP-2 "eip155:1").'),
          wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions.'),
        },
        async (args) => {
          const params = new URLSearchParams();
          params.set('network', args.network);
          if (args.wallet_id) params.set('walletId', args.wallet_id);
          const result = await apiClient.get(
            `/v1/wallet/nfts/${encodeURIComponent(args.token_identifier)}?${params.toString()}`,
          );
          return toToolResult(result);
        },
      );
    }

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/minhoyoo-iotrust/WAIaaS'

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