set_property
Modify property values of Roblox instances by specifying the instance path, property name, and desired value. Integrates with the Roblox Studio MCP Server to enable precise property adjustments.
Instructions
Set a property on any Roblox instance
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instancePath | Yes | Path to the instance (e.g., "game.Workspace.Part") | |
| propertyName | Yes | Name of the property to set | |
| propertyValue | Yes | Value to set the property to (any type) |
Input Schema (JSON Schema)
{
"properties": {
"instancePath": {
"description": "Path to the instance (e.g., \"game.Workspace.Part\")",
"type": "string"
},
"propertyName": {
"description": "Name of the property to set",
"type": "string"
},
"propertyValue": {
"description": "Value to set the property to (any type)"
}
},
"required": [
"instancePath",
"propertyName",
"propertyValue"
],
"type": "object"
}
Implementation Reference
- src/tools/index.ts:160-177 (handler)The main handler function that executes the set_property tool by validating inputs and sending a request to the Studio HTTP client bridge to set the specified property on the instance.async setProperty(instancePath: string, propertyName: string, propertyValue: any) { if (!instancePath || !propertyName) { throw new Error('Instance path and property name are required for set_property'); } const response = await this.client.request('/api/set-property', { instancePath, propertyName, propertyValue }); return { content: [ { type: 'text', text: JSON.stringify(response, null, 2) } ] }; }
- src/index.ts:227-246 (schema)JSON schema definition for the set_property tool inputs, including parameters, descriptions, and required fields.name: 'set_property', description: 'Set a property on any Roblox instance', inputSchema: { type: 'object', properties: { instancePath: { type: 'string', description: 'Path to the instance (e.g., "game.Workspace.Part")' }, propertyName: { type: 'string', description: 'Name of the property to set' }, propertyValue: { description: 'Value to set the property to (any type)' } }, required: ['instancePath', 'propertyName', 'propertyValue'] } },
- src/index.ts:676-678 (registration)Registration and dispatching logic in the MCP CallToolRequest handler that routes set_property calls to the tools.setProperty method.case 'set_property': return await this.tools.setProperty((args as any)?.instancePath as string, (args as any)?.propertyName as string, (args as any)?.propertyValue);