Skip to main content
Glama

create_object

Generate a new Roblox object instance by specifying its class name and parent path, enabling efficient creation of basic objects within Roblox Studio.

Instructions

Create a new Roblox object instance (basic, without properties)

Input Schema

NameRequiredDescriptionDefault
classNameYesRoblox class name (e.g., "Part", "Script", "Folder")
nameNoOptional name for the new object
parentYesPath to the parent instance (e.g., "game.Workspace")

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" } }, "required": [ "className", "parent" ], "type": "object" }

Implementation Reference

  • The core handler function that implements the 'create_object' MCP tool. Validates className and parent, sends HTTP request to Studio bridge API endpoint '/api/create-object', and returns formatted response.
    async createObject(className: string, parent: string, name?: string) { if (!className || !parent) { throw new Error('Class name and parent are required for create_object'); } const response = await this.client.request('/api/create-object', { className, parent, name }); return { content: [ { type: 'text', text: JSON.stringify(response, null, 2) } ] }; }
  • The tool schema definition for 'create_object', including name, description, and input schema specifying required className and parent parameters.
    name: 'create_object', description: 'Create a new Roblox object instance (basic, without properties)', 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' } }, required: ['className', 'parent'] } },
  • src/index.ts:686-687 (registration)
    The dispatch/registration in the CallToolRequestSchema handler that routes 'create_object' calls to the tools.createObject method.
    case 'create_object': return await this.tools.createObject((args as any)?.className as string, (args as any)?.parent as string, (args as any)?.name);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/boshyxd/robloxstudio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server