Skip to main content
Glama
playcanvas

PlayCanvas Editor MCP Server

Official
by playcanvas

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
NameRequiredDescriptionDefault
limitNo
orderNo
searchYes
skipNo

Implementation Reference

  • 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 }); }
  • 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()
  • 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 }); } );
  • 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);

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/playcanvas/editor-mcp-server'

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