get_domain_model
Retrieve entity and type overviews from Mendix modules to understand project structure and data models for development and analysis.
Instructions
Geeft een overzicht van alle entiteiten en types in een specifieke module.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module_name | Yes | De naam van de module waarvan je het domeinmodel wilt zien. |
Implementation Reference
- src/server.ts:120-126 (handler)MCP CallTool request handler for the 'get_domain_model' tool. Extracts the 'module_name' parameter and delegates to MprReader.getDomainModel()if (request.params.name === "get_domain_model") { const moduleName = String(request.params.arguments?.module_name); const data = reader.getDomainModel(moduleName); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; }
- src/server.ts:68-81 (registration)Registration of the 'get_domain_model' tool in the ListTools response, including name, description, and input schema requiring 'module_name'{ name: "get_domain_model", description: "Geeft een overzicht van alle entiteiten en types in een specifieke module.", inputSchema: { type: "object", properties: { module_name: { type: "string", description: "De naam van de module waarvan je het domeinmodel wilt zien." } }, required: ["module_name"] } },
- src/mprReader.ts:140-155 (helper)Core implementation of getDomainModel in MprReader class: queries the 'Unit' table (limited to 20 rows) from the MPR SQLite database, optionally filtered by moduleName (placeholder logic).getDomainModel(moduleName?: string): any[] { if (!this.db) { throw new Error('Database not connected.'); } try { // Placeholder logic: // If moduleName is provided, we would filter by that. console.log(`Getting domain model for module: ${moduleName || 'All'}`); const stmt = this.db.prepare("SELECT * FROM Unit LIMIT 20"); return stmt.all(); } catch (error) { console.error('Error getting domain model:', error); return []; } }