Skip to main content
Glama

get_owners_for_nft

Retrieve current owners of a specific NFT by providing its contract address and token ID, with pagination support for large owner lists.

Instructions

Get owners of a specific NFT

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contractAddressYesThe contract address of the NFT
tokenIdYesThe token ID of the NFT
pageKeyNoKey for pagination
pageSizeNoNumber of results per page

Implementation Reference

  • index.ts:565-589 (registration)
    Tool registration including name, description, and input schema definition for get_owners_for_nft
    {
      name: "get_owners_for_nft",
      description: "Get owners of a specific NFT",
      inputSchema: {
        type: "object",
        properties: {
          contractAddress: {
            type: "string",
            description: "The contract address of the NFT",
          },
          tokenId: {
            type: "string",
            description: "The token ID of the NFT",
          },
          pageKey: {
            type: "string",
            description: "Key for pagination",
          },
          pageSize: {
            type: "number",
            description: "Number of results per page",
          },
        },
        required: ["contractAddress", "tokenId"],
      },
  • TypeScript type definition for parameters of get_owners_for_nft
    type GetOwnersForNftParams = GetOwnersForNftOptions & {
      contractAddress: string;
      tokenId: string;
    };
  • Parameter validation helper function for get_owners_for_nft tool
    const isValidGetOwnersForNftParams = (
      args: any
    ): args is GetOwnersForNftParams => {
      return (
        typeof args === "object" &&
        args !== null &&
        typeof args.contractAddress === "string" &&
        typeof args.tokenId === "string" &&
        (args.pageKey === undefined || typeof args.pageKey === "string") &&
        (args.pageSize === undefined || typeof args.pageSize === "number")
      );
    };

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/itsanishjain/alchemy-sdk-mcp'

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