Skip to main content
Glama
olaservo

Shannon Thinking MCP Server

shannonthinking

Break down complex problems using Claude Shannon's systematic methodology of problem definition, modeling, validation, and implementation.

Instructions

A problem-solving tool inspired by Claude Shannon's systematic and iterative approach to complex problems.

This tool helps break down problems using Shannon's methodology of problem definition, mathematical modeling, validation, and practical implementation.

When to use this tool:

  • Complex system analysis

  • Information processing problems

  • Engineering design challenges

  • Problems requiring theoretical frameworks

  • Optimization problems

  • Systems requiring practical implementation

  • Problems that need iterative refinement

  • Cases where experimental validation complements theory

Key features:

  • Systematic progression through problem definition → constraints → modeling → validation → implementation

  • Support for revising earlier steps as understanding evolves

  • Ability to mark steps for re-examination with new information

  • Experimental validation alongside formal proofs

  • Explicit tracking of assumptions and dependencies

  • Confidence levels for each step

  • Rich feedback and validation results

Parameters explained:

  • thoughtType: Type of thinking step (PROBLEM_DEFINITION, CONSTRAINTS, MODEL, PROOF, IMPLEMENTATION)

  • uncertainty: Confidence level in the current thought (0-1)

  • dependencies: Which previous thoughts this builds upon

  • assumptions: Explicit listing of assumptions made

  • isRevision: Whether this revises an earlier thought

  • revisesThought: Which thought is being revised

  • recheckStep: For marking steps that need re-examination

  • proofElements: For formal validation steps

  • experimentalElements: For empirical validation

  • implementationNotes: For practical application steps

The tool supports an iterative approach:

  1. Define the problem's fundamental elements (revisable as understanding grows)

  2. Identify system constraints and limitations (can be rechecked with new information)

  3. Develop mathematical/theoretical models

  4. Validate through proofs and/or experimental testing

  5. Design and test practical implementations

Each thought can build on, revise, or re-examine previous steps, creating a flexible yet rigorous problem-solving framework.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thoughtYesYour current thinking step
thoughtTypeYesType of thinking step
thoughtNumberYesCurrent thought number
totalThoughtsYesEstimated total thoughts needed
uncertaintyYesConfidence level (0-1)
dependenciesYesThought numbers this builds upon
assumptionsYesExplicit list of assumptions
nextThoughtNeededYesWhether another thought step is needed
isRevisionNoWhether this thought revises an earlier one
revisesThoughtNoThe thought number being revised
recheckStepNoFor marking steps that need re-examination
proofElementsNoElements required for formal proof steps
experimentalElementsNoElements for experimental validation
implementationNotesNoNotes for practical implementation steps

