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

TableJSON Schema
NameRequiredDescriptionDefault
approachesYesList of approaches to compare
criteriaNoEvaluation criteria

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 }],
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool compares approaches but doesn't explain how the comparison is performed (e.g., scoring, ranking, qualitative analysis), what the output looks like, or any limitations (e.g., number of approaches, criteria complexity). This is inadequate for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary details. It is front-loaded and wastes no words, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is insufficiently complete. It doesn't explain the comparison mechanism, output format, or behavioral traits like error handling or performance limits. For a tool with two parameters and no structured output, more context is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for both parameters ('approaches' and 'criteria'). The description adds minimal value beyond the schema, mentioning 'various dimensions' which loosely relates to 'criteria', but doesn't provide additional context like format examples or constraints. The baseline score of 3 is appropriate given the schema's completeness.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Compares multiple technical approaches on various dimensions to help make informed decisions.' It specifies the verb ('compares'), resource ('technical approaches'), and scope ('various dimensions'), though it doesn't explicitly differentiate from sibling tools like 'analyze_architecture' or 'brainstorm_solutions', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools or specify contexts where this comparison is appropriate, such as during decision-making phases versus analysis or brainstorming. This leaves the agent without clear usage boundaries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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