Skip to main content
Glama

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

NameRequiredDescriptionDefault
chainYesEVM chain to query
tokenIdYesToken ID to query
contractAddressYesNFT contract address (0x...)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so reasonably: it declares the operation read-only with no gas cost, warns that tokenURI may be empty, that metadata JSON formats vary by collection, and that IPFS URIs may need gateway resolution. It stops short of stating failure behavior (revert vs. null return) for non-existent tokens, but the behavioral disclosure is substantive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The useful content is buried under large blocks of irrelevant material: 'CRITICAL GAS CONSIDERATIONS' and per-chain block times/gas notes for a gas-free read call, a 'TESTNET TOKENS' / faucet section, and appended Linux/apt notes that have nothing to do with NFT metadata. Much of the text does not earn its place, though the opening sentence is properly front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, but an OUTPUT STRUCTURE section enumerates the returned fields (owner, tokenURI, parsed metadata, collectionInfo), which covers return-value expectations. The main completeness gap is the absence of sibling differentiation against evm_get_nft_info and evm_get_nft_owner.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: tokenId must be a string because numeric IDs above 2^53 break, contractAddress must be a 42-character valid ERC721 contract, and chain must support ERC721. The worked valid/invalid examples further clarify semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource ('Get complete NFT metadata including owner, tokenURI, and collection details') and explains the mechanism (ERC721 contract query plus JSON fetch from the URI). It does not distinguish itself from close siblings such as evm_get_nft_info or evm_get_nft_owner, so an agent cannot tell from this text alone which of the three to pick.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The USE CASES block implies when to reach for this tool ('verify NFT ownership', 'display NFT details', 'validate metadata before purchasing'), and COMMON MISTAKES warns about pitfalls. However, there is no explicit when-not guidance and no routing to sibling tools like evm_get_nft_owner or evm_get_nft_info that overlap heavily, leaving selection ambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools