Skip to main content
Glama
covalenthq

GoldRush MCP Server

by covalenthq

nft_check_ownership

Verify NFT ownership in a collection by checking a wallet address against a contract on supported blockchains, with optional trait filtering.

Instructions

Commonly used to verify ownership of NFTs (including ERC-721 and ERC-1155) within a collection. Required: chainName (blockchain network), walletAddress (wallet address), collectionContract (NFT collection). Optional: traitsFilter (filter by trait types), valuesFilter (filter by trait values). Returns ownership status and matching NFTs if owned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNameYesThe blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet').
walletAddressYesThe wallet address to check NFT ownership for. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically.
collectionContractYesThe NFT collection contract address to check ownership in. Must be a valid ERC-721 or ERC-1155 contract address.
traitsFilterNoFilter by specific trait types (comma-separated list of trait names to filter by).
valuesFilterNoFilter by specific trait values (comma-separated list of trait values to match).

Implementation Reference

  • The tool definition and handler for nft_check_ownership within NftService.ts. It uses Zod to validate input parameters and calls goldRushClient.NftService.checkOwnershipInNft to retrieve the ownership data.
    server.tool(
        "nft_check_ownership",
        "Commonly used to verify ownership of NFTs (including ERC-721 and ERC-1155) within a collection.\n" +
            "Required: chainName (blockchain network), walletAddress (wallet address), collectionContract (NFT collection).\n" +
            "Optional: traitsFilter (filter by trait types), valuesFilter (filter by trait values).\n" +
            "Returns ownership status and matching NFTs if owned.",
        {
            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 to check ownership in. Must be a valid ERC-721 or ERC-1155 contract address."
                ),
            traitsFilter: z
                .string()
                .optional()
                .describe(
                    "Filter by specific trait types (comma-separated list of trait names to filter by)."
                ),
            valuesFilter: z
                .string()
                .optional()
                .describe(
                    "Filter by specific trait values (comma-separated list of trait values to match)."
                ),
        },
        async (params) => {
            try {
                const response =
                    await goldRushClient.NftService.checkOwnershipInNft(
                        params.chainName as Chain,
                        params.walletAddress,
                        params.collectionContract,
                        {
                            traitsFilter: params.traitsFilter,
                            valuesFilter: params.valuesFilter,
                        }
                    );
                return {
                    content: [
                        {
                            type: "text",
                            text: stringifyWithBigInt(response.data),
                        },
                    ],
                };
            } catch (err) {
                return {
                    content: [{ type: "text", text: `Error: ${err}` }],
                    isError: true,
                };
            }
        }
    );

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/covalenthq/goldrush-mcp-server'

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