get_instance_properties
Retrieve all properties of a specific instance in Roblox Studio by providing its instance path, enabling efficient access to instance data for development and debugging.
Instructions
Get all properties of a specific instance
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instancePath | Yes | Path to the instance |
Input Schema (JSON Schema)
{
"properties": {
"instancePath": {
"description": "Path to the instance",
"type": "string"
}
},
"required": [
"instancePath"
],
"type": "object"
}
Implementation Reference
- src/tools/index.ts:78-91 (handler)The core handler function that validates the instancePath input, makes an HTTP request to the Studio bridge for instance properties, and formats the JSON response for MCP.async getInstanceProperties(instancePath: string) { if (!instancePath) { throw new Error('Instance path is required for get_instance_properties'); } const response = await this.client.request('/api/instance-properties', { instancePath }); return { content: [ { type: 'text', text: JSON.stringify(response, null, 2) } ] }; }
- src/index.ts:141-153 (schema)The input schema definition registered for listTools, specifying the required 'instancePath' parameter and tool description.name: 'get_instance_properties', description: 'Get all properties of a specific instance', inputSchema: { type: 'object', properties: { instancePath: { type: 'string', description: 'Path to the instance' } }, required: ['instancePath'] } },
- src/index.ts:662-663 (registration)The MCP server request handler dispatches 'get_instance_properties' calls to the tools.getInstanceProperties method.case 'get_instance_properties': return await this.tools.getInstanceProperties((args as any)?.instancePath as string);
- src/http-server.ts:186-193 (registration)HTTP endpoint registration that proxies direct HTTP calls to the getInstanceProperties tool handler for Studio plugin compatibility.app.post('/mcp/get_instance_properties', async (req, res) => { try { const result = await tools.getInstanceProperties(req.body.instancePath); res.json(result); } catch (error) { res.status(500).json({ error: error instanceof Error ? error.message : 'Unknown error' }); } });