nft_check_ownership_token_id
Verify ownership of a specific NFT token within a collection by checking blockchain data for a given wallet address, collection contract, and token ID.
Instructions
Commonly used to verify ownership of a specific token (ERC-721 or ERC-1155) within a collection. Required: chainName (blockchain network), walletAddress (wallet address), collectionContract (NFT collection), tokenId (specific token ID). Returns ownership status for the specific token ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chainName | Yes | The blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet'). | |
| walletAddress | Yes | The wallet address to check NFT ownership for. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically. | |
| collectionContract | Yes | The NFT collection contract address. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically. | |
| tokenId | Yes | The specific token ID to check ownership for. |
Implementation Reference
- src/services/NftService.ts:158-209 (handler)Implementation and registration of the 'nft_check_ownership_token_id' tool. The handler calls GoldRushClient's checkOwnershipInNftForSpecificTokenId method.
server.tool( "nft_check_ownership_token_id", "Commonly used to verify ownership of a specific token (ERC-721 or ERC-1155) within a collection.\n" + "Required: chainName (blockchain network), walletAddress (wallet address), collectionContract (NFT collection), tokenId (specific token ID).\n" + "Returns ownership status for the specific token ID.", { chainName: z .enum(Object.values(ChainName) as [string, ...string[]]) .describe( "The blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet')." ), walletAddress: z .string() .describe( "The wallet address to check NFT ownership for. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically." ), collectionContract: z .string() .describe( "The NFT collection contract address. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically." ), tokenId: z .string() .describe( "The specific token ID to check ownership for." ), }, async (params) => { try { const response = await goldRushClient.NftService.checkOwnershipInNftForSpecificTokenId( params.chainName as Chain, params.walletAddress, params.collectionContract, params.tokenId ); return { content: [ { type: "text", text: stringifyWithBigInt(response.data), }, ], }; } catch (err) { return { content: [{ type: "text", text: `Error: ${err}` }], isError: true, }; } } );