search_axies
Search Axie Infinity marketplace listings with filters for class, parts, breed count, auction type, and owner to find specific digital creatures.
Instructions
Search for Axies on the marketplace with optional filters. Supports filtering by class, parts, breed count, auction type, and owner.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auctionType | No | Filter by listing status. Defaults to All. | |
| owner | No | Filter by owner Ronin address (ronin:xxxx or 0x...). | |
| from | No | Pagination offset. Default 0. | |
| size | No | Number of results to return (max 100). Default 10. | |
| sort | No | Sort order for results. | |
| classes | No | Filter by Axie classes. | |
| parts | No | Filter by part IDs (e.g. ['eyes-zeal', 'mouth-tiny-turtle']). | |
| breedCount | No | Filter by breed count values (e.g. [0, 1, 2]). | |
| stages | No | Filter by stage values. | |
| numMystic | No | Filter by number of mystic parts. |
Implementation Reference
- src/index.ts:595-643 (handler)The handler for 'search_axies' parses input arguments, builds a GraphQL query criteria object, and executes the search using the GraphQL client.
// ── search_axies ───────────────────────────────────────────────────── case "search_axies": { const schema = z.object({ auctionType: AuctionTypeEnum.optional(), owner: RoninAddress.optional(), from: z.coerce.number().int().min(0).default(0), size: z.coerce.number().int().min(1).max(100).default(10), sort: SortByEnum.optional(), classes: jsonArray(z.array(AxieClassEnum)).optional(), parts: jsonArray(z.array(PartId).max(6)).optional(), breedCount: jsonArray(z.array(z.coerce.number().int())).optional(), stages: jsonArray(z.array(z.coerce.number().int())).optional(), numMystic: jsonArray(z.array(z.coerce.number().int())).optional(), }); const parsed = schema.parse(args ?? {}); // Build the criteria object only when filter params are provided const criteria: Record<string, unknown> = {}; if (parsed.classes && parsed.classes.length > 0) { criteria.classes = parsed.classes; } if (parsed.parts && parsed.parts.length > 0) { criteria.parts = parsed.parts; } if (parsed.breedCount && parsed.breedCount.length > 0) { criteria.breedCount = parsed.breedCount; } if (parsed.stages && parsed.stages.length > 0) { criteria.stages = parsed.stages; } if (parsed.numMystic && parsed.numMystic.length > 0) { criteria.numMystic = parsed.numMystic; } const variables: Record<string, unknown> = { from: parsed.from, size: parsed.size, }; if (parsed.auctionType) variables.auctionType = parsed.auctionType; if (parsed.owner) variables.owner = parsed.owner; if (parsed.sort) variables.sort = parsed.sort; if (Object.keys(criteria).length > 0) variables.criteria = criteria; const data = await client.query<{ axies: unknown }>( queries.SEARCH_AXIES, variables ); return jsonContent(data.axies); } - src/index.ts:173-232 (schema)The tool definition for 'search_axies', including its input schema parameters for filtering Axies.
name: "search_axies", description: "Search for Axies on the marketplace with optional filters. Supports filtering by class, parts, breed count, auction type, and owner.", inputSchema: { type: "object", properties: { auctionType: { type: "string", enum: ["All", "Sale", "NotForSale"], description: "Filter by listing status. Defaults to All.", }, owner: { type: "string", description: "Filter by owner Ronin address (ronin:xxxx or 0x...).", }, from: { type: "number", description: "Pagination offset. Default 0.", }, size: { type: "number", description: "Number of results to return (max 100). Default 10.", }, sort: { type: "string", enum: ["IdAsc", "IdDesc", "PriceAsc", "PriceDesc", "Latest", "LevelAsc", "LevelDesc"], description: "Sort order for results.", }, classes: { type: "array", items: { type: "string", enum: ["Beast", "Aquatic", "Plant", "Bug", "Bird", "Reptile", "Mech", "Dawn", "Dusk"], }, description: "Filter by Axie classes.", }, parts: { type: "array", items: { type: "string" }, description: "Filter by part IDs (e.g. ['eyes-zeal', 'mouth-tiny-turtle']).", }, breedCount: { type: "array", items: { type: "number" }, description: "Filter by breed count values (e.g. [0, 1, 2]).", }, stages: { type: "array", items: { type: "number" }, description: "Filter by stage values.", }, numMystic: { type: "array", items: { type: "number" }, description: "Filter by number of mystic parts.", }, }, required: [], }, }, - src/queries.ts:56-57 (helper)The GraphQL query definition for 'SearchAxies'.
export const SEARCH_AXIES = ` query SearchAxies(