Skip to main content
Glama

get_erc1155_tokens

Query ERC1155 tokens like runes, charms, and accessories in Axie Infinity, with options to filter by owner and token type for inventory management.

Instructions

Get ERC1155 tokens such as runes, charms, accessories, ingredients, and other in-game items, optionally filtered by owner.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerNoFilter by owner Ronin address (ronin:xxxx or 0x...).
tokenTypeYesThe type of ERC1155 token to query.
fromNoPagination offset. Default 0.
sizeNoNumber of results to return. Default 10.

Implementation Reference

  • The handler implementation for the 'get_erc1155_tokens' tool, which defines the input schema, parses arguments, executes the GraphQL query using the client, and returns the result.
    case "get_erc1155_tokens": {
      const schema = z.object({
        owner: RoninAddress.optional(),
        tokenType: Erc1155TypeEnum,
        from: z.coerce.number().int().min(0).default(0),
        size: z.coerce.number().int().min(1).max(100).default(10),
      });
      const parsed = schema.parse(args);
      const variables: Record<string, unknown> = {
        tokenType: parsed.tokenType,
        from: parsed.from,
        size: parsed.size,
      };
      if (parsed.owner) variables.owner = parsed.owner;
      const data = await client.query<{ erc1155Tokens: unknown }>(
        queries.GET_ERC1155_TOKENS,
        variables
      );
      return jsonContent(data.erc1155Tokens);
    }

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/jackdlogan/axie-mcp'

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