Skip to main content
Glama

estimate_complexity

Estimates task complexity and effort requirements by analyzing tasks and influencing factors to help plan development work effectively.

Instructions

Estimates the complexity and effort required for a task or feature.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesThe task to estimate
factorsNoFactors affecting complexity

Implementation Reference

  • The handler function for 'estimate_complexity' tool. It receives task description and optional factors, generates a structured Markdown report estimating effort breakdown, total hours (optimistic/realistic/pessimistic), complexity score, risks, and recommendations.
    export function estimateComplexityHandler(args: any) {
        const { task, factors = [] } = args;
    
        const estimate = `# Complexity Estimate: ${task}
    
    ## Complexity Factors
    ${factors.length > 0 ? factors.map((f: string) => `- ${f}`).join("\n") : "Standard complexity assumed"}
    
    ---
    
    ## Effort Breakdown
    
    | Component | Effort | Risk |
    |-----------|--------|------|
    | Research/Design | 1-2 hours | Low |
    | Core Implementation | 2-4 hours | Medium |
    | Testing | 1-2 hours | Low |
    | Edge Cases | 1-2 hours | Medium |
    | Documentation | 0.5-1 hour | Low |
    | Review/Refinement | 1 hour | Low |
    
    ## Total Estimate
    - **Optimistic**: 6-8 hours
    - **Realistic**: 8-12 hours
    - **Pessimistic**: 12-16 hours
    
    ## Complexity Score
    **Medium** (3/5)
    
    ## Risk Factors
    - [ ] Unknown dependencies
    - [ ] Integration complexity
    - [ ] Performance requirements
    - [ ] Security considerations
    
    ## Recommendations
    - Break into smaller tasks if estimate > 8 hours
    - Add buffer for unknowns (20-30%)
    - Identify blockers early
    `;
    
        return { content: [{ type: "text", text: estimate }] };
    }
  • The input schema definition using Zod for validating the tool's parameters: required 'task' string and optional 'factors' array.
    export const estimateComplexitySchema = {
        name: "estimate_complexity",
        description: "Estimates the complexity and effort required for a task or feature.",
        inputSchema: z.object({
            task: z.string().describe("The task to estimate"),
            factors: z.array(z.string()).optional().describe("Factors affecting complexity")
        })
    };
  • src/index.ts:85-85 (registration)
    Registration of the 'estimate_complexity' tool in the main toolRegistry Map used by the stdio MCP server.
    ["estimate_complexity", { schema: estimateComplexitySchema, handler: estimateComplexityHandler }],
  • src/server.ts:95-95 (registration)
    Registration of the 'estimate_complexity' tool in the toolRegistry Map used by the HTTP MCP server.
    ["estimate_complexity", { schema: estimateComplexitySchema, handler: estimateComplexityHandler }],
  • src/index.ts:33-43 (registration)
    Import statement that brings in the estimateComplexitySchema and estimateComplexityHandler from cognitive.ts for use in tool registration.
    import {
        planTaskSchema, planTaskHandler,
        reflectOnCodeSchema, reflectOnCodeHandler,
        analyzeArchitectureSchema, analyzeArchitectureHandler,
        debugProblemSchema, debugProblemHandler,
        brainstormSolutionsSchema, brainstormSolutionsHandler,
        compareApproachesSchema, compareApproachesHandler,
        estimateComplexitySchema, estimateComplexityHandler,
        generateTestsSchema, generateTestsHandler,
        explainCodeSchema, explainCodeHandler
    } from "./tools/cognitive.js";
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It mentions estimation but doesn't describe what the estimation produces (e.g., numerical score, time estimate, complexity level), how accurate or reliable it is, whether it uses historical data, or any limitations. This leaves significant gaps for an agent to understand the tool's behavior.

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 extremely concise at just one sentence with no wasted words. It's front-loaded with the core purpose and efficiently communicates the essential function. Every word earns its place in this minimal description.

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 complexity of estimation tasks and the lack of both annotations and output schema, the description is insufficiently complete. It doesn't explain what the estimation output looks like (e.g., numerical score, time range, complexity rating), the methodology used, or any constraints on input. For a tool with no structured output documentation, this creates significant uncertainty for an agent.

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?

The schema description coverage is 100%, providing clear documentation for both parameters. The description adds no additional parameter semantics beyond what's in the schema, so it meets the baseline of 3. It doesn't explain how 'factors' influence the estimation or provide examples of typical factor values.

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 with a specific verb ('Estimates') and target ('complexity and effort required for a task or feature'), making it immediately understandable. However, it doesn't distinguish itself from potential sibling tools like 'plan_task' or 'analyze_architecture', which might have overlapping estimation functions.

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. With many sibling tools like 'plan_task', 'analyze_architecture', and 'track_project' that might involve estimation aspects, there's no indication of this tool's specific niche or when it's preferred over other options.

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