Implementation Reference

  • The processThought method implements the core tool logic: validates input using validateThoughtData, checks dependencies and revisions against history, appends to thought history, formats for console, and returns JSON response with thought metadata or detailed error.
    public processThought(input: unknown): { content: Array<{ type: string; text: string }>; isError?: boolean } { try { const validatedInput = this.validateThoughtData(input); if (validatedInput.thoughtNumber > validatedInput.totalThoughts) { validatedInput.totalThoughts = validatedInput.thoughtNumber; } // Validate dependencies and revisions for (const depNumber of validatedInput.dependencies) { if (depNumber >= validatedInput.thoughtNumber) { throw new Error(`Invalid dependency: cannot depend on future thought ${depNumber}`); } if (!this.thoughtHistory.some(t => t.thoughtNumber === depNumber)) { throw new Error(`Invalid dependency: thought ${depNumber} does not exist`); } } // Validate revision target if (validatedInput.isRevision && validatedInput.revisesThought !== undefined) { if (validatedInput.revisesThought >= validatedInput.thoughtNumber) { throw new Error(`Invalid revision: cannot revise future thought ${validatedInput.revisesThought}`); } if (!this.thoughtHistory.some(t => t.thoughtNumber === validatedInput.revisesThought)) { throw new Error(`Invalid revision: thought ${validatedInput.revisesThought} does not exist`); } } this.thoughtHistory.push(validatedInput); const formattedThought = this.formatThought(validatedInput); console.error(formattedThought); return { content: [{ type: "text", text: JSON.stringify({ thoughtNumber: validatedInput.thoughtNumber, totalThoughts: validatedInput.totalThoughts, nextThoughtNeeded: validatedInput.nextThoughtNeeded, thoughtType: validatedInput.thoughtType, uncertainty: validatedInput.uncertainty, thoughtHistoryLength: this.thoughtHistory.length, isRevision: validatedInput.isRevision, revisesThought: validatedInput.revisesThought, hasExperimentalValidation: !!validatedInput.experimentalElements, hasRecheckStep: !!validatedInput.recheckStep }, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: JSON.stringify({ error: error instanceof Error ? error.message : String(error), details: { receivedInput: JSON.stringify(input, null, 2), thoughtHistoryLength: this.thoughtHistory.length, lastValidThought: this.thoughtHistory.length > 0 ? this.thoughtHistory[this.thoughtHistory.length - 1].thoughtNumber : null }, status: 'failed' }, null, 2) }], isError: true }; } }
  • Detailed JSON Schema for the shannonthinking tool input, defining all parameters with types, enums, ranges, descriptions, and required fields for validation.
    inputSchema: { type: "object", properties: { thought: { type: "string", description: "Your current thinking step" }, thoughtType: { type: "string", enum: Object.values(ThoughtType), description: "Type of thinking step" }, thoughtNumber: { type: "integer", description: "Current thought number", minimum: 1 }, totalThoughts: { type: "integer", description: "Estimated total thoughts needed", minimum: 1 }, uncertainty: { type: "number", description: "Confidence level (0-1)", minimum: 0, maximum: 1 }, dependencies: { type: "array", items: { type: "integer", minimum: 1 }, description: "Thought numbers this builds upon" }, assumptions: { type: "array", items: { type: "string" }, description: "Explicit list of assumptions" }, nextThoughtNeeded: { type: "boolean", description: "Whether another thought step is needed" }, isRevision: { type: "boolean", description: "Whether this thought revises an earlier one" }, revisesThought: { type: "integer", description: "The thought number being revised", minimum: 1 }, recheckStep: { type: "object", properties: { stepToRecheck: { type: "string", enum: Object.values(ThoughtType), description: "Which type of step needs re-examination" }, reason: { type: "string", description: "Why the step needs to be rechecked" }, newInformation: { type: "string", description: "New information prompting the recheck" } }, required: ["stepToRecheck", "reason"], description: "For marking steps that need re-examination" }, proofElements: { type: "object", properties: { hypothesis: { type: "string", description: "The hypothesis being tested" }, validation: { type: "string", description: "How the hypothesis was validated" } }, required: ["hypothesis", "validation"], description: "Elements required for formal proof steps" }, experimentalElements: { type: "object", properties: { testDescription: { type: "string", description: "Description of the experimental test" }, results: { type: "string", description: "Results of the experiment" }, confidence: { type: "number", description: "Confidence in the experimental results (0-1)", minimum: 0, maximum: 1 }, limitations: { type: "array", items: { type: "string" }, description: "Limitations of the experimental validation" } }, required: ["testDescription", "results", "confidence", "limitations"], description: "Elements for experimental validation" }, implementationNotes: { type: "object", properties: { practicalConstraints: { type: "array", items: { type: "string" }, description: "List of practical limitations and constraints" }, proposedSolution: { type: "string", description: "Detailed implementation proposal" } }, required: ["practicalConstraints", "proposedSolution"], description: "Notes for practical implementation steps" } }, required: ["thought", "thoughtType", "thoughtNumber", "totalThoughts", "uncertainty", "dependencies", "assumptions", "nextThoughtNeeded"] }
  • src/index.ts:221-223 (registration)
    Registers the list tools handler to advertise the 'shannonthinking' tool.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [SHANNON_THINKING_TOOL], }));
  • src/index.ts:225-237 (registration)
    Registers the call tool handler that routes 'shannonthinking' calls to the ShannonThinkingServer instance's processThought method.
    server.setRequestHandler(CallToolRequestSchema, async (request) => { if (request.params.name === "shannonthinking") { return thinkingServer.processThought(request.params.arguments); } return { content: [{ type: "text", text: `Unknown tool: ${request.params.name}` }], isError: true }; });
  • TypeScript definitions for ThoughtType enum and ShannonThoughtData interface, used for type safety and validation in the tool implementation.
    export enum ThoughtType { PROBLEM_DEFINITION = 'problem_definition', CONSTRAINTS = 'constraints', MODEL = 'model', PROOF = 'proof', IMPLEMENTATION = 'implementation' } export interface ShannonThoughtData { thought: string; thoughtType: ThoughtType; thoughtNumber: number; totalThoughts: number; uncertainty: number; // 0-1 dependencies: number[]; // thought numbers this builds on assumptions: string[]; // explicit list of assumptions nextThoughtNeeded: boolean; recheckStep?: { stepToRecheck: ThoughtType; reason: string; newInformation?: string; }; proofElements?: { hypothesis: string; validation: string; }; experimentalElements?: { testDescription: string; results: string; confidence: number; // 0-1 limitations: string[]; }; implementationNotes?: { practicalConstraints: string[]; proposedSolution: string; }; isRevision?: boolean; revisesThought?: number; }

Other 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/olaservo/shannon-thinking'

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