Skip to main content
Glama

set_calculated_property

Use mathematical formulas and variables to dynamically set properties for Roblox Studio instances. Specify paths, property names, and formulas to automate property adjustments.

Instructions

Set properties using mathematical formulas and variables

Input Schema

NameRequiredDescriptionDefault
formulaYesMathematical formula (e.g., "Position.magnitude * 2", "index * 50")
pathsYesArray of instance paths to modify
propertyNameYesName of the property to set
variablesNoAdditional variables for the formula

Input Schema (JSON Schema)

{ "properties": { "formula": { "description": "Mathematical formula (e.g., \"Position.magnitude * 2\", \"index * 50\")", "type": "string" }, "paths": { "description": "Array of instance paths to modify", "items": { "type": "string" }, "type": "array" }, "propertyName": { "description": "Name of the property to set", "type": "string" }, "variables": { "description": "Additional variables for the formula", "type": "object" } }, "required": [ "paths", "propertyName", "formula" ], "type": "object" }

Implementation Reference

  • The main execution handler for the set_calculated_property tool. It validates inputs, sends a request to the Studio bridge API endpoint '/api/set-calculated-property', and formats the response as MCP content.
    async setCalculatedProperty( paths: string[], propertyName: string, formula: string, variables?: Record<string, any> ) { if (!paths || paths.length === 0 || !propertyName || !formula) { throw new Error('Paths, property name, and formula are required for set_calculated_property'); } const response = await this.client.request('/api/set-calculated-property', { paths, propertyName, formula, variables }); return { content: [ { type: 'text', text: JSON.stringify(response, null, 2) } ] }; }
  • The input schema definition registered for the set_calculated_property tool in the MCP ListTools response, defining parameters and validation rules.
    name: 'set_calculated_property', description: 'Set properties using mathematical formulas and variables', 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 set' }, formula: { type: 'string', description: 'Mathematical formula (e.g., "Position.magnitude * 2", "index * 50")' }, variables: { type: 'object', description: 'Additional variables for the formula' } }, required: ['paths', 'propertyName', 'formula'] } },
  • src/index.ts:704-705 (registration)
    The dispatch registration in the CallToolRequestSchema handler's switch statement, routing tool calls to the RobloxStudioTools.setCalculatedProperty method.
    case 'set_calculated_property': return await this.tools.setCalculatedProperty((args as any)?.paths as string[], (args as any)?.propertyName as string, (args as any)?.formula as string, (args as any)?.variables);

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