Skip to main content
Glama

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
NameRequiredDescriptionDefault
sceneIdYesScene ID
materialIdYesMaterial ID
layerIdYesLayer 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'), },
  • 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);

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/aydinfer/spline-mcp-server'

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