Skip to main content
Glama

set_relative_property

Adjust properties of instances in Roblox Studio by performing mathematical operations like add, subtract, multiply, divide, or power on their current values, specified by paths and property names.

Instructions

Modify properties relative to their current values

Input Schema

NameRequiredDescriptionDefault
componentNoSpecific component for Vector3/UDim2 properties
operationYesMathematical operation to perform
pathsYesArray of instance paths to modify
propertyNameYesName of the property to modify
valueYesValue to use in the operation

Input Schema (JSON Schema)

{ "properties": { "component": { "description": "Specific component for Vector3/UDim2 properties", "enum": [ "X", "Y", "Z" ], "type": "string" }, "operation": { "description": "Mathematical operation to perform", "enum": [ "add", "multiply", "divide", "subtract", "power" ], "type": "string" }, "paths": { "description": "Array of instance paths to modify", "items": { "type": "string" }, "type": "array" }, "propertyName": { "description": "Name of the property to modify", "type": "string" }, "value": { "description": "Value to use in the operation" } }, "required": [ "paths", "propertyName", "operation", "value" ], "type": "object" }

Implementation Reference

  • The handler function that executes the set_relative_property tool. Validates parameters and sends HTTP request to the Studio bridge API endpoint '/api/set-relative-property'.
    async setRelativeProperty( paths: string[], propertyName: string, operation: 'add' | 'multiply' | 'divide' | 'subtract' | 'power', value: any, component?: 'X' | 'Y' | 'Z' // For Vector3/UDim2 properties ) { if (!paths || paths.length === 0 || !propertyName || !operation || value === undefined) { throw new Error('Paths, property name, operation, and value are required for set_relative_property'); } const response = await this.client.request('/api/set-relative-property', { paths, propertyName, operation, value, component }); return { content: [ { type: 'text', text: JSON.stringify(response, null, 2) } ] }; }
  • Defines the tool schema including description, input parameters, types, and validation rules for set_relative_property.
    name: 'set_relative_property', description: 'Modify properties relative to their current values', inputSchema: { type: 'object', properties: { paths: { type: 'array', items: { type: 'string' }, description: 'Array of instance paths to modify' }, propertyName: { type: 'string', description: 'Name of the property to modify' }, operation: { type: 'string', enum: ['add', 'multiply', 'divide', 'subtract', 'power'], description: 'Mathematical operation to perform' }, value: { description: 'Value to use in the operation' }, component: { type: 'string', enum: ['X', 'Y', 'Z'], description: 'Specific component for Vector3/UDim2 properties' } }, required: ['paths', 'propertyName', 'operation', 'value'] } },
  • src/index.ts:708-709 (registration)
    Registers the tool handler dispatch in the MCP CallToolRequestSchema switch statement, mapping the tool name to the RobloxStudioTools.setRelativeProperty method.
    case 'set_relative_property': return await this.tools.setRelativeProperty((args as any)?.paths as string[], (args as any)?.propertyName as string, (args as any)?.operation, (args as any)?.value, (args as any)?.component);

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