step_by_step_analysis
Perform detailed step-by-step analysis of complex tasks by breaking them down into manageable components for systematic problem-solving.
Instructions
step by step|one at a time|gradually|step by step|one by one|gradually - Perform detailed step-by-step analysis
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | Task to analyze step by step | |
| context | No | Additional context for the task | |
| detailLevel | No | Level of detail |
Implementation Reference
- The main execution function for the 'step_by_step_analysis' tool. It generates a detailed step-by-step breakdown with actions, checkpoints, time estimates, and summary based on the input task, optional context, and detail level.export async function stepByStepAnalysis(args: { task: string; context?: string; detailLevel?: string }): Promise<ToolResult> { const { task, context = '', detailLevel = 'detailed' } = args; const stepCount = detailLevel === 'basic' ? 3 : detailLevel === 'detailed' ? 5 : 7; const stepAnalysis = { action: 'step_by_step_analysis', task, context, detailLevel, steps: Array.from({ length: stepCount }, (_, i) => { const stepNum = i + 1; return { stepNumber: stepNum, title: `Step ${stepNum}: ${task} - Phase ${stepNum}`, description: `Detailed analysis of ${task} in step ${stepNum}`, actions: [ `Analyze requirements for step ${stepNum}`, `Identify dependencies and prerequisites`, `Execute the planned actions`, `Validate results and check for issues`, `Prepare for next step` ], checkpoints: [ `Verify step ${stepNum} requirements are met`, `Confirm outputs are as expected`, `Check for any blocking issues` ], estimatedTime: detailLevel === 'comprehensive' ? `${stepNum * 10} minutes` : `${stepNum * 5} minutes` }; }), summary: { totalSteps: stepCount, estimatedTotalTime: detailLevel === 'comprehensive' ? `${stepCount * 35} minutes` : `${stepCount * 20} minutes`, complexity: detailLevel === 'basic' ? 'low' : detailLevel === 'detailed' ? 'medium' : 'high' }, status: 'success' }; return { content: [{ type: 'text', text: `Task: ${task}\nDetail: ${detailLevel}\nSteps: ${stepCount}\n\n${stepAnalysis.steps.map(s => `Step ${s.stepNumber}: ${s.title}\n Time: ${s.estimatedTime}\n Actions: ${s.actions.join(', ')}\n Checkpoints: ${s.checkpoints.join(', ')}`).join('\n\n')}\n\nTotal Time: ${stepAnalysis.summary.estimatedTotalTime} | Complexity: ${stepAnalysis.summary.complexity}` }] }; }
- The ToolDefinition export that specifies the tool's name, description, input schema (with task required, optional context and detailLevel), and annotations for the MCP protocol.export const stepByStepAnalysisDefinition: ToolDefinition = { name: 'step_by_step_analysis', description: 'step by step|one at a time|gradually|step by step|one by one|gradually - Perform detailed step-by-step analysis', inputSchema: { type: 'object', properties: { task: { type: 'string', description: 'Task to analyze step by step' }, context: { type: 'string', description: 'Additional context for the task' }, detailLevel: { type: 'string', description: 'Level of detail', enum: ['basic', 'detailed', 'comprehensive'] } }, required: ['task'] }, annotations: { title: 'Step-by-Step Analysis', audience: ['user', 'assistant'] } };
- src/index.ts:620-621 (registration)Registration in the executeToolCall switch statement that maps the tool name to its handler function for execution.case 'step_by_step_analysis': return await stepByStepAnalysis(args as any) as CallToolResult;
- src/index.ts:115-115 (registration)Inclusion of the tool definition in the global 'tools' array, enabling it for MCP ListTools requests and discovery.stepByStepAnalysisDefinition,
- src/index.ts:83-83 (registration)Import statement that brings the handler and definition into the main index file for registration.import { stepByStepAnalysis, stepByStepAnalysisDefinition } from './tools/thinking/stepByStepAnalysis.js';