search_by_property
Locate objects in Roblox Studio by specifying a property name and value, enabling precise identification of elements within your project.
Instructions
Find objects with specific property values
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| propertyName | Yes | Name of the property to search | |
| propertyValue | Yes | Value to search for |
Input Schema (JSON Schema)
{
"properties": {
"propertyName": {
"description": "Name of the property to search",
"type": "string"
},
"propertyValue": {
"description": "Value to search for",
"type": "string"
}
},
"required": [
"propertyName",
"propertyValue"
],
"type": "object"
}
Implementation Reference
- src/tools/index.ts:108-124 (handler)The main execution handler for the 'search_by_property' MCP tool. Validates parameters, sends request to Studio bridge API endpoint '/api/search-by-property', and formats response as MCP content.async searchByProperty(propertyName: string, propertyValue: string) { if (!propertyName || !propertyValue) { throw new Error('Property name and value are required for search_by_property'); } const response = await this.client.request('/api/search-by-property', { propertyName, propertyValue }); return { content: [ { type: 'text', text: JSON.stringify(response, null, 2) } ] }; }
- src/index.ts:168-185 (schema)MCP tool schema registration in ListToolsRequestSchema response, defining name, description, and input schema for 'search_by_property'.{ name: 'search_by_property', description: 'Find objects with specific property values', inputSchema: { type: 'object', properties: { propertyName: { type: 'string', description: 'Name of the property to search' }, propertyValue: { type: 'string', description: 'Value to search for' } }, required: ['propertyName', 'propertyValue'] } },
- src/index.ts:666-667 (registration)Tool dispatch registration in the MCP CallToolRequestSchema handler switch statement, routing calls to the tools.searchByProperty method.case 'search_by_property': return await this.tools.searchByProperty((args as any)?.propertyName as string, (args as any)?.propertyValue as string);
- src/http-server.ts:204-211 (registration)HTTP proxy endpoint registration for 'search_by_property' tool, allowing direct HTTP calls from Studio plugin via /mcp/search_by_property.app.post('/mcp/search_by_property', async (req, res) => { try { const result = await tools.searchByProperty(req.body.propertyName, req.body.propertyValue); res.json(result); } catch (error) { res.status(500).json({ error: error instanceof Error ? error.message : 'Unknown error' }); } });