Skip to main content
Glama

list_nfts

Retrieve NFTs owned by a wallet on supported networks. Specify network, wallet, and pagination to view ERC-721, ERC-1155, or Metaplex NFTs with optional grouping by collection.

Instructions

List NFTs (ERC-721, ERC-1155, Metaplex) owned by the wallet for a specific network. Requires NFT indexer API key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkYesNetwork identifier (e.g., "ethereum-mainnet", "solana-mainnet" or CAIP-2 "eip155:1").
cursorNoPagination cursor from previous response.
limitNoMax NFTs per page (default: 20).
group_byNoGroup NFTs by collection.
wallet_idNoTarget wallet ID. Required for multi-wallet sessions.

Implementation Reference

  • The registration and handler logic for the 'list_nfts' MCP tool. It registers the tool with the server and defines the handler to fetch NFTs from the '/v1/wallet/nfts' API endpoint.
    export function registerListNfts(
      server: McpServer,
      apiClient: ApiClient,
      walletContext?: WalletContext,
    ): void {
      server.tool(
        'list_nfts',
        withWalletPrefix(
          'List NFTs (ERC-721, ERC-1155, Metaplex) owned by the wallet for a specific network. Requires NFT indexer API key.',
          walletContext?.walletName,
        ),
        {
          network: z.string().describe('Network identifier (e.g., "ethereum-mainnet", "solana-mainnet" or CAIP-2 "eip155:1").'),
          cursor: z.string().optional().describe('Pagination cursor from previous response.'),
          limit: z.number().optional().describe('Max NFTs per page (default: 20).'),
          group_by: z.enum(['collection']).optional().describe('Group NFTs by collection.'),
          wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions.'),
        },
        async (args) => {
          const params = new URLSearchParams();
          params.set('network', args.network);
          if (args.cursor) params.set('cursor', args.cursor);
          if (args.limit !== undefined) params.set('limit', String(args.limit));
          if (args.group_by) params.set('groupBy', args.group_by);
          if (args.wallet_id) params.set('walletId', args.wallet_id);
          const result = await apiClient.get('/v1/wallet/nfts?' + params.toString());
          return toToolResult(result);
        },
      );
    }
Behavior3/5

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

No annotations provided, so description carries full burden. Adds valuable auth context (API key requirement) and supported standards (ERC-721/1155/Metaplex). Missing: pagination behavior details, rate limits, error modes, or state mutation guarantees (though 'List' implies read-only).

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?

Two sentences, zero waste. Front-loaded with specific action and standards, followed by prerequisite. No redundant phrases or generic filler.

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

Completeness3/5

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

With no output schema and 100% input schema coverage, description adequately covers prerequisites and standards but omits return value structure, pagination response format, and rate limiting—gaps that matter for an NFT listing tool with cursor-based pagination.

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 coverage is 100% with detailed descriptions for all 5 parameters (network formats, cursor pagination, limit default, grouping enum, wallet_id multi-wallet context). Description adds no supplemental parameter guidance, meeting the baseline for high-coverage schemas.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Excellent specificity: verb 'List' + resource 'NFTs' + scope 'owned by the wallet for a specific network'. Distinguishes from siblings by listing specific standards (ERC-721, ERC-1155, Metaplex) and ownership focus, differentiating from get_nft_metadata (single NFT lookup) and transfer_nft (mutation).

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

Usage Guidelines3/5

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

Discloses prerequisite 'Requires NFT indexer API key' which is critical for agent planning. However, lacks explicit guidance on when to choose this over get_assets or get_nft_metadata, and doesn't mention failure modes if API key is unavailable.

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/minhoyoo-iotrust/WAIaaS'

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