search_files
Search and locate files in Roblox Studio by name, type, or content patterns using the MCP Server, enabling precise file retrieval for project management and development.
Instructions
Find files by name, type, or content patterns
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query (name, type, or content pattern) | |
| searchType | No | Type of search to perform | name |
Implementation Reference
- src/tools/index.ts:24-34 (handler)The searchFiles method in RobloxStudioTools class that executes the tool logic by sending a request to the Studio bridge API endpoint '/api/search-files' and formatting the response as MCP content.async searchFiles(query: string, searchType: string = 'name') { const response = await this.client.request('/api/search-files', { query, searchType }); return { content: [ { type: 'text', text: JSON.stringify(response, null, 2) } ] }; }
- src/index.ts:73-92 (schema)The input schema and metadata definition for the 'search_files' tool, provided in the MCP ListTools response.{ name: 'search_files', description: 'Find files by name, type, or content patterns', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search query (name, type, or content pattern)' }, searchType: { type: 'string', enum: ['name', 'type', 'content'], description: 'Type of search to perform', default: 'name' } }, required: ['query'] } },
- src/index.ts:650-651 (registration)The dispatch case in the MCP CallToolRequest handler that routes calls to the searchFiles tool method.case 'search_files': return await this.tools.searchFiles((args as any)?.query as string, (args as any)?.searchType || 'name');
- src/http-server.ts:148-155 (registration)HTTP endpoint registration in the server for direct '/mcp/search_files' calls, proxying to the tool handler.app.post('/mcp/search_files', async (req, res) => { try { const result = await tools.searchFiles(req.body.query, req.body.searchType); res.json(result); } catch (error) { res.status(500).json({ error: error instanceof Error ? error.message : 'Unknown error' }); } });