Skip to main content
Glama

getMaterialDetails

Retrieve detailed material properties and settings from 3D scenes to analyze textures, colors, and material configurations for design workflows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sceneIdYesScene ID
materialIdYesMaterial ID

Implementation Reference

  • 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 }; } }
  • 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 }) => {
  • 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 }; } } );

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