Skip to main content
Glama

Branch Thinking

branch-thinking

Organize and manage complex thoughts and tasks using branching commands. Create, navigate, and analyze branches, extract tasks, link related ideas, and generate insights through semantic search and visualization.

Instructions

Branch-Thinking Tool

Purpose: Use branching commands to create, navigate, and analyze thought branches and tasks.

Usage: Provide a JSON payload with 'type' and relevant parameters in 'args' object. The tool returns an array of items in the format { type: string, text: string }.

Supported Commands:

  • create-branch: { type: 'create-branch', branchId }
  • focus: { type: 'focus', branchId }
  • add-thought: { type: 'add-thought', branchId, content }
  • semantic-search: { type: 'semantic-search', query, topN? }
  • extract-tasks: { type: 'extract-tasks', branchId? }
  • visualize: { type: 'visualize', branchId?, options? }
  • list-branches: { type: 'list-branches' }
  • history: { type: 'history', branchId }
  • insights: { type: 'insights', branchId }
  • crossrefs: { type: 'crossrefs', branchId }
  • hub-thoughts: { type: 'hub-thoughts', branchId }
  • link-thoughts: { type: 'link-thoughts', fromThoughtId, toThoughtId, linkType, reason? }
  • add-snippet: { type: 'add-snippet', content, tags, author? }
  • snippet-search: { type: 'snippet-search', query, topN? }
  • summarize-branch: { type: 'summarize-branch', branchId? }
  • doc-thought: { type: 'doc-thought', thoughtId }
  • review-branch: { type: 'review-branch', branchId? }
  • ask: { type: 'ask', question }
  • summarize-tasks: { type: 'summarize-tasks', branchId? }
  • advance-task: { type: 'advance-task', taskId, status }
  • assign-task: { type: 'assign-task', taskId, assignee }
  • reset-session: { type: 'reset-session' }
  • clear-cache: { type: 'clear-cache' }
  • get-cache-stats: { type: 'get-cache-stats' }

Visualization Options:

  • clustering: { type: 'clustering', algorithm? }
  • centrality: { type: 'centrality', metric? }
  • overlays: { type: 'overlays', features? }
  • analytics: { type: 'analytics', metrics? }

Example Calls and Expected Responses:

// Add a thought { "name": "branch-thinking", "args": { "type": "add-thought", "branchId": "research", "content": "Define MCP best practices" } } // → [{"type":"text","text":"Thought added to branch research."}]
// Get insights { "name": "branch-thinking", "args": { "type": "insights", "branchId": "research" } } // → [{"type":"text","text":"Insights for branch research: ['Best practices cluster around workflow safety and semantic search.', 'Cross-references indicate high reuse of planning patterns.']"}]
// Get cross-references { "name": "branch-thinking", "args": { "type": "crossrefs", "branchId": "research" } } // → [{"type":"text","text":"Cross-references for branch research: [{ from: 't1', to: 't3', type: 'supports', reason: 't1 evidence for t3' }, { from: 't2', to: 't4', type: 'related' }]"}]
// Extract tasks { "name": "branch-thinking", "args": { "type": "extract-tasks", "branchId": "research" } } // → [{"type":"text","text":"Tasks extracted: [{ id: 'task-123', content: 'Document MCP safety rules', status: 'open' }]"}]
// Summarize tasks { "name": "branch-thinking", "args": { "type": "summarize-tasks", "branchId": "research" } } // → [{"type":"text","text":"Task summary: 1 open, 2 in progress, 0 closed."}]
// Advance a task { "name": "branch-thinking", "args": { "type": "advance-task", "taskId": "task-123", "status": "in_progress" } } // → [{"type":"text","text":"Task task-123 status updated to in_progress."}]
// Assign a task { "name": "branch-thinking", "args": { "type": "assign-task", "taskId": "task-123", "assignee": "alice" } } // → [{"type":"text","text":"Task task-123 assigned to alice."}]
// Semantic search { "name": "branch-thinking", "args": { "type": "semantic-search", "query": "workflow planning", "topN": 3 } } // → [{"type":"text","text":"Top 3 semantic matches for 'workflow planning' returned."}]
// Link thoughts { "name": "branch-thinking", "args": { "type": "link-thoughts", "fromThoughtId": "t1", "toThoughtId": "t2", "linkType": "supports" } } // → [{"type":"text","text":"Linked thought t1 to t2 as 'supports'."}]
// Summarize branch { "name": "branch-thinking", "args": { "type": "summarize-branch", "branchId": "research" } } // → [{"type":"text","text":"Summary for branch research: ..."}]
// Review branch { "name": "branch-thinking", "args": { "type": "review-branch", "branchId": "research" } } // → [{"type":"text","text":"Branch research reviewed. 2 suggestions found."}]

