delete_object
Remove specific Roblox object instances by specifying their instance path using the MCP server integrated with Roblox Studio. Streamlines object management within projects.
Instructions
Delete a Roblox object instance
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instancePath | Yes | Path to the instance to delete |
Input Schema (JSON Schema)
{
"properties": {
"instancePath": {
"description": "Path to the instance to delete",
"type": "string"
}
},
"required": [
"instancePath"
],
"type": "object"
}
Implementation Reference
- src/tools/index.ts:286-299 (handler)The core handler function that executes the delete_object tool by validating the instancePath and making an API request to '/api/delete-object' via the StudioHttpClient.async deleteObject(instancePath: string) { if (!instancePath) { throw new Error('Instance path is required for delete_object'); } const response = await this.client.request('/api/delete-object', { instancePath }); return { content: [ { type: 'text', text: JSON.stringify(response, null, 2) } ] }; }
- src/index.ts:405-418 (schema)The input schema definition for the delete_object tool, specifying that 'instancePath' is a required string parameter.{ name: 'delete_object', description: 'Delete a Roblox object instance', inputSchema: { type: 'object', properties: { instancePath: { type: 'string', description: 'Path to the instance to delete' } }, required: ['instancePath'] } },
- src/index.ts:694-695 (registration)The dispatch/registration case in the MCP CallToolRequestSchema handler that maps incoming 'delete_object' calls to the RobloxStudioTools.deleteObject method.case 'delete_object': return await this.tools.deleteObject((args as any)?.instancePath as string);