triggerWebhook
Send custom data to webhooks within Spline 3D scenes to trigger external actions and automate workflows between 3D designs and other systems.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sceneId | Yes | Scene ID | |
| webhookId | Yes | Webhook ID | |
| data | Yes | Data to send with the webhook |
Implementation Reference
- src/tools/api-webhook-tools.js:256-278 (handler)MCP tool handler for 'triggerWebhook'. Calls apiClient.triggerWebhook with provided parameters and returns success/error response.async ({ sceneId, webhookId, data }) => { try { await apiClient.triggerWebhook(sceneId, webhookId, data); return { content: [ { type: 'text', text: `Webhook ${webhookId} triggered successfully` } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error triggering webhook: ${error.message}` } ], isError: true }; }
- Zod input schema for triggerWebhook tool defining sceneId, webhookId, and data parameters.{ sceneId: z.string().min(1).describe('Scene ID'), webhookId: z.string().min(1).describe('Webhook ID'), data: z.record(z.any()).describe('Data to send with the webhook'), },
- src/tools/api-webhook-tools.js:249-280 (registration)Full MCP server.tool registration block for the 'triggerWebhook' tool, including schema and handler.server.tool( 'triggerWebhook', { sceneId: z.string().min(1).describe('Scene ID'), webhookId: z.string().min(1).describe('Webhook ID'), data: z.record(z.any()).describe('Data to send with the webhook'), }, async ({ sceneId, webhookId, data }) => { try { await apiClient.triggerWebhook(sceneId, webhookId, data); return { content: [ { type: 'text', text: `Webhook ${webhookId} triggered successfully` } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error triggering webhook: ${error.message}` } ], isError: true }; } } );
- src/utils/api-client.js:233-235 (helper)Supporting API client method that sends HTTP POST request to Spline API to trigger the specified webhook.async triggerWebhook(sceneId, webhookId, data) { return this.request('POST', `/scenes/${sceneId}/webhooks/${webhookId}/trigger`, data); }