Input Schema

NameRequiredDescriptionDefault
branchIdNoBranch ID to associate with the thought(s). If omitted, a new branch may be created or the active branch used.
commandNoOptional: Navigation or workflow command. Used for agentic/AI interactions.
confidenceNoOptional: Confidence score (0-1) for the thought, for ranking or filtering.
contentNoThought content (string) or batch of thoughts (array of objects).
crossRefsNoOptional: Array of cross-references to other branches, with type, reason, and strength.
keyPointsNoOptional: Key points or highlights extracted from the thought.
parentBranchIdNoOptional: ID of the parent branch for hierarchical organization.
relatedInsightsNoOptional: IDs of related insights, for semantic linking.
typeNoThought type: e.g., 'analysis', 'hypothesis', 'observation', 'task', etc. Used for filtering and scoring.

Input Schema (JSON Schema)

{ "anyOf": [ { "required": [ "content", "type" ] }, { "required": [ "command" ] } ], "properties": { "branchId": { "description": "Branch ID to associate with the thought(s). If omitted, a new branch may be created or the active branch used.", "type": "string" }, "command": { "description": "Optional: Navigation or workflow command. Used for agentic/AI interactions.", "properties": { "author": { "description": "Optional: Author or agent for add-snippet command.", "type": "string" }, "autoVisualize": { "description": "Optional: Automatically visualize the branch after creation.", "type": "boolean" }, "branchId": { "description": "Branch ID for commands that operate on a specific branch.", "type": "string" }, "content": { "description": "Content for add-snippet, search, or ask commands.", "type": "string" }, "fromThoughtId": { "description": "Source thought ID for link-thoughts or cross-linking commands.", "type": "string" }, "linkType": { "description": "Type of link for link-thoughts command (e.g., supports, contradicts, related, expands, refines).", "type": "string" }, "parentBranchId": { "description": "Optional: Parent branch ID for hierarchical organization when creating a branch.", "type": "string" }, "query": { "description": "Query string for semantic-search, snippet-search, or other search commands.", "type": "string" }, "question": { "description": "Free-form question for the ask command (AI/LLM query).", "type": "string" }, "reason": { "description": "Optional: Reason or context for linking thoughts.", "type": "string" }, "tags": { "description": "Tags for add-snippet or snippet-search commands.", "items": { "type": "string" }, "type": "array" }, "thoughtId": { "description": "Thought ID for doc-thought, link-thoughts, or review commands.", "type": "string" }, "toThoughtId": { "description": "Target thought ID for link-thoughts or cross-linking commands.", "type": "string" }, "topN": { "description": "Number of top results to return for semantic-search or snippet-search.", "type": "number" }, "type": { "description": "Command type (see tool description for complete list and semantics).", "enum": [ "create-branch", "list", "focus", "history", "insights", "crossrefs", "hub-thoughts", "semantic-search", "link-thoughts", "add-snippet", "snippet-search", "summarize-branch", "doc-thought", "extract-tasks", "review-branch", "visualize", "ask" ], "type": "string" } }, "required": [ "type" ], "type": "object" }, "confidence": { "description": "Optional: Confidence score (0-1) for the thought, for ranking or filtering.", "type": "number" }, "content": { "description": "Thought content (string) or batch of thoughts (array of objects).", "oneOf": [ { "description": "Single thought content as a string.", "type": "string" }, { "description": "Batch mode: array of thought objects, each with content, branchId, and optional metadata.", "items": { "type": "object" }, "type": "array" } ] }, "crossRefs": { "description": "Optional: Array of cross-references to other branches, with type, reason, and strength.", "items": { "properties": { "reason": { "description": "Optional: Reason or context for the cross-reference.", "type": "string" }, "strength": { "description": "Optional: Numeric strength/confidence of the cross-reference (0-1).", "type": "number" }, "toBranch": { "description": "Target branch ID for the cross-reference.", "type": "string" }, "type": { "description": "Type of cross-reference (e.g., 'related', 'supports', 'contradicts', etc.).", "type": "string" } }, "required": [ "toBranch", "type" ], "type": "object" }, "type": "array" }, "keyPoints": { "description": "Optional: Key points or highlights extracted from the thought.", "items": { "type": "string" }, "type": "array" }, "parentBranchId": { "description": "Optional: ID of the parent branch for hierarchical organization.", "type": "string" }, "relatedInsights": { "description": "Optional: IDs of related insights, for semantic linking.", "items": { "type": "string" }, "type": "array" }, "type": { "description": "Thought type: e.g., 'analysis', 'hypothesis', 'observation', 'task', etc. Used for filtering and scoring.", "type": "string" } }, "type": "object" }
Install Server

Other Tools from Branch Thinking

Related Tools

    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/ssdeanx/branch-thinking-mcp'

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