analyze_problem
Break down complex problems into structured steps to analyze and approach solutions effectively.
Instructions
analyze this|how to approach|break this down|problem analysis|examine|investigate - Break down complex problem into structured steps
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| problem | Yes | Problem to analyze | |
| domain | No | Problem domain |
Implementation Reference
- The main execution function for the 'analyze_problem' tool. It takes a problem description and optional domain, then returns a structured analysis with breakdown steps, considerations, and next steps.export async function analyzeProblem(args: { problem: string; domain?: string }): Promise<ToolResult> { const { problem, domain = 'general' } = args; const problemAnalysis = { action: 'analyze_problem', problem, domain, analysis: { breakdown: [ 'Define the problem clearly', 'Identify key constraints and requirements', 'Break down into smaller sub-problems', 'Determine solution approach', 'Plan implementation steps' ], considerations: [ 'What are the inputs and expected outputs?', 'Are there any edge cases to consider?', 'What are the performance requirements?', 'How will this integrate with existing systems?' ], nextSteps: [ 'Research existing solutions', 'Create detailed implementation plan', 'Identify potential risks and mitigation strategies', 'Define success criteria' ] }, status: 'success' }; return { content: [{ type: 'text', text: `Problem: ${problem}\nDomain: ${domain}\n\nBreakdown:\n${problemAnalysis.analysis.breakdown.map((b, i) => `${i+1}. ${b}`).join('\n')}\n\nConsiderations:\n${problemAnalysis.analysis.considerations.map(c => `- ${c}`).join('\n')}\n\nNext Steps:\n${problemAnalysis.analysis.nextSteps.map(n => `- ${n}`).join('\n')}` }] }; }
- The ToolDefinition object defining the tool's name, description, input schema, and annotations.export const analyzeProblemDefinition: ToolDefinition = { name: 'analyze_problem', description: 'analyze this|how to approach|break this down|problem analysis|examine|investigate - Break down complex problem into structured steps', inputSchema: { type: 'object', properties: { problem: { type: 'string', description: 'Problem to analyze' }, domain: { type: 'string', description: 'Problem domain' } }, required: ['problem'] }, annotations: { title: 'Analyze Problem', audience: ['user', 'assistant'] } };
- src/index.ts:114-114 (registration)Registration of the tool definition in the central tools array used for listing tools.analyzeProblemDefinition,
- src/index.ts:618-619 (registration)Dispatch case in the central tool execution switch statement that invokes the analyzeProblem handler.case 'analyze_problem': return await analyzeProblem(args as any) as CallToolResult;
- src/index.ts:79-79 (registration)Import statement bringing in the handler function and definition from the implementation file.import { analyzeProblem, analyzeProblemDefinition } from './tools/thinking/analyzeProblem.js';