store_search
Locate assets in the PlayCanvas Editor store by specifying search terms, sorting order, and pagination parameters for efficient project integration.
Instructions
Search for an asset in the store
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| order | No | ||
| search | Yes | ||
| skip | No |
Implementation Reference
- src/tools/store.ts:22-29 (handler)The execution handler for the 'store_search' MCP tool. It transforms the optional 'order' parameter using the orderEnum helper and forwards the search parameters (search, order, skip, limit) to the WebSocket service's 'store:playcanvas:list' method.({ search, order, skip, limit }) => { return wss.call('store:playcanvas:list', { search, order: order ? orderEnum[order] : undefined, skip, limit }); }
- src/tools/store.ts:17-20 (schema)Zod input schema defining the parameters for the 'store_search' tool: required 'search' string, optional 'order' ('asc' or 'desc'), optional 'skip' and 'limit' numbers.search: z.string(), order: z.enum(['asc', 'desc']).optional(), skip: z.number().optional(), limit: z.number().optional()
- src/tools/store.ts:12-30 (registration)MCP tool registration for 'store_search' using mcp.tool(), specifying the tool name, description, input schema, and inline handler function.mcp.tool( 'store_search', 'Search for an asset in the store', { // store: z.enum(['playcanvas', 'sketchfab']).optional(), search: z.string(), order: z.enum(['asc', 'desc']).optional(), skip: z.number().optional(), limit: z.number().optional() }, ({ search, order, skip, limit }) => { return wss.call('store:playcanvas:list', { search, order: order ? orderEnum[order] : undefined, skip, limit }); } );
- src/tools/store.ts:6-9 (helper)Helper object mapping sort order strings ('asc', 'desc') to numeric values (1, -1) for use in the handler's order parameter transformation.const orderEnum = { 'asc': 1, 'desc': -1 };
- src/server.ts:83-83 (registration)Top-level invocation of the store register function in the main server setup, which registers the 'store_search' tool among others.registerStore(mcp, wss);