Skip to main content
Glama

get_transfers_for_contract

Retrieve NFT transfer history for a specific contract address to track ownership changes and transaction activity.

Instructions

Get transfers for an NFT contract

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contractAddressYesThe contract address of the NFT collection
pageKeyNoKey for pagination
fromBlockNoStarting block number for the query
toBlockNoEnding block number for the query
orderNoOrder of results (ascending or descending)
tokenTypeNoType of token (ERC721 or ERC1155)

Implementation Reference

  • index.ts:622-656 (registration)
    Tool registration including name, description, and detailed input schema for validating parameters like contractAddress, pagination, block range, order, and token type.
      name: "get_transfers_for_contract",
      description: "Get transfers for an NFT contract",
      inputSchema: {
        type: "object",
        properties: {
          contractAddress: {
            type: "string",
            description: "The contract address of the NFT collection",
          },
          pageKey: {
            type: "string",
            description: "Key for pagination",
          },
          fromBlock: {
            type: "number",
            description: "Starting block number for the query",
          },
          toBlock: {
            type: "number",
            description: "Ending block number for the query",
          },
          order: {
            type: "string",
            enum: ["asc", "desc"],
            description: "Order of results (ascending or descending)",
          },
          tokenType: {
            type: "string",
            enum: ["ERC721", "ERC1155"],
            description: "Type of token (ERC721 or ERC1155)",
          },
        },
        required: ["contractAddress"],
      },
    },
  • TypeScript type definition for the tool parameters, extending Alchemy SDK's GetTransfersForContractOptions and requiring contractAddress.
    type GetTransfersForContractParams = GetTransfersForContractOptions & {
      contractAddress: string;
    };
  • Parameter validation helper function that checks if input arguments conform to GetTransfersForContractParams type for use in handler.
    const isValidGetTransfersForContractParams = (
      args: any
    ): args is GetTransfersForContractParams => {
      return (
        typeof args === "object" &&
        args !== null &&
        typeof args.contractAddress === "string" &&
        (args.pageKey === undefined || typeof args.pageKey === "string") &&
        (args.fromBlock === undefined || typeof args.fromBlock === "number") &&
        (args.toBlock === undefined || typeof args.toBlock === "number") &&
        (args.order === undefined || typeof args.order === "string") &&
        (args.tokenType === undefined || typeof args.tokenType === "string")
      );
    };
  • Import of Alchemy SDK type GetTransfersForContractOptions used in parameter type definition.
    GetTransfersForContractOptions,
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves transfers but lacks details on what data is returned (e.g., transfer details, pagination behavior, error handling), whether it's read-only (implied but not explicit), rate limits, or authentication needs. This leaves significant gaps for an agent to understand the tool's behavior.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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

Completeness2/5

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

Given the tool's complexity (6 parameters, no output schema, and no annotations), the description is insufficient. It doesn't explain return values, error conditions, or behavioral nuances like pagination (implied by 'pageKey' but not described). For a data retrieval tool with multiple filtering options, more context is needed to guide effective use.

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

Parameters3/5

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

Schema description coverage is 100%, meaning all parameters are documented in the schema itself. The description adds no additional semantic context beyond implying the tool involves transfers and an NFT contract, which is already covered by parameter descriptions. This meets the baseline score of 3 for high schema coverage without extra value from the description.

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 clearly states the action ('Get transfers') and target resource ('for an NFT contract'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from sibling tools like 'get_asset_transfers' or 'get_transfers_for_owner', which handle similar transfer data but with different scopes or parameters.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'get_asset_transfers' (for broader asset types) or 'get_transfers_for_owner' (for owner-specific transfers), nor does it specify prerequisites such as needing a valid contract address or appropriate blockchain access.

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

Install Server

Other Tools

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