Skip to main content
Glama
playcanvas

PlayCanvas Editor MCP Server

Official
by playcanvas

list_assets

Retrieve and filter assets by type within the PlayCanvas Editor MCP Server to manage 3D web application resources efficiently.

Instructions

List all assets with the option to filter by type

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoThe type of assets to list. If not specified, all assets will be listed.

Implementation Reference

  • The execution handler for the list_assets tool, which proxies the call to the WSS 'assets:list' endpoint with optional type filter.
    ({ type }) => { return wss.call('assets:list', type); }
  • Input schema for the list_assets tool: optional 'type' parameter enum for filtering by asset type.
    { type: z.enum(['css', 'cubemap', 'folder', 'font', 'html', 'json', 'material', 'render', 'script', 'shader', 'template', 'text', 'texture']).optional().describe('The type of assets to list. If not specified, all assets will be listed.') },
  • MCP tool registration block for 'list_assets', defining name, description, schema, and handler.
    mcp.tool( 'list_assets', 'List all assets with the option to filter by type', { type: z.enum(['css', 'cubemap', 'folder', 'font', 'html', 'json', 'material', 'render', 'script', 'shader', 'template', 'text', 'texture']).optional().describe('The type of assets to list. If not specified, all assets will be listed.') }, ({ type }) => { return wss.call('assets:list', type); } );
  • src/server.ts:79-79 (registration)
    Calls registerAsset(mcp, wss) which invokes the tool registrations including list_assets.
    registerAsset(mcp, wss);
  • Backend implementation of the 'assets:list' WebSocket method, listing and filtering assets via PlayCanvas API, returning their JSON representations.
    wsc.method('assets:list', (type) => { let assets = api.assets.list(); if (type) { assets = assets.filter((asset) => asset.get('type') === type); } log('Listed assets'); return { data: assets.map((asset) => asset.json()) };

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