store_get
Retrieve specific assets from the PlayCanvas Editor MCP Server by providing the asset ID, enabling efficient management and integration of 3D web application resources.
Instructions
Get an asset from the store
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/tools/store.ts:32-42 (registration)Registration of the MCP tool 'store_get', including inline schema and handler function that calls wss.call('store:playcanvas:get', id).mcp.tool( 'store_get', 'Get an asset from the store', { // store: z.enum(['playcanvas', 'sketchfab']).optional(), id: z.string() }, ({ id }) => { return wss.call('store:playcanvas:get', id); } );
- src/tools/store.ts:35-38 (schema)Input schema for store_get tool: requires 'id' string.{ // store: z.enum(['playcanvas', 'sketchfab']).optional(), id: z.string() },
- src/tools/store.ts:39-41 (handler)Handler function for store_get: extracts 'id' and calls the internal 'store:playcanvas:get' method via wss.({ id }) => { return wss.call('store:playcanvas:get', id); }
- extension/main.js:548-559 (helper)Underlying helper method 'store:playcanvas:get' called by the store_get handler, fetches asset data via REST API.wsc.method('store:playcanvas:get', async (id) => { try { const data = await rest('GET', `store/${id}`); if (data.error) { return { error: data.error }; } log(`Got store item(${id})`); return { data }; } catch (e) { return { error: e.message }; } });