inspect_local_microflow
Find a microflow by name and return its logical steps to understand local Mendix project structure and logic directly from the .mpr file.
Instructions
Zoekt een microflow op naam en geeft de logische stappen terug.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Naam van de microflow |
Implementation Reference
- src/server.ts:112-118 (handler)Executes the inspect_local_microflow tool by extracting the microflow name from arguments, calling reader.getMicroflowJSON, and returning the JSON-formatted result.if (request.params.name === "inspect_local_microflow") { const name = String(request.params.arguments?.name); const data = reader.getMicroflowJSON(name); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; }
- src/server.ts:54-67 (registration)Registers the inspect_local_microflow tool in the ListTools response, including its name, description, and input schema requiring a 'name' string.{ name: "inspect_local_microflow", description: "Zoekt een microflow op naam en geeft de logische stappen terug.", inputSchema: { type: "object", properties: { name: { type: "string", description: "Naam van de microflow" } }, required: ["name"] } },
- src/mprReader.ts:84-110 (helper)Helper method in MprReader class that attempts to retrieve microflow JSON by name from the .mpr SQLite database, currently returns available columns and a message due to schema uncertainty.getMicroflowJSON(name: string): any { if (!this.db) { throw new Error('Database not connected.'); } try { // We search for a unit that might contain the name. // 'tree' is often the blob column. 'unitId' is the ID. // This query is speculative. // We strive to find a row where some text column matches the name. // Pragma to find columns again (cached ideally). const columns = this.db.pragma('table_info(Unit)') as any[]; const colNames = columns.map(c => c.name); // Heuristic: if there is a 'Name' column? // If not, we can't easily filter by name in SQL without scanning blobs? // We will return a message + the raw data of the first few matching units if we can guess. return { message: "To retrieve a specific microflow, we need to know the schema column for 'Name'.", availableColumns: colNames, instruction: "Please inspect 'getProjectSummary' output to identify the Name column." }; } catch (error) { console.error(`Error retrieving microflow ${name}:`, error); return null; } }