Skip to main content
Glama

compare_approaches

Compare technical approaches across evaluation criteria to support decision-making in software development.

Instructions

Compares multiple technical approaches on various dimensions to help make informed decisions.

Input Schema

NameRequiredDescriptionDefault
approachesYesList of approaches to compare
criteriaNoEvaluation criteria

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "approaches": { "description": "List of approaches to compare", "items": { "type": "string" }, "type": "array" }, "criteria": { "description": "Evaluation criteria", "items": { "type": "string" }, "type": "array" } }, "required": [ "approaches" ], "type": "object" }

Implementation Reference

  • The core handler function that implements the compare_approaches tool logic. It generates a comprehensive markdown report including a comparison table, detailed analysis for each approach, and a decision framework.
    export function compareApproachesHandler(args: any) { const { approaches, criteria = ["Performance", "Maintainability", "Complexity", "Cost"] } = args; const header = `| Criterion | ${approaches.join(" | ")} |`; const separator = `|${"-".repeat(12)}|${approaches.map(() => "-".repeat(12)).join("|")}|`; const rows = criteria.map((c: string) => `| ${c} | ${approaches.map(() => "⭐⭐⭐").join(" | ")} |` ).join("\n"); const comparison = `# Approach Comparison ## Approaches Being Compared ${approaches.map((a: string, i: number) => `${i + 1}. **${a}**`).join("\n")} ## Comparison Matrix ${header} ${separator} ${rows} *(Ratings are indicative - adjust based on your specific context)* ## Detailed Analysis ${approaches.map((a: string) => `### ${a} **Strengths**: [Identify key strengths] **Weaknesses**: [Identify key weaknesses] **Best suited for**: [Use cases] `).join("\n")} ## Decision Framework 1. Weight criteria by importance to your project 2. Score each approach (1-5) on each criterion 3. Calculate weighted scores 4. Consider non-quantifiable factors (team experience, etc.) ## Recommendation Based on common patterns, provide your specific context for a tailored recommendation. `; return { content: [{ type: "text", text: comparison }] }; }
  • Zod schema definition for the compare_approaches tool, specifying input parameters: required 'approaches' array and optional 'criteria' array.
    export const compareApproachesSchema = { name: "compare_approaches", description: "Compares multiple technical approaches on various dimensions to help make informed decisions.", inputSchema: z.object({ approaches: z.array(z.string()).describe("List of approaches to compare"), criteria: z.array(z.string()).optional().describe("Evaluation criteria") }) };
  • src/index.ts:84-84 (registration)
    Registration of the compare_approaches tool in the main MCP server's toolRegistry Map.
    ["compare_approaches", { schema: compareApproachesSchema, handler: compareApproachesHandler }],
  • src/server.ts:94-94 (registration)
    Registration of the compare_approaches tool in the HTTP server's toolRegistry Map.
    ["compare_approaches", { schema: compareApproachesSchema, handler: compareApproachesHandler }],

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/millsydotdev/Code-MCP'

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