bulk_asset_search
Search for multiple digital assets simultaneously to find models, textures, or media files across queries in one operation.
Instructions
Search for multiple asset queries in bulk
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assets | Yes | Array of asset search queries |
Implementation Reference
- server.js:852-865 (handler)The handler function for the 'bulk_asset_search' tool. It validates input using BulkAssetSearchSchema, calls the apiClient's bulkAssetSearch method, and returns a formatted JSON response with the results.handler: async (args) => { const { assets } = BulkAssetSearchSchema.parse(args); const result = await apiClient.bulkAssetSearch(assets); return { content: [{ type: "text", text: JSON.stringify({ success: true, data: result, message: `Bulk search completed for ${assets.length} queries` }, null, 2) }] }; }
- server.js:52-57 (schema)Zod input validation schema for the bulk_asset_search tool, defining an array of search queries each with a required query string and optional limit.const BulkAssetSearchSchema = z.object({ assets: z.array(z.object({ query: z.string().describe('Search query'), limit: z.number().optional().default(10).describe('Number of results per query') })) });
- server.js:824-866 (registration)The registration of the 'bulk_asset_search' tool in the tools array, including its name, description, JSON inputSchema, and handler function.{ name: "bulk_asset_search", description: "Search for multiple asset queries in bulk", inputSchema: { type: "object", properties: { assets: { type: "array", items: { type: "object", properties: { query: { type: "string", description: "Search query" }, limit: { type: "number", description: "Number of results per query (default: 10)", default: 10 } }, required: ["query"] }, description: "Array of asset search queries" } }, required: ["assets"] }, handler: async (args) => { const { assets } = BulkAssetSearchSchema.parse(args); const result = await apiClient.bulkAssetSearch(assets); return { content: [{ type: "text", text: JSON.stringify({ success: true, data: result, message: `Bulk search completed for ${assets.length} queries` }, null, 2) }] }; } },
- server.js:195-200 (helper)Supporting API client method that performs the actual bulk asset search by POSTing the assets array to the WebSim API endpoint.async bulkAssetSearch(assets) { return this.makeRequest('/api/v1/search/assets/bulk', { method: 'POST', body: JSON.stringify({ assets }) }); }