Skip to main content
Glama
stagsz

Unconventional-thinking MCP server

branch_thought

Generate alternative perspectives by branching existing thoughts in specified directions to explore unconventional solutions.

Instructions

Create a new branch of thinking from an existing thought. Returns only metadata, not full content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thoughtIdYesID of the thought to branch from
directionYesDirection for the new branch (e.g. 'more_extreme', 'opposite', 'tangential')

Implementation Reference

  • Main execution logic for the branch_thought tool: validates input, generates new branched thought using helper, persists it, returns metadata URI.
    case "branch_thought": { const { thoughtId, direction } = request.params.arguments as any; const thoughts = loadThoughts(); const sourceThought = thoughts[thoughtId]; if (!sourceThought) { throw new McpError(ErrorCode.InvalidParams, "Source thought not found"); } const newBranchId = `branch_${++branchCounter}`; const newThoughtId = `thought_${Date.now()}`; const thought: Thought = { id: newThoughtId, content: generateBranchedThought(sourceThought, direction), isRebellion: direction === 'opposite', challengesAssumption: true, branchFromThought: thoughtId, branchId: newBranchId, timestamp: Date.now() }; thoughts[newThoughtId] = thought; saveThoughts(thoughts); // Return only metadata - the full thought content stays in the resource return { content: [{ type: "text", text: JSON.stringify({ thoughtId: newThoughtId, resourceUri: `thought://${newThoughtId}`, branchInfo: `New branch ${newBranchId} from thought ${thoughtId}`, direction, message: "New thought branch created. Use resource URI to access full content." }, null, 2) }] }; }
  • Input schema definition for branch_thought tool specifying thoughtId and direction parameters.
    inputSchema: { type: "object", properties: { thoughtId: { type: "string", description: "ID of the thought to branch from" }, direction: { type: "string", description: "Direction for the new branch (e.g. 'more_extreme', 'opposite', 'tangential')" } }, required: ["thoughtId", "direction"] }
  • src/index.ts:83-100 (registration)
    Tool registration in ListTools response, including name, description, and schema.
    { name: "branch_thought", description: "Create a new branch of thinking from an existing thought. Returns only metadata, not full content.", inputSchema: { type: "object", properties: { thoughtId: { type: "string", description: "ID of the thought to branch from" }, direction: { type: "string", description: "Direction for the new branch (e.g. 'more_extreme', 'opposite', 'tangential')" } }, required: ["thoughtId", "direction"] } },
  • Helper function that generates the content for the new branched thought based on direction.
    function generateBranchedThought(sourceThought: Thought, direction: string): string { switch (direction) { case 'more_extreme': return `Taking it further: ${sourceThought.content}\n→ What if we amplify this 1000x? What becomes possible?`; case 'opposite': return `Complete reversal: If the opposite of "${sourceThought.content}" were true, what would that imply?`; case 'tangential': return `Unexpected connection: ${sourceThought.content}\n→ How does this apply to a completely different domain?`; default: return `Building on: ${sourceThought.content}\n→ Taking this in a new direction...`; } }

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/stagsz/Unconventional-thinking'

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