create_object_with_properties
Generate and configure Roblox objects with specific properties in Roblox Studio, defining class, parent, name, and attributes directly upon creation.
Instructions
Create a new Roblox object instance with initial properties
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| className | Yes | Roblox class name (e.g., "Part", "Script", "Folder") | |
| name | No | Optional name for the new object | |
| parent | Yes | Path to the parent instance (e.g., "game.Workspace") | |
| properties | No | Properties to set on creation |
Input Schema (JSON Schema)
{
"properties": {
"className": {
"description": "Roblox class name (e.g., \"Part\", \"Script\", \"Folder\")",
"type": "string"
},
"name": {
"description": "Optional name for the new object",
"type": "string"
},
"parent": {
"description": "Path to the parent instance (e.g., \"game.Workspace\")",
"type": "string"
},
"properties": {
"description": "Properties to set on creation",
"type": "object"
}
},
"required": [
"className",
"parent"
],
"type": "object"
}
Implementation Reference
- src/tools/index.ts:236-254 (handler)The primary handler function that implements the create_object_with_properties tool logic by proxying a creation request (with properties) to the Roblox Studio bridge service via HTTP API.async createObjectWithProperties(className: string, parent: string, name?: string, properties?: Record<string, any>) { if (!className || !parent) { throw new Error('Class name and parent are required for create_object_with_properties'); } const response = await this.client.request('/api/create-object', { className, parent, name, properties }); return { content: [ { type: 'text', text: JSON.stringify(response, null, 2) } ] }; }
- src/index.ts:314-335 (schema)The input schema defining parameters, types, descriptions, and required fields for the create_object_with_properties tool.inputSchema: { type: 'object', properties: { className: { type: 'string', description: 'Roblox class name (e.g., "Part", "Script", "Folder")' }, parent: { type: 'string', description: 'Path to the parent instance (e.g., "game.Workspace")' }, name: { type: 'string', description: 'Optional name for the new object' }, properties: { type: 'object', description: 'Properties to set on creation' } }, required: ['className', 'parent'] }
- src/index.ts:688-689 (registration)Registration and dispatch of the create_object_with_properties tool in the MCP CallToolRequest handler switch statement.case 'create_object_with_properties': return await this.tools.createObjectWithProperties((args as any)?.className as string, (args as any)?.parent as string, (args as any)?.name, (args as any)?.properties);
- src/index.ts:311-312 (registration)Tool registration in the MCP ListToolsRequest response, including name, description, and reference to schema.{ name: 'create_object_with_properties',