getEventDetails
Retrieve detailed information about specific events within Spline 3D scenes using scene and event identifiers to access animation and interaction data.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sceneId | Yes | Scene ID | |
| eventId | Yes | Event ID |
Implementation Reference
- src/tools/state-event-tools.js:192-214 (handler)The MCP tool handler function for 'getEventDetails'. Fetches event details using apiClient.getEvent and returns formatted JSON response or error.async ({ sceneId, eventId }) => { try { const event = await apiClient.getEvent(sceneId, eventId); return { content: [ { type: 'text', text: JSON.stringify(event, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error retrieving event details: ${error.message}` } ], isError: true }; } }
- Zod input schema defining required string parameters sceneId and eventId for the getEventDetails tool.{ sceneId: z.string().min(1).describe('Scene ID'), eventId: z.string().min(1).describe('Event ID'), },
- src/tools/state-event-tools.js:186-215 (registration)Direct registration of the 'getEventDetails' tool using server.tool(), including schema and handler.server.tool( 'getEventDetails', { sceneId: z.string().min(1).describe('Scene ID'), eventId: z.string().min(1).describe('Event ID'), }, async ({ sceneId, eventId }) => { try { const event = await apiClient.getEvent(sceneId, eventId); return { content: [ { type: 'text', text: JSON.stringify(event, null, 2) } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error retrieving event details: ${error.message}` } ], isError: true }; } } );
- src/utils/api-client.js:173-175 (helper)apiClient helper method that makes the HTTP GET request to the Spline API to retrieve specific event details.async getEvent(sceneId, eventId) { return this.request('GET', `/scenes/${sceneId}/events/${eventId}`); }
- src/index.js:90-90 (registration)Top-level registration call that invokes the module containing getEventDetails tool registration.registerStateEventTools(server);