list_all_models
Retrieve all 120 HUMMBL mental models with basic information, optionally filtered by transformation type to support problem-solving and decision-making.
Instructions
Retrieve complete list of all 120 HUMMBL mental models with basic information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| transformation_filter | No | Optional filter by transformation type |
Implementation Reference
- src/tools/models.ts:120-167 (handler)The core handler function for the 'list_all_models' tool. It fetches all models or filters by transformation, enriches each with its transformation category, and returns a structured JSON payload.async ({ transformation_filter }) => { let models = getAllModels(); if (transformation_filter) { const result = getModelsByTransformation(transformation_filter); if (!isOk(result)) { return { content: [ { type: "text", text: `Unable to list models for transformation '${transformation_filter}'.`, }, ], isError: true, } as const; } models = result.value; } const enriched = models.map((m) => { const trans = Object.values(TRANSFORMATIONS).find((t) => t.models.some((model) => model.code === m.code) ); return { code: m.code, name: m.name, definition: m.definition, priority: m.priority, transformation: trans?.key ?? "UNKNOWN", }; }); const payload = { total: enriched.length, models: enriched, }; return { content: [ { type: "text", text: JSON.stringify(payload, null, 2), }, ], structuredContent: payload, } as const; }
- src/tools/models.ts:98-119 (schema)Zod schemas defining the input (optional transformation filter) and output (total count and list of models with details) for the list_all_models tool.{ title: "List All Mental Models", description: "Retrieve complete list of all 120 HUMMBL mental models with basic information.", inputSchema: z.object({ transformation_filter: z .enum(["P", "IN", "CO", "DE", "RE", "SY"]) .optional() .describe("Optional filter by transformation type"), }), outputSchema: z.object({ total: z.number(), models: z.array( z.object({ code: z.string(), name: z.string(), definition: z.string(), priority: z.number(), transformation: z.string(), }) ), }), },
- src/tools/models.ts:96-168 (registration)Registers the 'list_all_models' tool on the MCP server within the registerModelTools function.server.registerTool( "list_all_models", { title: "List All Mental Models", description: "Retrieve complete list of all 120 HUMMBL mental models with basic information.", inputSchema: z.object({ transformation_filter: z .enum(["P", "IN", "CO", "DE", "RE", "SY"]) .optional() .describe("Optional filter by transformation type"), }), outputSchema: z.object({ total: z.number(), models: z.array( z.object({ code: z.string(), name: z.string(), definition: z.string(), priority: z.number(), transformation: z.string(), }) ), }), }, async ({ transformation_filter }) => { let models = getAllModels(); if (transformation_filter) { const result = getModelsByTransformation(transformation_filter); if (!isOk(result)) { return { content: [ { type: "text", text: `Unable to list models for transformation '${transformation_filter}'.`, }, ], isError: true, } as const; } models = result.value; } const enriched = models.map((m) => { const trans = Object.values(TRANSFORMATIONS).find((t) => t.models.some((model) => model.code === m.code) ); return { code: m.code, name: m.name, definition: m.definition, priority: m.priority, transformation: trans?.key ?? "UNKNOWN", }; }); const payload = { total: enriched.length, models: enriched, }; return { content: [ { type: "text", text: JSON.stringify(payload, null, 2), }, ], structuredContent: payload, } as const; } );
- src/framework/base120.ts:845-847 (helper)Helper function called by the handler to retrieve the complete list of all mental models from the TRANSFORMATIONS data structure.export function getAllModels(): MentalModel[] { return Object.values(TRANSFORMATIONS).flatMap((t) => t.models); }
- src/framework/base120.ts:890-900 (helper)Helper function used when filtering models by a specific transformation type (e.g., 'P', 'IN').export function getModelsByTransformation( transformationKey: TransformationType ): Result<MentalModel[], DomainError> { const trans = TRANSFORMATIONS[transformationKey] ?? null; if (!trans) { return err({ type: "NotFound", entity: "Transformation", code: transformationKey }); } return ok(trans.models); }
- src/server.ts:22-22 (registration)Top-level call in server creation that invokes registerModelTools, thereby registering the list_all_models tool.registerModelTools(server);