Skip to main content
Glama

Spline MCP Server

by aydinfer
exportScene.js1.4 kB
import axios from 'axios'; import { getApiConfig } from '../utils/apiConfig.js'; /** * Export a Spline scene to various formats (GLB, GLTF, FBX, OBJ) * @param {Object} params - Export parameters * @param {string} params.sceneId - ID of the Spline scene to export * @param {string} params.format - Export format (glb, gltf, fbx, obj) * @param {Object} [params.options] - Additional export options * @returns {Promise<Object>} Export result with download URL */ export async function exportScene(params) { const { sceneId, format, options = {} } = params; const apiConfig = getApiConfig(); try { // Make API request to export the scene const response = await axios.post( `${apiConfig.baseUrl}/scenes/${sceneId}/export`, { format, ...options, }, { headers: { Authorization: `Bearer ${apiConfig.apiKey}`, 'Content-Type': 'application/json', }, } ); return { success: true, downloadUrl: response.data.downloadUrl, format, message: `Scene ${sceneId} has been exported to ${format} format successfully.`, }; } catch (error) { console.error('Error exporting scene:', error.response?.data || error.message); return { success: false, error: error.response?.data?.message || error.message, code: error.response?.status || 500, }; } }

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