Structure cognitive analysis using sequential reasoning chains. Use for codebase analysis, pattern extraction, complex problem decomposition, and building mental models before implementation.
# Check if session already loaded (server auto-loads last session on startup)
mcporter call sequential-thinking.analyze_session()
# If no active session, start one
mcporter call sequential-thinking.start_session(
problem: "What fundamental questions must I answer?",
success_criteria: "Clear understanding of core questions",
session_type: "general"
)
Phase 2: Structured Discovery
# Add initial thought — returns thought_id needed for branching
mcporter call sequential-thinking.add_thought(
content: "FIRST PRINCIPLE: What is this fundamentally?",
confidence: 0.9
)
# → save the returned thought_id
# Fork into parallel reasoning tracks
mcporter call sequential-thinking.create_branch(
name: "conceptual-analysis",
from_thought: "<thought_id from above>",
purpose: "Understand concepts separate from implementation"
)
# → save the returned branch_id
mcporter call sequential-thinking.add_thought(
content: "Pattern criteria: Generic, clear interfaces, domain-independent",
branch_id: "<branch_id from above>"
)
mcporter call sequential-thinking.query_memories(
tags: "domain-specific,architectural-patterns",
content_contains: "core-concept"
)
mcporter call sequential-thinking.store_memory(
content: "Brief description of the pattern",
code_snippet: "pure code without comments",
language: "python",
tags: "pattern,category"
)
Full mcporter call reference
start_session
mcporter call sequential-thinking.start_session(
problem: "what to solve",
success_criteria: "how to know it is done",
session_type: "general" # or "coding" — triggers explore_packages automatically
)
Returns: session_id
add_thought
mcporter call sequential-thinking.add_thought(
content: "reasoning step",
branch_id: "<id>", # optional — omit for main thread
confidence: 0.8 # optional
)
Returns: thought_id — save this when you need to branch from it
create_branch
mcporter call sequential-thinking.create_branch(
name: "branch-name",
from_thought: "<thought_id>", # required — must be non-empty string
purpose: "why this branch exists"
)
Returns: branch_id
merge_branch
mcporter call sequential-thinking.merge_branch(
branch_id: "<branch_id>",
target_thought: "" # optional — leave empty to merge into latest
)
mcporter call sequential-thinking.query_memories(
tags: "tag1,tag2", # OR search; use & for AND: "tag1&tag2"
content_contains: "/regex/" # optional — wrap in // for regex
)
Returns: memories[], count, search_tips when empty
record_decision
mcporter call sequential-thinking.record_decision(
decision_title: "What we decided",
context: "why this decision was needed",
options_considered: "option A vs option B",
chosen_option: "option A",
rationale: "because...",
consequences: "this means..."
)
Returns: decision_id
explore_packages
mcporter call sequential-thinking.explore_packages(
task_description: "what I am trying to do",
language: "python" # optional, default python
)
Returns: packages[], count
export_session
mcporter call sequential-thinking.export_session(
filename: "output.md",
format: "markdown", # or "json"
export_type: "session" # or "memories"
)