Skip to main content
Glama

getStates

Retrieve scene states from Spline 3D design tool to access and manage different configurations of your 3D scenes for design workflows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sceneIdYesScene ID

Implementation Reference

  • The handler function that implements the core logic of the 'getStates' tool: fetches states for a given sceneId using apiClient and returns formatted JSON or error response.
    async ({ sceneId }) => { try { const states = await apiClient.getStates(sceneId); return { content: [ { type: 'text', text: JSON.stringify(states, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error retrieving states: ${error.message}` } ], isError: true }; } }
  • Zod schema defining the input parameters for the 'getStates' tool (sceneId: non-empty string).
    { sceneId: z.string().min(1).describe('Scene ID'), },
  • The server.tool call that registers the 'getStates' tool, including its name, input schema, and handler function.
    server.tool( 'getStates', { sceneId: z.string().min(1).describe('Scene ID'), }, async ({ sceneId }) => { try { const states = await apiClient.getStates(sceneId); return { content: [ { type: 'text', text: JSON.stringify(states, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error retrieving states: ${error.message}` } ], isError: true }; } } );
  • Helper method in apiClient that performs the actual API request to retrieve states for a scene.
    async getStates(sceneId) { return this.request('GET', `/scenes/${sceneId}/states`); }

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