Skip to main content
Glama

get_metadata_v4

Retrieve metadata for NFTs or multitokens by specifying chain, token address, and IDs. Works across Ethereum, Base, Arbitrum, BNB Smart Chain, Polygon, Optimism, Celo, and Chiliz blockchains.

Instructions

[blockchain_data] /v4/data/metadata 10 credits per API call > 📘 Note for v3 API users: > > As part of our documentation consolidation, we removed the dedicated page for GET /v3/data/metadata. Users can refer to GET /v4/data/metadata for the latest documentation, as both endpoints function the same—simply replace v4 with v3 in the API URL if using the v3 version. Get metadata of NFTs (ERC-721 and ERC-1155) or multitokens (ERC-1155 only) by IDs for a given token address! Our API lets you search for all tokens on: Ethereum - ethereum-mainnet / ethereum-sepolia / ethereum-holesky Base - base-mainnet / base-sepolia Arbitrum - arb-one-mainnet / arb-testnet BNB (Binance) Smart Chain - bsc-mainnet / bsc-testnet Polygon - polygon-mainnet Optimism - optimism-mainnet / optimism-testnet Celo - celo-mainnet / celo-testnet Chiliz - chiliz-mainnet To get started: Provide a chain name, token address and comma-separated list of IDs. Our API will return relevant metadata about each specified token, including its name, description, image, and more. Aside from the metadata information, the response also contains token types and metadata url minted in each token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesThe blockchain to work with.
tokenAddressYesThe blockchain address of the NFT to get metadata for.
tokenIdsYesThe IDs of the tokens to get metadata for. It is possible to enter list of multiple IDs as a comma separated string.

Implementation Reference

  • Handler function that calls the Tatum API v4 endpoint /v4/data/metadata to fetch NFT/multitoken metadata.
    async getMetadata(args: any): Promise<any> { const url = `/v4/data/metadata`; const parameters = { chain: args.chain, tokenAddress: args.tokenAddress, tokenIds: args.tokenIds }; return await this.apiClient.executeRequest('GET', url, parameters); }
  • Input schema for the get_metadata tool, defining parameters chain, tokenAddress, tokenIds.
    { name: 'get_metadata', description: 'Fetch metadata of NFTs or multitokens by token address and IDs.', inputSchema: { type: 'object', properties: { chain: { type: 'string', description: 'The blockchain to work with.', example: 'ethereum-mainnet' }, tokenAddress: { type: 'string', description: 'The blockchain address of the NFT to get metadata for.', example: '0xba30E5F9Bb24caa003E9f2f0497Ad287FDF95623' }, tokenIds: { type: 'string', description: 'The IDs of the tokens to get metadata for. It is possible to enter list of multiple IDs as a comma separated string.' } }, required: ['chain', 'tokenAddress', 'tokenIds'] } },
  • src/index.ts:115-119 (registration)
    Registration of the get_metadata tool handler in the MCP CallToolRequestSchema switch statement.
    case 'get_metadata': if (!args.chain || !args.tokenAddress || !args.tokenIds) { throw new McpError(ErrorCode.InvalidParams, 'Missing required parameters: chain, tokenAddress, tokenIds'); } return await this.dataService.getMetadata(args);
  • src/index.ts:198-202 (registration)
    Registration of get_metadata in the ListToolsRequestSchema handler, exposing the tool name and schema.
    ...DATA_TOOLS.map(tool => ({ name: tool.name, description: `[data] ${tool.description}`, inputSchema: tool.inputSchema }))
  • Helper function in TatumApiClient that performs the actual HTTP request to Tatum API endpoints like /v4/data/metadata.
    public async executeRequest( method: string, path: string, parameters: Record<string, any> = {} ): Promise<TatumApiResponse> { const validMethods = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH']; if (!method || !path || !validMethods.includes(method.toUpperCase())) { return { error: 'Invalid method or path', status: 400, statusText: 'Bad Request' }; } try { const config: AxiosRequestConfig = { method: method.toLowerCase() as any, url: this.buildUrl(path, parameters), }; // Handle request body for POST/PUT requests if (['POST', 'PUT'].includes(method.toUpperCase())) { config.data = parameters; } const response: AxiosResponse = await this.client.request(config); return { data: response.data, status: response.status, statusText: response.statusText }; } catch (error: any) { return { error: error.response?.data?.message ?? error.response?.statusText ?? error.message ?? 'Request failed', status: error.response?.status ?? 0, statusText: error.response?.statusText ?? 'Error' }; } }

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/tatumio/tatum-mcp'

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