listMaterialLayers
Retrieve all layers associated with a specific material in a 3D scene to analyze material composition and layer structure.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sceneId | Yes | Scene ID | |
| materialId | Yes | Material ID |
Implementation Reference
- The handler function retrieves the list of material layers for a given scene and material ID via an API GET request and returns the JSON stringified layers or an error message.async ({ sceneId, materialId }) => { try { const layers = await apiClient.request('GET', `/scenes/${sceneId}/materials/${materialId}/layers`); return { content: [ { type: 'text', text: JSON.stringify(layers, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error listing material layers: ${error.message}` } ], isError: true }; } }
- Zod schema for validating the input parameters: sceneId and materialId as non-empty strings.{ sceneId: z.string().min(1).describe('Scene ID'), materialId: z.string().min(1).describe('Material ID'), },
- src/tools/advanced-material-tools.js:486-515 (registration)Registration of the 'listMaterialLayers' tool using server.tool method within the registerAdvancedMaterialTools function.'listMaterialLayers', { sceneId: z.string().min(1).describe('Scene ID'), materialId: z.string().min(1).describe('Material ID'), }, async ({ sceneId, materialId }) => { try { const layers = await apiClient.request('GET', `/scenes/${sceneId}/materials/${materialId}/layers`); return { content: [ { type: 'text', text: JSON.stringify(layers, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error listing material layers: ${error.message}` } ], isError: true }; } } );