deleteObject
Remove 3D objects from Spline scenes by specifying scene and object IDs to clean up your design workspace.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sceneId | Yes | Scene ID | |
| objectId | Yes | Object ID |
Implementation Reference
- src/tools/object-tools.js:204-227 (handler)The main execution handler for the 'deleteObject' MCP tool. It calls the API client to delete the object and returns a formatted success or error response.async ({ sceneId, objectId }) => { try { await apiClient.deleteObject(sceneId, objectId); return { content: [ { type: 'text', text: `Object ${objectId} deleted successfully` } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error deleting object: ${error.message}` } ], isError: true }; } }
- src/tools/object-tools.js:200-203 (schema)Input schema validation using Zod for the deleteObject tool parameters.{ sceneId: z.string().min(1).describe('Scene ID'), objectId: z.string().min(1).describe('Object ID'), },
- src/tools/object-tools.js:198-228 (registration)Direct registration of the 'deleteObject' tool on the MCP server, including name, schema, and handler.server.tool( 'deleteObject', { sceneId: z.string().min(1).describe('Scene ID'), objectId: z.string().min(1).describe('Object ID'), }, async ({ sceneId, objectId }) => { try { await apiClient.deleteObject(sceneId, objectId); return { content: [ { type: 'text', text: `Object ${objectId} deleted successfully` } ] }; } catch (error) { return { content: [ { type: 'text', text: `Error deleting object: ${error.message}` } ], isError: true }; } } );
- src/utils/api-client.js:104-106 (helper)Helper function in API client that performs the HTTP DELETE request to remove the object from the Spline.design API.async deleteObject(sceneId, objectId) { return this.request('DELETE', `/scenes/${sceneId}/objects/${objectId}`); }
- src/index.js:88-88 (registration)Top-level call to register all object tools, including deleteObject, on the MCP server.registerObjectTools(server);