evm_get_nft_metadata
Fetch complete NFT metadata—owner, tokenURI, collection info, and parsed JSON—from an ERC721 contract on supported EVM chains for ownership checks, marketplace display, or purchase validation.
Instructions
Get complete NFT metadata including owner, tokenURI, and collection details.
Queries ERC721 contract for NFT ownership and metadata URI. Fetches JSON metadata from URI if available. Supports IPFS, HTTP, and on-chain metadata formats.
CRITICAL RULES:
tokenId must exist (already minted)
Read-only operation (no gas cost)
tokenURI may be empty for some NFTs
Metadata JSON format varies by collection
IPFS URIs may require gateway resolution
PARAMETERS:
chain: EVM chain to query (required)
Must support ERC721 standard
contractAddress: NFT collection address (required)
Must be valid ERC721 contract
Format: "0x..." (42 characters)
tokenId: Token ID to query (required)
Must be minted token
Format: string (not number for large IDs)
EXAMPLES: ✅ Get metadata for token #123: {chain: "polygon", contractAddress: "0x7227E4D7...", tokenId: "123"}
✅ Query rare NFT with large ID: {chain: "ethereum", contractAddress: "0xBC4CA0E...", tokenId: "8762"}
❌ Invalid - non-existent token: {chain: "polygon", contractAddress: "0x7227E4D7...", tokenId: "999999999"}
SUPPORTED EVM CHAINS (7 networks): • ethereum (Sepolia) - EIP-1559 enabled, ~12s blocks, moderate gas costs • polygon (Amoy) - Low fees, fast finality (~2s), layer 2 • avalanche (Fuji C-Chain) - Sub-second finality, dynamic fees • bsc (BNB Testnet) - 3s blocks, low gas costs, Binance ecosystem • arbitrum (Sepolia) - Optimistic rollup, low fees, Ethereum security • base (Sepolia) - Coinbase layer 2, EIP-1559, low fees • worldchain (World Sepolia) - World Network testnet, EIP-1559
CRITICAL GAS CONSIDERATIONS:
Ethereum: High gas costs, use gas oracle for timing
Polygon/BSC: Very low gas, safe for frequent transactions
Arbitrum/Base: L2 optimizations, ~10-50x cheaper than Ethereum
Avalanche: Dynamic fees, can spike during congestion
Always check gas price before executing transactions
TESTNET TOKENS: All chains use testnet tokens with NO REAL VALUE. Faucets available for all supported networks.
OUTPUT STRUCTURE: • owner: Current owner address • tokenURI: Metadata URI (IPFS, HTTP, or base64) • metadata: Parsed JSON if available (name, description, image, attributes) • collectionInfo: Contract name, symbol
COMMON MISTAKES:
Using number type for tokenId (breaks for IDs > 2^53)
Assuming all NFTs have metadata URIs
Not handling IPFS gateway failures
Expecting consistent metadata format across collections
USE CASES:
Verify NFT ownership before operations
Display NFT details in marketplace UI
Validate metadata before purchasing
Audit collection traits and rarity
Running on Linux.
LINUX-SPECIFIC NOTES:
Package manager: apt (Ubuntu/Debian), yum (RHEL/CentOS), or pacman (Arch)
Python 3 is typically 'python3' command
GNU tools are standard
Use 'xdg-open' command to open files/applications
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chain": "<chain>",
"contractAddress": "<contractAddress>",
"tokenId": "<tokenId>"
},
"name": "evm_get_nft_metadata"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | EVM chain to query | |
| tokenId | Yes | Token ID to query | |
| contractAddress | Yes | NFT contract address (0x...) |