Skip to main content
Glama

recommend_models

Get mental model recommendations for problem-solving by describing your challenge. Uses the HUMMBL Base120 framework to suggest validated models that help analyze and address complex situations.

Instructions

Get recommended mental models based on a natural language problem description.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
problemYesDetailed description of the problem or challenge

Implementation Reference

  • Handler function that executes the recommend_models tool: validates API key, sends POST to HUMMBL /v1/recommend with problem description, returns structured recommendations or error.
    try { if (!API_CONFIG.apiKey) { return { content: [ { type: "text", text: "HUMMBL API key not configured. Please set HUMMBL_API_KEY environment variable.", }, ], isError: true, structuredContent: undefined, } as const; } const response = await fetch(`${API_CONFIG.baseUrl}/v1/recommend`, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${API_CONFIG.apiKey}`, }, body: JSON.stringify({ problem }), }); if (!response.ok) { const errorText = await response.text(); return { content: [ { type: "text", text: `API request failed: ${response.status} ${response.statusText}\n${errorText}`, }, ], isError: true, structuredContent: undefined, } as const; } const payload = await response.json(); return { content: [ { type: "text", text: JSON.stringify(payload, null, 2), }, ], structuredContent: payload as { problem: string; recommendationCount: number; recommendations: Array<{ pattern: string; transformations: Array<{ key: string; name: string; description: string; }>; topModels: Array<{ code: string; name: string; definition: string; priority: number; }>; }>; }, } as const; } catch (error) { return { content: [ { type: "text", text: `Failed to call HUMMBL API: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true,
  • Input/output schemas using Zod for the recommend_models tool: input is problem string (min 10 chars), output includes recommendations with patterns, transformations, and top models.
    { title: "Recommend Models for Problem", description: "Get recommended mental models based on a natural language problem description using HUMMBL REST API.", inputSchema: z.object({ problem: z.string().min(10).describe("Detailed description of the problem or challenge"), }), outputSchema: z.object({ problem: z.string(), recommendationCount: z.number(), recommendations: z.array( z.object({ pattern: z.string(), transformations: z.array( z.object({ key: z.string(), name: z.string(), description: z.string(), }) ), topModels: z.array( z.object({ code: z.string(), name: z.string(), definition: z.string(), priority: z.number(), }) ), }) ), }), }, async ({ problem }) => {
  • MCP tool registration call within registerModelTools function, associating name, schema, and handler for recommend_models.
    server.registerTool( "recommend_models", { title: "Recommend Models for Problem", description: "Get recommended mental models based on a natural language problem description using HUMMBL REST API.", inputSchema: z.object({ problem: z.string().min(10).describe("Detailed description of the problem or challenge"), }), outputSchema: z.object({ problem: z.string(), recommendationCount: z.number(), recommendations: z.array( z.object({ pattern: z.string(), transformations: z.array( z.object({ key: z.string(), name: z.string(), description: z.string(), }) ), topModels: z.array( z.object({ code: z.string(), name: z.string(), definition: z.string(), priority: z.number(), }) ), }) ), }), }, async ({ problem }) => { try { if (!API_CONFIG.apiKey) { return { content: [ { type: "text", text: "HUMMBL API key not configured. Please set HUMMBL_API_KEY environment variable.", }, ], isError: true, structuredContent: undefined, } as const; } const response = await fetch(`${API_CONFIG.baseUrl}/v1/recommend`, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${API_CONFIG.apiKey}`, }, body: JSON.stringify({ problem }), }); if (!response.ok) { const errorText = await response.text(); return { content: [ { type: "text", text: `API request failed: ${response.status} ${response.statusText}\n${errorText}`, }, ], isError: true, structuredContent: undefined, } as const; } const payload = await response.json(); return { content: [ { type: "text", text: JSON.stringify(payload, null, 2), }, ], structuredContent: payload as { problem: string; recommendationCount: number; recommendations: Array<{ pattern: string; transformations: Array<{ key: string; name: string; description: string; }>; topModels: Array<{ code: string; name: string; definition: string; priority: number; }>; }>; }, } as const; } catch (error) { return { content: [ { type: "text", text: `Failed to call HUMMBL API: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, structuredContent: undefined,

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/hummbl-dev/mcp-server'

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