getMaterialDetails
Retrieve detailed material properties and settings from 3D scenes to analyze textures, colors, and material configurations for design workflows.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sceneId | Yes | Scene ID | |
| materialId | Yes | Material ID |
Implementation Reference
- src/tools/material-tools.js:48-69 (handler)The handler function for the 'getMaterialDetails' tool. It fetches the material details using apiClient.getMaterial and returns the JSON stringified data or an error message.try { const material = await apiClient.getMaterial(sceneId, materialId); return { content: [ { type: 'text', text: JSON.stringify(material, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error retrieving material details: ${error.message}` } ], isError: true }; } }
- src/tools/material-tools.js:44-47 (schema)Input schema using Zod validation for the required parameters: sceneId and materialId.sceneId: z.string().min(1).describe('Scene ID'), materialId: z.string().min(1).describe('Material ID'), }, async ({ sceneId, materialId }) => {
- src/tools/material-tools.js:42-70 (registration)The server.tool registration call for 'getMaterialDetails', including schema and handler function.'getMaterialDetails', { sceneId: z.string().min(1).describe('Scene ID'), materialId: z.string().min(1).describe('Material ID'), }, async ({ sceneId, materialId }) => { try { const material = await apiClient.getMaterial(sceneId, materialId); return { content: [ { type: 'text', text: JSON.stringify(material, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error retrieving material details: ${error.message}` } ], isError: true }; } } );