Skip to main content
Glama

list_assets

Retrieve and filter NFT assets from the Uranium MCP Server with options for collection ID, search text, pagination, and sorting.

Instructions

List assets with optional filtering by collection, search, and pagination

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contractIdNoFilter assets by collection ID
pageNoPage number (default: 1)
pageSizeNoNumber of assets per page (default: 20, max: 100)
sortByNoSort field (default: createdAt)createdAt
orderNoSort order (default: asc)asc
quickFilterNoSearch text to filter assets by title

Implementation Reference

  • Main handler function that fetches, processes, and returns a paginated list of assets with status formatting and helper functions.
    export async function listAssets(params: z.infer<typeof listAssetsInputSchema>): Promise<AssetListResult> {
      try {
        const response = await api.assets.list({
          contractId: params.contractId,
          page: params.page,
          pageSize: params.pageSize,
          sortBy: params.sortBy ?? "createdAt",
          order: params.order ?? "asc",
          quickFilter: params.quickFilter,
        });
    
        if (response.status !== "ok" || !response.ok) {
          return {
            success: false,
            error: response.errorCode || "Failed to load assets",
          };
        }
    
        const assetsData = response.ok.data || [];
        const meta = response.ok.meta;
    
        const assets = assetsData.map((asset) => ({
          id: asset.id,
          title: asset.title,
          description: asset.description || undefined,
          collectionName: asset.collectionName,
          contractId: asset.contractId,
          status: asset.status.toString(),
          statusText: getAssetStatusText(asset.status),
          isMinted: isAssetMinted(asset.status),
          mediaType: asset.mediaType,
          ercContractType: asset.ercContractType,
          currentEditions: asset.currentEditions,
          totalEditions: asset.editions,
          thumbnailUrl: asset.thumbnailUrl || undefined,
          sourceUrl: asset.sourceUrl,
          contractAddress: asset.contractAddress || undefined,
          tokenId: asset.tokenId || undefined,
          openSeaUrl: asset.openSeaUrl || undefined,
          creatorName: asset.creatorName,
          creatorAddress: formatAddress(asset.creatorAddress),
          currentOwnerName: asset.currentOwnerName || undefined,
          currentOwnerAddress: formatAddress(asset.currentOwnerAddress),
          location: asset.location || undefined,
          isEncrypted: asset.isEncrypted,
          isListed: asset.isListed,
          inTransfer: asset.inTransfer,
          createdAt: asset.createdAt ? formatDate(asset.createdAt) : undefined,
          mintedAt: asset.mintedAt ? formatDate(asset.mintedAt) : undefined,
        }));
    
        const pagination = meta
          ? {
              page: meta.page,
              pageSize: meta.pageSize,
              total: meta.total,
              totalPages: meta.countPages,
              hasNextPage: meta.page < meta.countPages,
              hasPreviousPage: meta.page > 1,
            }
          : {
              page: params.page,
              pageSize: params.pageSize,
              total: assets.length,
              totalPages: 1,
              hasNextPage: false,
              hasPreviousPage: false,
            };
    
        return {
          success: true,
          data: {
            assets,
            pagination,
          },
        };
      } catch (error) {
        return {
          success: false,
          error: error instanceof Error ? error.message : "Unknown error occurred",
        };
      }
    }
  • Zod input schema defining parameters for filtering, pagination, and sorting assets.
    export const listAssetsInputSchema = z.object({
      contractId: z.string().optional().describe("Filter assets by collection ID"),
      page: z.number().min(1).default(1).describe("Page number (default: 1)"),
      pageSize: z.number().min(1).max(100).default(20).describe("Number of assets per page (default: 20, max: 100)"),
      sortBy: z.string().default("createdAt").describe("Sort field (default: createdAt)"),
      order: z.enum(["asc", "desc"]).default("asc").describe("Sort order (default: asc)"),
      quickFilter: z.string().optional().describe("Search text to filter assets by title"),
    });
  • src/server.ts:49-61 (registration)
    Registration of the list_assets tool in the MCP server request handler, including input validation and execution.
    case "list_assets": {
      // Validate and parse arguments
      const validatedArgs = listAssetsInputSchema.parse(args || {});
      const result = await listAssets(validatedArgs);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
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 mentions 'optional filtering by collection, search, and pagination' which gives some context about capabilities, but doesn't disclose important behavioral traits like whether this is a read-only operation, potential rate limits, authentication requirements, or what the response format looks like. For a tool with 6 parameters and no annotations, this is insufficient.

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 extremely concise - a single sentence that efficiently communicates the core functionality and key filtering options. Every word earns its place with no wasted verbiage. The structure is front-loaded with the main purpose followed by key capabilities.

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 has 6 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what an 'asset' represents in this context, what fields are returned, or provide any context about the data model. For a list operation with filtering capabilities, more context about the return format and data structure would be helpful.

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%, so all parameters are well-documented in the schema. The description mentions 'optional filtering by collection, search, and pagination' which maps to contractId, quickFilter, page, and pageSize parameters, but doesn't add meaningful semantic context beyond what the schema already provides. The baseline of 3 is appropriate given the comprehensive schema documentation.

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 verb 'List' and resource 'assets', and mentions optional filtering capabilities. It distinguishes from siblings like create_asset and create_collection by being a read operation, though it doesn't explicitly contrast with list_collections. The purpose is specific but could be more differentiated from list_collections.

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 like list_collections or create_asset. It mentions filtering options but doesn't specify scenarios where filtering is appropriate or when other tools might be better suited. No explicit when/when-not instructions are provided.

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/xkelxmc/uranium-mcp'

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