deleteMaterialLayer
Remove a specific layer from a material in your 3D scene to modify material properties and streamline your design workflow.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sceneId | Yes | Scene ID | |
| materialId | Yes | Material ID | |
| layerId | Yes | Layer ID |
Implementation Reference
- The handler function that executes the tool logic: sends a DELETE request via apiClient to remove the specified layer from the material.async ({ sceneId, materialId, layerId }) => { try { await apiClient.request('DELETE', `/scenes/${sceneId}/materials/${materialId}/layers/${layerId}`); return { content: [ { type: 'text', text: `Layer ${layerId} deleted successfully` } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error deleting material layer: ${error.message}` } ], isError: true }; }
- Zod input schema for the tool parameters: sceneId, materialId, and layerId.{ sceneId: z.string().min(1).describe('Scene ID'), materialId: z.string().min(1).describe('Material ID'), layerId: z.string().min(1).describe('Layer ID'), },
- src/tools/advanced-material-tools.js:518-549 (registration)Registration of the 'deleteMaterialLayer' tool on the server within registerAdvancedMaterialTools function.server.tool( 'deleteMaterialLayer', { sceneId: z.string().min(1).describe('Scene ID'), materialId: z.string().min(1).describe('Material ID'), layerId: z.string().min(1).describe('Layer ID'), }, async ({ sceneId, materialId, layerId }) => { try { await apiClient.request('DELETE', `/scenes/${sceneId}/materials/${materialId}/layers/${layerId}`); return { content: [ { type: 'text', text: `Layer ${layerId} deleted successfully` } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error deleting material layer: ${error.message}` } ], isError: true }; } } );
- src/index.js:97-97 (registration)Invocation of registerAdvancedMaterialTools which includes the registration of 'deleteMaterialLayer' on the main MCP server.registerAdvancedMaterialTools(server);