Skip to main content
Glama

getScenes

Retrieve scenes from Spline 3D projects with pagination controls to access specific scenes for design workflows and scene management.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoProject ID (optional)
limitNoMaximum number of scenes to retrieve
offsetNoPagination offset

Implementation Reference

  • Handler function for the 'getScenes' tool. Fetches a list of scenes from the API using GET /scenes with optional projectId and pagination parameters (limit, offset). Returns JSON stringified scenes or error message.
    async ({ projectId, limit, offset }) => { try { const params = { limit, offset, ...(projectId && { projectId }), }; const scenes = await apiClient.request('GET', '/scenes', params); return { content: [ { type: 'text', text: JSON.stringify(scenes, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error retrieving scenes: ${error.message}` } ], isError: true }; } }
  • Input schema for 'getScenes' tool defined using Zod. Parameters: projectId (optional string), limit (number 1-100 default 10), offset (number >=0 default 0).
    { projectId: z.string().min(1).optional().describe('Project ID (optional)'), limit: z.number().int().min(1).max(100).default(10) .describe('Maximum number of scenes to retrieve'), offset: z.number().int().min(0).default(0).describe('Pagination offset'), },
  • Registration of the 'getScenes' tool within the registerSceneTools function using server.tool(). Includes inline schema and handler.
    server.tool( 'getScenes', { projectId: z.string().min(1).optional().describe('Project ID (optional)'), limit: z.number().int().min(1).max(100).default(10) .describe('Maximum number of scenes to retrieve'), offset: z.number().int().min(0).default(0).describe('Pagination offset'), }, async ({ projectId, limit, offset }) => { try { const params = { limit, offset, ...(projectId && { projectId }), }; const scenes = await apiClient.request('GET', '/scenes', params); return { content: [ { type: 'text', text: JSON.stringify(scenes, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error retrieving scenes: ${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