Skip to main content
Glama

list_local_modules

Lists all modules in the currently opened Mendix project file to help AI agents understand the project structure without requiring cloud access.

Instructions

Geeft een overzicht van alle modules in het geopende .mpr bestand.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler logic for the 'list_local_modules' tool. Checks the tool name, calls reader.getModules() to fetch modules, and returns the JSON-stringified result as text content.
    if (request.params.name === "list_local_modules") { const modules = reader.getModules(); return { content: [{ type: "text", text: JSON.stringify(modules, null, 2) }] }; }
  • src/server.ts:46-52 (registration)
    Registration of the 'list_local_modules' tool in the ListTools response, including its name, Dutch description, and empty input schema (no parameters required).
    { name: "list_local_modules", description: "Geeft een overzicht van alle modules in het geopende .mpr bestand.", inputSchema: { type: "object", properties: {} }
  • Input schema for 'list_local_modules': an empty object, indicating no input parameters are needed.
    inputSchema: { type: "object", properties: {} }
  • Core helper method in MprReader class that implements the module listing logic: queries the SQLite database (.mpr file) for distinct 'containerId' from 'Unit' table, handling errors and returning a list of module identifiers.
    getModules(): string[] { if (!this.db) { throw new Error('Database not connected.'); } try { // Placeholder: In a real Mendix DB, modules might be units with specific types // or folders. We will return generic names or 'Unknown' if we can't determine. // Attempting to select distinct container IDs or similar if they represent modules. // For now, returning a mock list mixed with whatever we find in Unit to show activity. const stmt = this.db.prepare("SELECT DISTINCT containerId FROM Unit LIMIT 50"); const rows = stmt.all() as any[]; return rows.map(r => r.containerId || "Unidentified_Module"); } catch (error) { console.error('Error getting modules:', error); return []; } }

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/EGorsel/mendix-local-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server