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
| Name | Required | Description | Default |
|---|---|---|---|
| token_identifier | Yes | NFT identifier. EVM: {contractAddress}:{tokenId}. Solana: {mintAddress}. | |
| network | Yes | Network identifier (e.g., "ethereum-mainnet", "solana-mainnet" or CAIP-2 "eip155:1"). | |
| wallet_id | No | Target 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); }, - packages/mcp/src/tools/get-nft-metadata.ts:17-43 (registration)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); }, ); }