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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tokenType": "<tokenType>"
},
"name": "get_erc1155_tokens"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | No | Filter by owner Ronin address (ronin:xxxx or 0x...). | |
| tokenType | Yes | The type of ERC1155 token to query. | |
| from | No | Pagination offset. Default 0. | |
| size | No | Number of results to return. Default 10. |
Implementation Reference
- src/index.ts:781-800 (handler)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); }