structured-thinking-mcp
Version:
MCP server for structured thinking framework - Step-by-step reasoning and systematic problem-solving for LLMs
132 lines • 11.5 kB
JSON
{
"tool": {
"name": "chain_of_thought",
"description": "4-step SuperGemini Framework thinking with sg command integration and agent persona system.\n\nStep 1: Analyze user intent, files involved, expected outcome.\n\nStep 2: sg Command Selection & TOML Reading (MANDATORY)\nSTRONG preference for sg commands. Skip only in exceptional cases.\n\nSKIP only when ALL conditions met:\n• Response ≤ 2 lines of text\n• No file/code operations\n• No analysis/reasoning required\n• Pure information recall (date, math, greeting)\n• Information already in system-reminder\n\nCOMMAND required when ANY detected:\n• File operations (read/write/edit)\n• Code analysis/generation\n• Multi-step reasoning (≥3 steps)\n• Project/system work\n• Keywords: analyze, implement, fix, create, build, debug, refactor\n\nStep 3: Agent Persona Extraction & Reading\nExtract and read agent personas from TOML commands (.toml files):\n• Extract agents array from selected TOML command: agents = [\"system-architect\", \"security-engineer\", ...]\n• Read individual agent definitions from ~/.gemini/agents/{agents}.md\n• Reference AGENTS.md (system-reminder) for additional context if needed\n• Document tracking: if agents already read this session, refer to system-reminder content\n\nStep 4: Agent Embodiment & Problem Solving Execution\nEmbody extracted agent personas and execute problem solving:\n• Apply specialized knowledge, skills, and problem-solving approaches from {agents}\n• Multi-agent coordination: if multiple {agents}, coordinate their distinct perspectives\n• Execute solution using agent methodologies and SuperGemini Framework principles\n\nAvailable sg commands: analyze, build, cleanup, design, document, estimate, explain, git, implement, improve, index, load, reflect, save, select-tool, test, troubleshoot"
},
"inputSchema": {
"thought": {
"description": "Step 1: Intent, files, outcome | Step 2: sg command & TOML reading | Step 3: Agent extraction & reading | Step 4: Agent embodiment & execution"
},
"nextThoughtNeeded": {
"description": "Whether another thought step is needed"
},
"thoughtNumber": {
"description": "Current step (1: Analysis, 2: sg Command & TOML, 3: Agent Extraction, 4: Agent Embodiment & Execution)"
},
"totalThoughts": {
"description": "Total steps (usually 4)"
},
"commandSelection": {
"description": "Step 2: Select command or skip",
"type": {
"description": "'command' | 'skip' | 'skip_reason'"
},
"command": {
"description": "Selected command"
},
"reason": {
"description": "Skip reason"
}
},
"isRevision": {
"description": "Whether this revises previous thinking"
},
"revisesThought": {
"description": "Which thought is being reconsidered"
},
"branchFromThought": {
"description": "Branching point thought number"
},
"branchId": {
"description": "Branch identifier"
},
"needsMoreThoughts": {
"description": "If more thoughts are needed beyond initial estimate"
}
},
"errors": {
"invalidThought": "Invalid thought: must be a string",
"invalidThoughtNumber": "Invalid thoughtNumber: must be a number",
"invalidTotalThoughts": "Invalid totalThoughts: must be a number",
"invalidNextThoughtNeeded": "Invalid nextThoughtNeeded: must be a boolean",
"commandFieldRequired": "commandSelection type \"command\" requires a \"command\" field",
"reasonFieldRequired": "commandSelection type \"{type}\" requires a \"reason\" field",
"invalidSelectionType": "Invalid commandSelection type: {type}. Must be \"command\", \"skip\", or \"skip_reason\"",
"unexpectedThoughtNumber": "Unexpected thought number: {number}. Expected 1-4 or expansion beyond 4.",
"mandatoryViolation": "Step {step} requires commandSelection.\\n\\nProvide:\\n{\\n \\\"commandSelection\\\": {\\n \\\"type\\\": \\\"command\\\" | \\\"skip\\\" | \\\"skip_reason\\\",\\n \\\"command\\\": \\\"name\\\" (if command),\\n \\\"reason\\\": \\\"explanation\\\" (if skip)\\n }\\n}\\n\\nAvailable sg commands: {commands}\\nTOML Path: {path}\\nAgents Path: ~/.gemini/agents/",
"missingTomlDocument": "No TOML document selected for Step 2.\\n\\nAvailable sg commands (.toml files in ~/.gemini/commands/sg/): {commands}\\n\\nPlease select a command to read its .toml documentation and extract agents array.",
"missingAgents": "No agents found in Step 3.\\n\\nThe selected .toml document should contain an 'agents' array.\\nExample: agents = [\\\"system-architect\\\", \\\"security-engineer\\\"]\\n\\nAvailable agents (.md files in ~/.gemini/agents/): {availableAgents}\\n\\nPlease ensure the TOML file includes agent specifications or select a different command.",
"unknownTool": "Unknown tool: {name}"
},
"messages": {
"autoExecute": "Auto-executing: Reading {command}.toml SuperGemini command documentation and extracting agents",
"skipMessage": "Autonomous skip (Evidence-based validation passed - truly trivial): {reason}",
"systemReminderSkip": "Skip: Information already available in system-reminder context",
"systemReminder": "System reminder: {reason}",
"commandPreference": "SuperGemini Framework Protocol: Defaulting to sg command selection (90% threshold - Quality Gates enforced)",
"skipWarning": "CAUTION: Skip selected - verify all 4 conditions met (≤2 lines, no files, no analysis, pure recall)",
"agentExtracted": "Agents extracted from {command}.toml: {agents}",
"agentEmbodiment": "Embodying agent personas: {agentList} - applying specialized perspectives",
"multiAgentMode": "Multi-agent coordination: {coordination} perspectives working together",
"duplicateAgentRead": "Agent documents already read this session: {agents}\n\nPlease refer to system-reminder content and apply agent perspectives to proceed with problem solving.",
"useSystemReminderAgents": "System-reminder reference: Use already read agent definitions and AGENTS.md content for persona embodiment.",
"agentsReference": "Reference AGENTS.md (system-reminder) for additional agent context if needed",
"documentRead": "Document tracked: {command}.toml read in step {step}",
"skipSelectionDocumentRead": "Skip: Command document already read - no selection required",
"duplicateDocumentRead": "Document already read this session: {command}.toml\n\nPlease refer to system-reminder content and apply that information to proceed with next step analysis.",
"useSystemReminder": "System-reminder reference: Use already read {command}.toml content to continue analysis.",
"documentAttentionRequired": "ATTENTION: {command}.toml guidance must be applied. Demonstrate TOML-based reasoning before proceeding.",
"applyTomlGuidance": "Apply {command}.toml methodology: Extract agents array and embody personas per TOML specifications.",
"tomlBasedReasoning": "TOML Integration: {command}.toml agents → Agent extraction → Persona embodiment → Execution strategy alignment required.",
"serverRunning": "SuperGemini Framework Structured Thinking MCP Server running on stdio",
"fatalError": "Fatal error running SuperGemini Framework server: {error}"
},
"templates": {
"agentEmbodiment": "\n\n**SuperGemini Framework Agent Persona Embodiment**\n\nFrom {command}.toml agents array: {agents}\n\n**Embodying Agent Personas**: {agents}\n**Agent Definitions**: ~/.gemini/agents/{agents}.md (read individually)\n**AGENTS.md Reference**: Available in system-reminder for additional context\n**Multi-Agent Perspectives**: {agents} specialized viewpoints working together\n**Problem-Solving Approach**: Apply each {agents} specialized knowledge, skills, and perspective\n\n*Evidence > assumptions: Embody the {agents} personas with Quality Gates validation.*",
"agentDuplicateReminder": "\n\n**SuperGemini Framework Agent Reminder**\n\nAgent documents already read: {agents}\n\n**System Reminder**: Use previously read agent definitions and AGENTS.md content\n**Persona Embodiment**: Apply the specialized perspectives already available\n**Problem Solving**: Proceed with agent viewpoints from system-reminder context\n\n*SSOT Principle: Apply existing persona knowledge without re-reading - maintain single source of truth.*",
"tomlAnalysis": "\n\n**TOML-Based Cognitive Attention Protocol (SuperGemini Framework)**\n\nYou have just read {command}.toml. Now apply meta-cognitive attention:\n\n**TOML Perspective**: What core instructions does {command}.toml provide?\n**Agent Extraction**: What agents are specified in the TOML agents array?\n**Persona Strategy**: Based on {command}.toml guidance, which agent perspectives should be embodied?\n**Multi-Agent Coordination**: How should multiple agents coordinate their distinct perspectives?\n**Implementation Approach**: What methodology does {command}.toml recommend for this scenario?\n\n*Code > documentation: Apply the TOML's framework with evidence-based execution.*",
"attentionPrompt": "**Meta-Cognitive Attention Required (Quality Gates Active)**: The {command}.toml document you just read contains specific guidance for this task. Before proceeding, explicitly acknowledge how you will apply the TOML's instructions and agent specifications to the user's request. Do not continue without demonstrating TOML-based reasoning aligned with SuperGemini principles."
},
"console": {
"thoughtPrefix": {
"default": "Chain of Thought",
"revision": "Revising",
"branch": "Branching"
},
"thoughtContext": {
"revision": " (revising thought {number})",
"branch": " (from thought {from}, ID: {id})"
}
},
"config": {
"commandPath": "~/.gemini/commands/sg/",
"commandExtension": ".toml",
"agentsPath": "~/.gemini/agents/",
"agentsExtension": ".md",
"availableCommands": ["analyze", "build", "cleanup", "design", "document", "estimate", "explain", "git", "implement", "improve", "index", "load", "reflect", "save", "select-tool", "test", "troubleshoot"],
"availableAgents": ["backend-architect", "devops-architect", "frontend-architect", "learning-guide", "performance-engineer", "python-expert", "quality-engineer", "refactoring-expert", "requirements-analyst", "root-cause-analyst", "security-engineer", "system-architect", "technical-writer"],
"requireSelectionFromStep": 2,
"step3RequiresAgentSelection": true,
"enableAutoRead": true,
"commandPreference": 0.9,
"referenceHintMode": "superclaude",
"agentSystem": {
"enabled": true,
"extractFromToml": true,
"agentEmbodimentStep": 3,
"multiAgentCoordination": true,
"personaProblemSolving": true,
"readIndividualAgents": true,
"referenceAgentsMd": true,
"preventDuplicateAgentReads": true,
"useSystemReminderForAgents": true
},
"documentTracking": {
"enabled": true,
"skipSelectionIfDocumentRead": true,
"preventDuplicateReads": true,
"useSystemReminderForDuplicates": true,
"trackedDocuments": ["analyze", "build", "cleanup", "design", "document", "estimate", "explain", "git", "implement", "improve", "index", "load", "reflect", "save", "select-tool", "test", "troubleshoot"]
}
}
}