Skip to main content
Glama

analyze_task

Analyze task requirements to evaluate technical feasibility, assess risks, and develop high-level solution concepts. Use pseudocode to outline key steps and logic flow without providing complete code.

Instructions

Deeply analyze task requirements and systematically check the codebase, evaluate technical feasibility and potential risks. If code is needed, use pseudocode format providing only high-level logic flow and key steps, avoiding complete code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
initialConceptYesAt least 50 characters of initial solution concept, including technical solution, architectural design and implementation strategy, if code is needed use pseudocode format and only provide high-level logic flow and key steps avoiding complete code
previousAnalysisNoAnalysis results from previous iterations, used for continuous improvement of solutions (only required for reanalysis)
summaryYesStructured task summary including task objectives, scope and key technical challenges, minimum 10 characters

Implementation Reference

  • Core handler function for the "analyze_task" tool. It receives input parameters, calls the prompt generator getAnalyzeTaskPrompt, and returns the generated prompt as standardized tool content.
    export async function analyzeTask({
      summary,
      initialConcept,
      previousAnalysis,
    }: z.infer<typeof analyzeTaskSchema>) {
      // Use prompt generator to get the final prompt
      const prompt = getAnalyzeTaskPrompt({
        summary,
        initialConcept,
        previousAnalysis,
      });
    
      return {
        content: [
          {
            type: "text" as const,
            text: prompt,
          },
        ],
      };
    }
  • Zod schema defining the input validation for the analyze_task tool, including summary, initialConcept (with min lengths), and optional previousAnalysis.
    export const analyzeTaskSchema = z.object({
      summary: z
        .string()
        .min(10, {
          message: "Task summary cannot be less than 10 characters, please provide a more detailed description to ensure clear task objectives",
        })
        .describe(
          "Structured task summary including task objectives, scope and key technical challenges, minimum 10 characters"
        ),
      initialConcept: z
        .string()
        .min(50, {
          message:
            "Initial solution concept cannot be less than 50 characters, please provide more detailed content to ensure the technical solution is clear",
        })
        .describe(
          "At least 50 characters of initial solution concept, including technical solution, architectural design and implementation strategy, if code is needed use pseudocode format and only provide high-level logic flow and key steps avoiding complete code"
        ),
      previousAnalysis: z
        .string()
        .optional()
        .describe("Analysis results from previous iterations, used for continuous improvement of solutions (only required for reanalysis)"),
    });
  • src/index.ts:235-240 (registration)
    Registration of the analyze_task tool in the ListToolsRequest handler, specifying name, description loaded from MD template, and input schema converted to JSON schema.
      name: "analyze_task",
      description: loadPromptFromTemplate(
        "toolsDescription/analyzeTask.md"
      ),
      inputSchema: zodToJsonSchema(analyzeTaskSchema),
    },
  • src/index.ts:396-406 (registration)
    Dispatch logic in the CallToolRequest handler: parses arguments using analyzeTaskSchema, validates, and invokes the analyzeTask handler function.
    case "analyze_task":
      parsedArgs = await analyzeTaskSchema.safeParseAsync(
        request.params.arguments
      );
      if (!parsedArgs.success) {
        throw new Error(
          `Invalid arguments for tool ${request.params.name}: ${parsedArgs.error.message}`
        );
      }
      result = await analyzeTask(parsedArgs.data);
      return result;
  • Supporting helper function that generates the task analysis prompt by loading and interpolating templates (index.md and optional iteration.md), and applying custom overrides.
    export function getAnalyzeTaskPrompt(params: AnalyzeTaskPromptParams): string {
      const indexTemplate = loadPromptFromTemplate("analyzeTask/index.md");
    
      const iterationTemplate = loadPromptFromTemplate("analyzeTask/iteration.md");
    
      let iterationPrompt = "";
      if (params.previousAnalysis) {
        iterationPrompt = generatePrompt(iterationTemplate, {
          previousAnalysis: params.previousAnalysis,
        });
      }
    
      let prompt = generatePrompt(indexTemplate, {
        summary: params.summary,
        initialConcept: params.initialConcept,
        iterationPrompt: iterationPrompt,
      });
    
      // Load possible custom prompt
      return loadPrompt(prompt, "ANALYZE_TASK");
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions that analysis includes checking the codebase and evaluating feasibility/risks, but doesn't describe what the tool actually does operationally - does it run code analysis, perform static checks, generate reports, or something else? It also doesn't disclose whether this is a read-only operation, what permissions might be needed, or what format the analysis results take. The pseudocode guidance is procedural rather than behavioral transparency.

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

Conciseness4/5

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

The description is reasonably concise at two sentences, with the first sentence stating the core purpose and the second providing important procedural guidance about pseudocode format. However, the first sentence is somewhat wordy ('Deeply analyze... systematically check... evaluate...') and could be more focused. The structure is front-loaded with the main purpose.

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?

For a tool with 3 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what the analysis produces, how results are returned, or what format they take. While it mentions evaluating technical feasibility and risks, it doesn't describe how this evaluation manifests operationally. The procedural pseudocode guidance is helpful but doesn't compensate for the missing behavioral and output context.

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?

With 100% schema description coverage, the baseline is 3 even without parameter information in the description. The description doesn't mention any parameters or provide additional context about what 'initialConcept', 'previousAnalysis', or 'summary' should contain beyond what's already in the schema descriptions. It maintains the baseline but doesn't add value beyond the structured schema.

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

Purpose3/5

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

The description states the tool 'Deeply analyze task requirements and systematically check the codebase, evaluate technical feasibility and potential risks', which provides a general purpose. However, it's somewhat vague about what 'analyze' entails compared to sibling tools like 'plan_task', 'verify_task', or 'reflect_task', and doesn't clearly distinguish itself from these alternatives. The description includes procedural guidance about pseudocode, but this doesn't clarify the core purpose.

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 explicit guidance on when to use this tool versus alternatives like 'plan_task', 'verify_task', or 'reflect_task'. It mentions 'If code is needed, use pseudocode format', but this is a procedural constraint rather than usage context. There's no indication of prerequisites, when this analysis should occur in a workflow, or what makes it different from other analysis-related tools.

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

Related 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/liorfranko/mcp-chain-of-thought'

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