Skip to main content
Glama

get_asset_transfers

Retrieve blockchain asset transfers for addresses or contracts, filtering by block range, transfer categories, and contract addresses to analyze transaction history.

Instructions

Get asset transfers for a specific address or contract

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromBlockNoThe starting block (hex string or "latest")
toBlockNoThe ending block (hex string or "latest")
fromAddressNoThe sender address
toAddressNoThe recipient address
categoryNoThe category of transfers to include (e.g., "external", "internal", "erc20", "erc721", "erc1155", "specialnft")
contractAddressesNoList of contract addresses to filter by
maxCountNoThe maximum number of results to return
excludeZeroValueNoWhether to exclude zero value transfers
pageKeyNoKey for pagination
withMetadataNoWhether to include metadata in the response

Implementation Reference

  • index.ts:766-829 (registration)
    Registration of the get_asset_transfers tool, including name, description, and complete input schema for MCP tool listing.
    {
      name: "get_asset_transfers",
      description: "Get asset transfers for a specific address or contract",
      inputSchema: {
        type: "object",
        properties: {
          fromBlock: {
            type: "string",
            description: 'The starting block (hex string or "latest")',
          },
          toBlock: {
            type: "string",
            description: 'The ending block (hex string or "latest")',
          },
          fromAddress: {
            type: "string",
            description: "The sender address",
          },
          toAddress: {
            type: "string",
            description: "The recipient address",
          },
          category: {
            type: "array",
            items: {
              type: "string",
              enum: [
                "external",
                "internal",
                "erc20",
                "erc721",
                "erc1155",
                "specialnft",
              ],
            },
            description:
              'The category of transfers to include (e.g., "external", "internal", "erc20", "erc721", "erc1155", "specialnft")',
          },
          contractAddresses: {
            type: "array",
            items: {
              type: "string",
            },
            description: "List of contract addresses to filter by",
          },
          maxCount: {
            type: "number",
            description: "The maximum number of results to return",
          },
          excludeZeroValue: {
            type: "boolean",
            description: "Whether to exclude zero value transfers",
          },
          pageKey: {
            type: "string",
            description: "Key for pagination",
          },
          withMetadata: {
            type: "boolean",
            description: "Whether to include metadata in the response",
          },
        },
      },
    },
  • TypeScript type definition for the tool's input parameters, aliasing Alchemy SDK's AssetTransfersParams.
    type GetAssetTransfersParams = AssetTransfersParams;
  • Helper function to validate and type-guard the input arguments for the get_asset_transfers tool before execution.
    const isValidGetAssetTransfersParams = (
      args: any
    ): args is GetAssetTransfersParams => {
      return (
        typeof args === "object" &&
        args !== null &&
        (args.fromBlock === undefined || typeof args.fromBlock === "string") &&
        (args.toBlock === undefined || typeof args.toBlock === "string") &&
        (args.fromAddress === undefined || typeof args.fromAddress === "string") &&
        (args.toAddress === undefined || typeof args.toAddress === "string") &&
        (args.category === undefined || Array.isArray(args.category)) &&
        (args.contractAddresses === undefined ||
          Array.isArray(args.contractAddresses)) &&
        (args.maxCount === undefined || typeof args.maxCount === "number") &&
        (args.excludeZeroValue === undefined ||
          typeof args.excludeZeroValue === "boolean") &&
        (args.pageKey === undefined || typeof args.pageKey === "string") &&
        (args.withMetadata === undefined || typeof args.withMetadata === "boolean")
      );
    };
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves transfers but doesn't describe key behaviors such as pagination handling (implied by 'pageKey' parameter), rate limits, authentication needs, or what the response format looks like. For a read operation with 10 parameters and no output schema, this leaves significant gaps in understanding how the tool behaves.

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: 'Get asset transfers for a specific address or contract.' It's front-loaded with the core purpose and contains no wasted words, making it highly concise and well-structured for quick comprehension.

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 complexity (10 parameters, no annotations, no output schema), the description is insufficiently complete. It doesn't explain the return format, pagination behavior, error conditions, or how parameters interact (e.g., filtering logic). For a tool that likely returns structured data, more context is needed to guide effective use, especially without annotations or output schema to fill in gaps.

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?

The input schema has 100% description coverage, so parameters like 'fromBlock' and 'category' are well-documented in the schema. The description adds minimal value beyond this, only implying filtering by address or contract without detailing parameter interactions or semantics. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't significantly enhance parameter understanding.

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 tool's purpose: 'Get asset transfers for a specific address or contract.' It uses a specific verb ('Get') and resource ('asset transfers'), and specifies the target ('address or contract'). However, it doesn't distinguish this tool from sibling tools like 'get_transfers_for_contract' or 'get_transfers_for_owner,' which appear to serve similar purposes, so it doesn't reach the highest score.

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_transfers_for_contract' or 'get_transfers_for_owner,' nor does it explain any prerequisites or exclusions. Usage is implied by the purpose but lacks explicit context for selection.

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