tachibot-mcp 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/.env.example +260 -0
  2. package/CHANGELOG.md +54 -0
  3. package/CODE_OF_CONDUCT.md +56 -0
  4. package/CONTRIBUTING.md +54 -0
  5. package/Dockerfile +36 -0
  6. package/LICENSE +644 -0
  7. package/README.md +201 -0
  8. package/SECURITY.md +95 -0
  9. package/dist/personality/komaai-expressions.js +12 -0
  10. package/dist/profiles/balanced.json +33 -0
  11. package/dist/profiles/code_focus.json +33 -0
  12. package/dist/profiles/full.json +33 -0
  13. package/dist/profiles/minimal.json +33 -0
  14. package/dist/profiles/research_power.json +33 -0
  15. package/dist/scripts/build-profiles.js +46 -0
  16. package/dist/src/application/services/focus/FocusModeRegistry.js +46 -0
  17. package/dist/src/application/services/focus/FocusTool.service.js +109 -0
  18. package/dist/src/application/services/focus/ModeRegistry.js +46 -0
  19. package/dist/src/application/services/focus/modes/focus-deep.mode.js +27 -0
  20. package/dist/src/application/services/focus/modes/status.mode.js +50 -0
  21. package/dist/src/application/services/focus/modes/tachibot-status.mode.js +50 -0
  22. package/dist/src/collaborative-orchestrator.js +391 -0
  23. package/dist/src/config/model-constants.js +188 -0
  24. package/dist/src/config/model-defaults.js +57 -0
  25. package/dist/src/config/model-preferences.js +382 -0
  26. package/dist/src/config/timeout-config.js +130 -0
  27. package/dist/src/config.js +173 -0
  28. package/dist/src/domain/interfaces/IFocusMode.js +5 -0
  29. package/dist/src/domain/interfaces/IProvider.js +6 -0
  30. package/dist/src/domain/interfaces/ITool.js +5 -0
  31. package/dist/src/focus-deep.js +245 -0
  32. package/dist/src/infrastructure/ascii/art/robots.ascii.js +16 -0
  33. package/dist/src/mcp-client.js +90 -0
  34. package/dist/src/memory/index.js +17 -0
  35. package/dist/src/memory/memory-config.js +135 -0
  36. package/dist/src/memory/memory-interface.js +174 -0
  37. package/dist/src/memory/memory-manager.js +383 -0
  38. package/dist/src/memory/providers/devlog-provider.js +385 -0
  39. package/dist/src/memory/providers/hybrid-provider.js +399 -0
  40. package/dist/src/memory/providers/local-provider.js +388 -0
  41. package/dist/src/memory/providers/mem0-provider.js +337 -0
  42. package/dist/src/modes/architect.js +477 -0
  43. package/dist/src/modes/auditor.js +362 -0
  44. package/dist/src/modes/challenger.js +841 -0
  45. package/dist/src/modes/code-reviewer.js +382 -0
  46. package/dist/src/modes/commit-guardian.js +424 -0
  47. package/dist/src/modes/documentation-writer.js +572 -0
  48. package/dist/src/modes/scout.js +587 -0
  49. package/dist/src/modes/shared/helpers/challenger-helpers.js +454 -0
  50. package/dist/src/modes/shared/helpers/index.js +17 -0
  51. package/dist/src/modes/shared/helpers/scout-helpers.js +270 -0
  52. package/dist/src/modes/shared/helpers/verifier-helpers.js +332 -0
  53. package/dist/src/modes/test-architect.js +767 -0
  54. package/dist/src/modes/verifier.js +378 -0
  55. package/dist/src/monitoring/performance-monitor.js +435 -0
  56. package/dist/src/optimization/batch-executor.js +121 -0
  57. package/dist/src/optimization/context-pruner.js +196 -0
  58. package/dist/src/optimization/cost-monitor.js +338 -0
  59. package/dist/src/optimization/index.js +65 -0
  60. package/dist/src/optimization/model-router.js +264 -0
  61. package/dist/src/optimization/result-cache.js +114 -0
  62. package/dist/src/optimization/token-optimizer.js +257 -0
  63. package/dist/src/optimization/token-tracker.js +118 -0
  64. package/dist/src/orchestrator-instructions.js +128 -0
  65. package/dist/src/orchestrator-lite.js +139 -0
  66. package/dist/src/orchestrator.js +191 -0
  67. package/dist/src/orchestrators/collaborative/interfaces/IToolExecutionEngine.js +1 -0
  68. package/dist/src/orchestrators/collaborative/interfaces/IToolExecutionStrategy.js +5 -0
  69. package/dist/src/orchestrators/collaborative/interfaces/IVisualizationRenderer.js +1 -0
  70. package/dist/src/orchestrators/collaborative/registries/ModelProviderRegistry.js +95 -0
  71. package/dist/src/orchestrators/collaborative/registries/ToolAdapterRegistry.js +64 -0
  72. package/dist/src/orchestrators/collaborative/services/tool-execution/ToolExecutionService.js +502 -0
  73. package/dist/src/orchestrators/collaborative/services/visualization/VisualizationService.js +206 -0
  74. package/dist/src/orchestrators/collaborative/types/session-types.js +5 -0
  75. package/dist/src/profiles/balanced.js +37 -0
  76. package/dist/src/profiles/code_focus.js +37 -0
  77. package/dist/src/profiles/debug_intensive.js +59 -0
  78. package/dist/src/profiles/full.js +37 -0
  79. package/dist/src/profiles/minimal.js +37 -0
  80. package/dist/src/profiles/research_code.js +59 -0
  81. package/dist/src/profiles/research_power.js +37 -0
  82. package/dist/src/profiles/types.js +5 -0
  83. package/dist/src/profiles/workflow_builder.js +53 -0
  84. package/dist/src/prompt-engineer-lite.js +78 -0
  85. package/dist/src/prompt-engineer.js +399 -0
  86. package/dist/src/reasoning-chain.js +508 -0
  87. package/dist/src/sequential-thinking.js +291 -0
  88. package/dist/src/server-diagnostic.js +74 -0
  89. package/dist/src/server-raw.js +158 -0
  90. package/dist/src/server-simple.js +58 -0
  91. package/dist/src/server.js +514 -0
  92. package/dist/src/session/session-logger.js +617 -0
  93. package/dist/src/session/session-manager.js +571 -0
  94. package/dist/src/session/session-tools.js +400 -0
  95. package/dist/src/tools/advanced-modes.js +200 -0
  96. package/dist/src/tools/claude-integration.js +356 -0
  97. package/dist/src/tools/consolidated/ai-router.js +174 -0
  98. package/dist/src/tools/consolidated/ai-tool.js +48 -0
  99. package/dist/src/tools/consolidated/brainstorm-tool.js +87 -0
  100. package/dist/src/tools/consolidated/environment-detector.js +80 -0
  101. package/dist/src/tools/consolidated/index.js +50 -0
  102. package/dist/src/tools/consolidated/search-tool.js +110 -0
  103. package/dist/src/tools/consolidated/workflow-tool.js +238 -0
  104. package/dist/src/tools/gemini-tools.js +329 -0
  105. package/dist/src/tools/grok-enhanced.js +376 -0
  106. package/dist/src/tools/grok-tools.js +299 -0
  107. package/dist/src/tools/lmstudio-tools.js +223 -0
  108. package/dist/src/tools/openai-tools.js +498 -0
  109. package/dist/src/tools/openrouter-tools.js +317 -0
  110. package/dist/src/tools/optimized-wrapper.js +204 -0
  111. package/dist/src/tools/perplexity-tools.js +294 -0
  112. package/dist/src/tools/pingpong-tool.js +343 -0
  113. package/dist/src/tools/qwen-wrapper.js +74 -0
  114. package/dist/src/tools/tool-router.js +444 -0
  115. package/dist/src/tools/unified-ai-provider.js +260 -0
  116. package/dist/src/tools/workflow-runner.js +425 -0
  117. package/dist/src/tools/workflow-validator-tool.js +107 -0
  118. package/dist/src/types.js +23 -0
  119. package/dist/src/utils/input-validator.js +130 -0
  120. package/dist/src/utils/model-router.js +91 -0
  121. package/dist/src/utils/progress-stream.js +255 -0
  122. package/dist/src/utils/provider-router.js +88 -0
  123. package/dist/src/utils/smart-api-client.js +146 -0
  124. package/dist/src/utils/table-builder.js +218 -0
  125. package/dist/src/utils/timestamp-formatter.js +134 -0
  126. package/dist/src/utils/tool-compressor.js +257 -0
  127. package/dist/src/utils/tool-config.js +201 -0
  128. package/dist/src/validators/dependency-graph-validator.js +147 -0
  129. package/dist/src/validators/interpolation-validator.js +222 -0
  130. package/dist/src/validators/output-usage-validator.js +151 -0
  131. package/dist/src/validators/syntax-validator.js +102 -0
  132. package/dist/src/validators/tool-registry-validator.js +123 -0
  133. package/dist/src/validators/tool-types.js +97 -0
  134. package/dist/src/validators/types.js +8 -0
  135. package/dist/src/validators/workflow-validator.js +134 -0
  136. package/dist/src/visualizer-lite.js +42 -0
  137. package/dist/src/visualizer.js +179 -0
  138. package/dist/src/workflows/circuit-breaker.js +199 -0
  139. package/dist/src/workflows/custom-workflows.js +451 -0
  140. package/dist/src/workflows/engine/AutoSynthesizer.js +97 -0
  141. package/dist/src/workflows/engine/StepParameterResolver.js +74 -0
  142. package/dist/src/workflows/engine/VariableInterpolator.js +123 -0
  143. package/dist/src/workflows/engine/WorkflowDiscovery.js +125 -0
  144. package/dist/src/workflows/engine/WorkflowExecutionEngine.js +485 -0
  145. package/dist/src/workflows/engine/WorkflowExecutor.js +113 -0
  146. package/dist/src/workflows/engine/WorkflowFileManager.js +244 -0
  147. package/dist/src/workflows/engine/WorkflowHelpers.js +114 -0
  148. package/dist/src/workflows/engine/WorkflowOutputFormatter.js +83 -0
  149. package/dist/src/workflows/engine/events/WorkflowEventBus.js +132 -0
  150. package/dist/src/workflows/engine/events/interfaces/IEventBus.js +5 -0
  151. package/dist/src/workflows/engine/handlers/ErrorRecoveryHandler.js +162 -0
  152. package/dist/src/workflows/engine/handlers/PromptEnhancementHandler.js +115 -0
  153. package/dist/src/workflows/engine/handlers/SessionPersistenceHandler.js +167 -0
  154. package/dist/src/workflows/engine/handlers/StepExecutionHandler.js +231 -0
  155. package/dist/src/workflows/engine/handlers/ToolInvocationHandler.js +46 -0
  156. package/dist/src/workflows/engine/interfaces/IAutoSynthesizer.js +5 -0
  157. package/dist/src/workflows/engine/interfaces/IStepParameterResolver.js +5 -0
  158. package/dist/src/workflows/engine/interfaces/IVariableInterpolator.js +5 -0
  159. package/dist/src/workflows/engine/interfaces/IWorkflowDiscovery.js +4 -0
  160. package/dist/src/workflows/engine/interfaces/IWorkflowFileManager.js +5 -0
  161. package/dist/src/workflows/engine/interfaces/IWorkflowOutputFormatter.js +5 -0
  162. package/dist/src/workflows/engine/state/WorkflowStateMachine.js +194 -0
  163. package/dist/src/workflows/engine/state/interfaces/IStateMachine.js +17 -0
  164. package/dist/src/workflows/fallback-strategies.js +373 -0
  165. package/dist/src/workflows/message-queue.js +455 -0
  166. package/dist/src/workflows/model-router.js +189 -0
  167. package/dist/src/workflows/orchestrator-examples.js +174 -0
  168. package/dist/src/workflows/orchestrator-integration.js +200 -0
  169. package/dist/src/workflows/self-healing.js +524 -0
  170. package/dist/src/workflows/tool-mapper.js +407 -0
  171. package/dist/src/workflows/tool-orchestrator.js +796 -0
  172. package/dist/src/workflows/workflow-engine.js +573 -0
  173. package/dist/src/workflows/workflow-parser.js +283 -0
  174. package/dist/src/workflows/workflow-types.js +95 -0
  175. package/dist/src/workflows.js +568 -0
  176. package/dist/test-workflow-file-output.js +93 -0
  177. package/docs/API_KEYS.md +570 -0
  178. package/docs/CLAUDE_CODE_SETUP.md +181 -0
  179. package/docs/CLAUDE_DESKTOP_MANUAL.md +127 -0
  180. package/docs/CONFIGURATION.md +745 -0
  181. package/docs/FOCUS_MODES.md +240 -0
  182. package/docs/INSTALLATION_BOTH.md +145 -0
  183. package/docs/TERMS.md +352 -0
  184. package/docs/TOOLS_REFERENCE.md +1622 -0
  185. package/docs/TOOL_PARAMETERS.md +496 -0
  186. package/docs/TOOL_PROFILES.md +236 -0
  187. package/docs/WORKFLOWS.md +987 -0
  188. package/docs/WORKFLOW_OUTPUT.md +198 -0
  189. package/docs/WORKFLOW_PROGRESS_TRACKING.md +305 -0
  190. package/docs/workflows/design-brainstorm.md +335 -0
  191. package/package.json +97 -0
  192. package/profiles/balanced.json +37 -0
  193. package/profiles/code_focus.json +37 -0
  194. package/profiles/debug_intensive.json +34 -0
  195. package/profiles/full.json +37 -0
  196. package/profiles/minimal.json +37 -0
  197. package/profiles/research_power.json +37 -0
  198. package/profiles/workflow_builder.json +37 -0
  199. package/smithery.yaml +66 -0
  200. package/start.sh +8 -0
  201. package/tools.config.json +81 -0
  202. package/tsconfig.json +18 -0
  203. package/workflows/accessibility-code-audit.yaml +92 -0
  204. package/workflows/code-architecture-review.yaml +202 -0
  205. package/workflows/code-review.yaml +142 -0
  206. package/workflows/core/iterative-problem-solver.yaml +283 -0
  207. package/workflows/creative-brainstorm-yaml.yaml +215 -0
  208. package/workflows/pingpong.yaml +141 -0
  209. package/workflows/system/README.md +412 -0
  210. package/workflows/system/challenger.yaml +175 -0
  211. package/workflows/system/scout.yaml +164 -0
  212. package/workflows/system/verifier.yaml +133 -0
  213. package/workflows/ultra-creative-brainstorm.yaml +318 -0
  214. package/workflows/ux-research-flow.yaml +92 -0
@@ -0,0 +1,1622 @@
1
+ # TachiBot MCP - Complete Tools Reference
2
+
3
+ **Complete parameter schemas, advanced usage, and examples for all 31 tools (32 with competitive mode)**
4
+
5
+ ---
6
+
7
+ ## Table of Contents
8
+
9
+ - [Core Reasoning Tools](#core-reasoning-tools)
10
+ - [think](#think)
11
+ - [focus](#focus)
12
+ - [nextThought](#nextthought)
13
+ - [Perplexity Suite](#perplexity-suite)
14
+ - [perplexity_ask](#perplexity_ask)
15
+ - [perplexity_research](#perplexity_research)
16
+ - [perplexity_reason](#perplexity_reason)
17
+ - [Grok Suite](#grok-suite)
18
+ - [grok_search](#grok_search)
19
+ - [grok_reason](#grok_reason)
20
+ - [grok_code](#grok_code)
21
+ - [grok_debug](#grok_debug)
22
+ - [grok_architect](#grok_architect)
23
+ - [grok_brainstorm](#grok_brainstorm)
24
+ - [OpenAI Suite](#openai-suite)
25
+ - [openai_gpt5_reason](#openai_gpt5_reason)
26
+ - [openai_brainstorm](#openai_brainstorm)
27
+ - [openai_compare](#openai_compare)
28
+ - [openai_code_review](#openai_code_review)
29
+ - [openai_explain](#openai_explain)
30
+ - [Gemini Suite](#gemini-suite)
31
+ - [gemini_brainstorm](#gemini_brainstorm)
32
+ - [gemini_analyze_code](#gemini_analyze_code)
33
+ - [gemini_analyze_text](#gemini_analyze_text)
34
+ - [OpenRouter Suite](#openrouter-suite)
35
+ - [qwen_coder](#qwen_coder)
36
+ - [kimi_thinking](#kimi_thinking)
37
+ - [qwen_competitive](#qwen_competitive) (conditional)
38
+ - [Workflow Tools](#workflow-tools)
39
+ - [workflow](#workflow)
40
+ - [list_workflows](#list_workflows)
41
+ - [create_workflow](#create_workflow)
42
+ - [visualize_workflow](#visualize_workflow)
43
+ - [workflow_start](#workflow_start)
44
+ - [continue_workflow](#continue_workflow)
45
+ - [workflow_status](#workflow_status)
46
+ - [validate_workflow](#validate_workflow)
47
+ - [validate_workflow_file](#validate_workflow_file)
48
+ - [Workflows (YAML-based)](#workflows-yaml-based)
49
+ - Note: verifier, scout, challenger, and pingpong are now YAML workflows, not MCP tools
50
+
51
+ ---
52
+
53
+ ## Core Reasoning Tools
54
+
55
+ ### think
56
+
57
+ Anthropic's official "think" tool for structured reasoning. Provides a dedicated scratchpad for step-by-step problem solving.
58
+
59
+ #### Schema
60
+
61
+ ```typescript
62
+ {
63
+ thought: string; // REQUIRED - Your reasoning step
64
+ }
65
+ ```
66
+
67
+ #### Parameters
68
+
69
+ | Parameter | Type | Required | Default | Description |
70
+ |-----------|------|----------|---------|-------------|
71
+ | `thought` | `string` | ✅ Yes | - | The reasoning thought or analysis step |
72
+
73
+ #### Example Calls
74
+
75
+ **Basic reasoning:**
76
+ ```typescript
77
+ think({
78
+ thought: "Let me break down this problem step by step..."
79
+ })
80
+ ```
81
+
82
+ **Complex analysis:**
83
+ ```typescript
84
+ think({
85
+ thought: `Analyzing the architecture trade-offs:
86
+ 1. Microservices offer scalability but add complexity
87
+ 2. Monolith is simpler but may become bottleneck
88
+ 3. For MVP with 2-person team, monolith makes sense
89
+ 4. Can migrate to microservices later if needed`
90
+ })
91
+ ```
92
+
93
+ #### Best Practices
94
+
95
+ - Use for complex reasoning chains
96
+ - Break down problems into logical steps
97
+ - Explicitly state assumptions
98
+ - Document decision rationale
99
+
100
+ ---
101
+
102
+ ### focus
103
+
104
+ Multi-model collaborative reasoning with 10+ specialized modes. Coordinate different AI models to solve problems together.
105
+
106
+ #### Schema
107
+
108
+ ```typescript
109
+ {
110
+ query: string; // REQUIRED
111
+ mode?: string; // Default: "simple"
112
+ domain?: string;
113
+ models?: string[];
114
+ rounds?: number; // Default: 5
115
+ temperature?: number; // 0-1, Default: 0.7
116
+ maxTokensPerRound?: number; // Default: 2000
117
+ pingPongStyle?: string; // Default: "collaborative"
118
+ tokenEfficient?: boolean; // Default: false
119
+ saveSession?: boolean; // Default: true
120
+ executeNow?: boolean; // Default: true
121
+ context?: string;
122
+ }
123
+ ```
124
+
125
+ #### Parameters
126
+
127
+ | Parameter | Type | Required | Default | Description |
128
+ |-----------|------|----------|---------|-------------|
129
+ | `query` | `string` | ✅ Yes | - | The problem or question to solve |
130
+ | `mode` | `string` | No | `"simple"` | Reasoning mode (see modes below) |
131
+ | `domain` | `string` | No | - | Problem domain (see domains below) |
132
+ | `models` | `string[]` | No | Mode-specific | Custom list of models to use |
133
+ | `rounds` | `number` | No | `5` | Number of reasoning rounds |
134
+ | `temperature` | `number` | No | `0.7` | Temperature for responses (0-1) |
135
+ | `maxTokensPerRound` | `number` | No | `2000` | Max tokens per model per round |
136
+ | `pingPongStyle` | `string` | No | `"collaborative"` | Interaction style |
137
+ | `tokenEfficient` | `boolean` | No | `false` | Enable token optimization |
138
+ | `saveSession` | `boolean` | No | `true` | Save session for later retrieval |
139
+ | `executeNow` | `boolean` | No | `true` | Execute immediately vs queue |
140
+ | `context` | `string` | No | - | Additional context |
141
+
142
+ #### Available Modes
143
+
144
+ | Mode | Description | Best For |
145
+ |------|-------------|----------|
146
+ | `simple` | Basic single-model reasoning | Quick questions |
147
+ | `debug` | Debug-focused analysis | Finding bugs |
148
+ | `deep-reasoning` | Multi-model collaboration with critique | Complex problems |
149
+ | `code-brainstorm` | Technical brainstorming | Coding solutions |
150
+ | `architecture-debate` | Models debate architecture approaches | System design |
151
+ | `brainstorm` | Creative ideation | New ideas |
152
+ | `research` | Deep investigation with evidence | Research projects |
153
+ | `analyze` | Systematic analysis | Data/code analysis |
154
+ | `focus-deep` | Extended deep reasoning | Very complex problems |
155
+ | `status` | Check session status | Monitoring |
156
+
157
+ #### Available Domains
158
+
159
+ | Domain | Focus Area |
160
+ |--------|-----------|
161
+ | `architecture` | System architecture and design |
162
+ | `algorithms` | Algorithm design and optimization |
163
+ | `debugging` | Finding and fixing bugs |
164
+ | `security` | Security analysis and hardening |
165
+ | `performance` | Performance optimization |
166
+ | `api_design` | API design patterns |
167
+ | `database` | Database design and queries |
168
+ | `frontend` | Frontend development |
169
+ | `backend` | Backend development |
170
+ | `devops` | DevOps and infrastructure |
171
+ | `testing` | Testing strategies |
172
+
173
+ #### PingPong Styles
174
+
175
+ | Style | Behavior |
176
+ |-------|----------|
177
+ | `collaborative` | Models build on each other's ideas |
178
+ | `competitive` | Models try to find better solutions |
179
+ | `debate` | Models argue different perspectives |
180
+ | `build-upon` | Each model extends previous thoughts |
181
+
182
+ #### Example Calls
183
+
184
+ **Basic usage:**
185
+ ```typescript
186
+ focus({
187
+ query: "Design a scalable real-time chat system"
188
+ })
189
+ ```
190
+
191
+ **Deep collaborative reasoning:**
192
+ ```typescript
193
+ focus({
194
+ query: "Should we use microservices or monolith?",
195
+ mode: "deep-reasoning",
196
+ domain: "architecture",
197
+ rounds: 8
198
+ })
199
+ ```
200
+
201
+ **Multi-model brainstorming:**
202
+ ```typescript
203
+ focus({
204
+ query: "Revolutionary social media features",
205
+ mode: "brainstorm",
206
+ models: ["grok", "claude-code", "qwen", "openai"],
207
+ rounds: 10,
208
+ temperature: 0.9,
209
+ pingPongStyle: "build-upon"
210
+ })
211
+ ```
212
+
213
+ **Architectural debate:**
214
+ ```typescript
215
+ focus({
216
+ query: "TypeScript vs JavaScript for large codebases",
217
+ mode: "architecture-debate",
218
+ domain: "frontend",
219
+ temperature: 0.8
220
+ })
221
+ ```
222
+
223
+ **Code-focused collaboration:**
224
+ ```typescript
225
+ focus({
226
+ query: "Optimize this database query performance",
227
+ mode: "code-brainstorm",
228
+ domain: "database",
229
+ context: "PostgreSQL with 10M rows, high read volume"
230
+ })
231
+ ```
232
+
233
+ ---
234
+
235
+ ### nextThought
236
+
237
+ Sequential thinking with branching and revision support. Break complex problems into numbered steps.
238
+
239
+ #### Schema
240
+
241
+ ```typescript
242
+ {
243
+ thought: string; // REQUIRED
244
+ nextThoughtNeeded: boolean; // REQUIRED
245
+ thoughtNumber?: number;
246
+ totalThoughts?: number;
247
+ model?: string;
248
+ isRevision?: boolean;
249
+ revisesThought?: number;
250
+ branchFromThought?: number;
251
+ }
252
+ ```
253
+
254
+ #### Parameters
255
+
256
+ | Parameter | Type | Required | Default | Description |
257
+ |-----------|------|----------|---------|-------------|
258
+ | `thought` | `string` | ✅ Yes | - | The current thinking step |
259
+ | `nextThoughtNeeded` | `boolean` | ✅ Yes | - | Whether another thought is needed |
260
+ | `thoughtNumber` | `number` | No | - | Current thought number (1-indexed) |
261
+ | `totalThoughts` | `number` | No | - | Estimated total thoughts needed |
262
+ | `model` | `string` | No | - | Model handling this thought |
263
+ | `isRevision` | `boolean` | No | `false` | Is this revising previous thinking? |
264
+ | `revisesThought` | `number` | No | - | Which thought number is being revised |
265
+ | `branchFromThought` | `number` | No | - | Branch from this thought number |
266
+
267
+ #### Example Calls
268
+
269
+ **Linear thinking sequence:**
270
+ ```typescript
271
+ // Thought 1
272
+ nextThought({
273
+ thought: "First, let's identify the core requirements...",
274
+ thoughtNumber: 1,
275
+ totalThoughts: 5,
276
+ nextThoughtNeeded: true
277
+ })
278
+
279
+ // Thought 2
280
+ nextThought({
281
+ thought: "Now let's consider the technical constraints...",
282
+ thoughtNumber: 2,
283
+ totalThoughts: 5,
284
+ nextThoughtNeeded: true
285
+ })
286
+
287
+ // Final thought
288
+ nextThought({
289
+ thought: "Based on analysis, recommend approach X because...",
290
+ thoughtNumber: 5,
291
+ totalThoughts: 5,
292
+ nextThoughtNeeded: false
293
+ })
294
+ ```
295
+
296
+ **Branching thinking:**
297
+ ```typescript
298
+ nextThought({
299
+ thought: "Let's explore an alternative approach...",
300
+ thoughtNumber: 4,
301
+ branchFromThought: 2, // Branch from thought #2
302
+ nextThoughtNeeded: true
303
+ })
304
+ ```
305
+
306
+ **Revising previous thought:**
307
+ ```typescript
308
+ nextThought({
309
+ thought: "Actually, I need to revise my earlier assumption...",
310
+ isRevision: true,
311
+ revisesThought: 3,
312
+ nextThoughtNeeded: true
313
+ })
314
+ ```
315
+
316
+ ---
317
+
318
+ ## Perplexity Suite
319
+
320
+ ### perplexity_ask
321
+
322
+ Web search with up-to-date information using Perplexity Sonar Pro.
323
+
324
+ #### Schema
325
+
326
+ ```typescript
327
+ {
328
+ query: string; // REQUIRED
329
+ searchDomain?: "general" | "academic" | "news" | "social";
330
+ searchRecency?: "hour" | "day" | "week" | "month" | "year";
331
+ }
332
+ ```
333
+
334
+ #### Parameters
335
+
336
+ | Parameter | Type | Required | Default | Description |
337
+ |-----------|------|----------|---------|-------------|
338
+ | `query` | `string` | ✅ Yes | - | Search query |
339
+ | `searchDomain` | `string` | No | `"general"` | Search domain filter |
340
+ | `searchRecency` | `string` | No | - | Recency filter |
341
+
342
+ #### Search Domains
343
+
344
+ - `general` - General web search
345
+ - `academic` - Academic papers and research
346
+ - `news` - News articles
347
+ - `social` - Social media content
348
+
349
+ #### Search Recency Options
350
+
351
+ - `hour` - Last hour
352
+ - `day` - Last 24 hours
353
+ - `week` - Last 7 days
354
+ - `month` - Last 30 days
355
+ - `year` - Last 365 days
356
+
357
+ #### Example Calls
358
+
359
+ **Basic search:**
360
+ ```typescript
361
+ perplexity_ask({
362
+ query: "latest AI developments"
363
+ })
364
+ ```
365
+
366
+ **Academic search:**
367
+ ```typescript
368
+ perplexity_ask({
369
+ query: "quantum computing error correction",
370
+ searchDomain: "academic"
371
+ })
372
+ ```
373
+
374
+ **Recent news:**
375
+ ```typescript
376
+ perplexity_ask({
377
+ query: "OpenAI announcements",
378
+ searchDomain: "news",
379
+ searchRecency: "week"
380
+ })
381
+ ```
382
+
383
+ **Time-sensitive query:**
384
+ ```typescript
385
+ perplexity_ask({
386
+ query: "stock market trends",
387
+ searchRecency: "day"
388
+ })
389
+ ```
390
+
391
+ ---
392
+
393
+ ### perplexity_research
394
+
395
+ Deep research with multiple queries, evidence gathering, and synthesis.
396
+
397
+ #### Schema
398
+
399
+ ```typescript
400
+ {
401
+ topic: string; // REQUIRED
402
+ questions?: string[]; // Sub-questions to explore
403
+ depth?: "quick" | "standard" | "deep"; // Default: "standard"
404
+ }
405
+ ```
406
+
407
+ #### Parameters
408
+
409
+ | Parameter | Type | Required | Default | Description |
410
+ |-----------|------|----------|---------|-------------|
411
+ | `topic` | `string` | ✅ Yes | - | Research topic |
412
+ | `questions` | `string[]` | No | Auto-generated | Specific sub-questions to investigate |
413
+ | `depth` | `string` | No | `"standard"` | Research depth |
414
+
415
+ #### Depth Levels
416
+
417
+ - `quick` - Fast overview (2-3 queries, ~1min)
418
+ - `standard` - Balanced research (4-6 queries, ~2-3min)
419
+ - `deep` - Comprehensive investigation (8-12 queries, ~5-10min)
420
+
421
+ #### Example Calls
422
+
423
+ **Basic research:**
424
+ ```typescript
425
+ perplexity_research({
426
+ topic: "Latest AI reasoning techniques"
427
+ })
428
+ ```
429
+
430
+ **With specific questions:**
431
+ ```typescript
432
+ perplexity_research({
433
+ topic: "Quantum computing practical applications",
434
+ questions: [
435
+ "What are the current quantum computing use cases?",
436
+ "Which companies are leading quantum computing?",
437
+ "What are the main technical challenges?",
438
+ "When will quantum computers be commercially viable?"
439
+ ],
440
+ depth: "deep"
441
+ })
442
+ ```
443
+
444
+ **Quick overview:**
445
+ ```typescript
446
+ perplexity_research({
447
+ topic: "Rust programming language trends",
448
+ depth: "quick"
449
+ })
450
+ ```
451
+
452
+ ---
453
+
454
+ ### perplexity_reason
455
+
456
+ Complex reasoning using Perplexity Sonar Reasoning Pro.
457
+
458
+ #### Schema
459
+
460
+ ```typescript
461
+ {
462
+ problem: string; // REQUIRED
463
+ context?: string;
464
+ approach?: "analytical" | "creative" | "systematic" | "comparative";
465
+ }
466
+ ```
467
+
468
+ #### Parameters
469
+
470
+ | Parameter | Type | Required | Default | Description |
471
+ |-----------|------|----------|---------|-------------|
472
+ | `problem` | `string` | ✅ Yes | - | Problem to reason about |
473
+ | `context` | `string` | No | - | Additional context |
474
+ | `approach` | `string` | No | `"analytical"` | Reasoning approach |
475
+
476
+ #### Reasoning Approaches
477
+
478
+ - `analytical` - Break down into components
479
+ - `creative` - Explore innovative solutions
480
+ - `systematic` - Methodical step-by-step
481
+ - `comparative` - Compare alternatives
482
+
483
+ #### Example Calls
484
+
485
+ **Analytical reasoning:**
486
+ ```typescript
487
+ perplexity_reason({
488
+ problem: "Why is Python slower than C++ for numerical computing?",
489
+ approach: "analytical"
490
+ })
491
+ ```
492
+
493
+ **Creative problem-solving:**
494
+ ```typescript
495
+ perplexity_reason({
496
+ problem: "How to reduce cloud infrastructure costs by 50%",
497
+ approach: "creative",
498
+ context: "E-commerce platform with 1M daily users"
499
+ })
500
+ ```
501
+
502
+ **Systematic analysis:**
503
+ ```typescript
504
+ perplexity_reason({
505
+ problem: "Design a zero-downtime database migration strategy",
506
+ approach: "systematic",
507
+ context: "PostgreSQL 200GB production database"
508
+ })
509
+ ```
510
+
511
+ ---
512
+
513
+ ## Grok Suite
514
+
515
+ ### grok_search
516
+
517
+ Cost-optimized web search using Grok-4's live search with advanced filtering.
518
+
519
+ #### Schema
520
+
521
+ ```typescript
522
+ {
523
+ query: string; // REQUIRED
524
+ max_search_results?: number; // Default: 20
525
+ recency?: "all" | "day" | "week" | "month" | "year";
526
+ sources?: Array<{
527
+ type: "web" | "news" | "x" | "rss";
528
+ allowed_websites?: string[]; // Domain whitelist
529
+ country?: string; // ISO country code (e.g., "US", "PL")
530
+ }>;
531
+ }
532
+ ```
533
+
534
+ #### Parameters
535
+
536
+ | Parameter | Type | Required | Default | Description |
537
+ |-----------|------|----------|---------|-------------|
538
+ | `query` | `string` | ✅ Yes | - | Search query |
539
+ | `max_search_results` | `number` | No | `20` | Maximum search results (costs per 1k sources) |
540
+ | `recency` | `string` | No | `"all"` | Time filter |
541
+ | `sources` | `array` | No | `[{type: "web"}]` | Search source configuration |
542
+
543
+ #### Source Types
544
+
545
+ - `web` - General web search
546
+ - `news` - News articles
547
+ - `x` - X (Twitter) posts
548
+ - `rss` - RSS feeds
549
+
550
+ #### Example Calls
551
+
552
+ **Basic search:**
553
+ ```typescript
554
+ grok_search({
555
+ query: "latest AI developments"
556
+ })
557
+ ```
558
+
559
+ **Domain-restricted search:**
560
+ ```typescript
561
+ grok_search({
562
+ query: "Python async best practices",
563
+ sources: [{
564
+ type: "web",
565
+ allowed_websites: ["python.org", "docs.python.org", "peps.python.org"]
566
+ }],
567
+ recency: "year"
568
+ })
569
+ ```
570
+
571
+ **News search with recency:**
572
+ ```typescript
573
+ grok_search({
574
+ query: "quantum computing breakthroughs",
575
+ sources: [{ type: "news" }],
576
+ recency: "week",
577
+ max_search_results: 50
578
+ })
579
+ ```
580
+
581
+ **Multi-source search:**
582
+ ```typescript
583
+ grok_search({
584
+ query: "React 19 features",
585
+ sources: [
586
+ {
587
+ type: "web",
588
+ allowed_websites: ["react.dev", "github.com/facebook/react"]
589
+ },
590
+ { type: "news" }
591
+ ],
592
+ max_search_results: 30
593
+ })
594
+ ```
595
+
596
+ **Country-specific search:**
597
+ ```typescript
598
+ grok_search({
599
+ query: "local tech startups",
600
+ sources: [{
601
+ type: "news",
602
+ country: "PL" // Poland
603
+ }],
604
+ recency: "month"
605
+ })
606
+ ```
607
+
608
+ **X (Twitter) search:**
609
+ ```typescript
610
+ grok_search({
611
+ query: "@anthropic announcements",
612
+ sources: [{ type: "x" }],
613
+ recency: "week",
614
+ max_search_results: 100
615
+ })
616
+ ```
617
+
618
+ **GitHub documentation search:**
619
+ ```typescript
620
+ grok_search({
621
+ query: "Next.js app router documentation",
622
+ sources: [{
623
+ type: "web",
624
+ allowed_websites: [
625
+ "nextjs.org",
626
+ "github.com/vercel/next.js"
627
+ ]
628
+ }]
629
+ })
630
+ ```
631
+
632
+ #### Cost Considerations
633
+
634
+ - Grok search is charged per 1000 sources searched
635
+ - `max_search_results` controls cost
636
+ - Default limit: 20 results (configurable via `GROK_SEARCH_SOURCES_LIMIT` env var)
637
+ - Use domain filtering to reduce unnecessary searches
638
+
639
+ ---
640
+
641
+ ### grok_reason
642
+
643
+ Deep logical reasoning with Grok-4 using first principles.
644
+
645
+ #### Schema
646
+
647
+ ```typescript
648
+ {
649
+ problem: string; // REQUIRED
650
+ context?: string;
651
+ approach?: "analytical" | "creative" | "systematic" | "first-principles";
652
+ useHeavy?: boolean; // Use Grok-4-heavy model
653
+ }
654
+ ```
655
+
656
+ #### Parameters
657
+
658
+ | Parameter | Type | Required | Default | Description |
659
+ |-----------|------|----------|---------|-------------|
660
+ | `problem` | `string` | ✅ Yes | - | Problem to reason about |
661
+ | `context` | `string` | No | - | Additional context |
662
+ | `approach` | `string` | No | `"first-principles"` | Reasoning approach |
663
+ | `useHeavy` | `boolean` | No | `false` | Use Grok-4-heavy for complex problems |
664
+
665
+ #### Example Calls
666
+
667
+ **First principles reasoning:**
668
+ ```typescript
669
+ grok_reason({
670
+ problem: "Why do rockets need stages?",
671
+ approach: "first-principles"
672
+ })
673
+ ```
674
+
675
+ **Complex problem with heavy model:**
676
+ ```typescript
677
+ grok_reason({
678
+ problem: "Design a consensus algorithm for distributed systems",
679
+ approach: "systematic",
680
+ useHeavy: true,
681
+ context: "Byzantine fault tolerance required"
682
+ })
683
+ ```
684
+
685
+ ---
686
+
687
+ ### grok_code
688
+
689
+ Code analysis and optimization with Grok-4.
690
+
691
+ #### Schema
692
+
693
+ ```typescript
694
+ {
695
+ code: string; // REQUIRED
696
+ task: "analyze" | "optimize" | "explain" | "review"; // REQUIRED
697
+ language?: string;
698
+ context?: string;
699
+ }
700
+ ```
701
+
702
+ #### Parameters
703
+
704
+ | Parameter | Type | Required | Default | Description |
705
+ |-----------|------|----------|---------|-------------|
706
+ | `code` | `string` | ✅ Yes | - | Code to analyze |
707
+ | `task` | `string` | ✅ Yes | - | Analysis task |
708
+ | `language` | `string` | No | Auto-detect | Programming language |
709
+ | `context` | `string` | No | - | Additional context |
710
+
711
+ #### Example Calls
712
+
713
+ **Code analysis:**
714
+ ```typescript
715
+ grok_code({
716
+ code: `
717
+ function fibonacci(n) {
718
+ if (n <= 1) return n;
719
+ return fibonacci(n-1) + fibonacci(n-2);
720
+ }
721
+ `,
722
+ task: "analyze",
723
+ language: "javascript"
724
+ })
725
+ ```
726
+
727
+ **Optimization:**
728
+ ```typescript
729
+ grok_code({
730
+ code: "SELECT * FROM users WHERE status = 'active'",
731
+ task: "optimize",
732
+ language: "sql",
733
+ context: "Users table has 10M rows, queried frequently"
734
+ })
735
+ ```
736
+
737
+ ---
738
+
739
+ ### grok_debug
740
+
741
+ Deep debugging assistance with Grok-4.
742
+
743
+ #### Schema
744
+
745
+ ```typescript
746
+ {
747
+ code: string; // REQUIRED
748
+ error?: string;
749
+ expectedBehavior?: string;
750
+ actualBehavior?: string;
751
+ context?: string;
752
+ }
753
+ ```
754
+
755
+ #### Example Calls
756
+
757
+ **Debug with error:**
758
+ ```typescript
759
+ grok_debug({
760
+ code: `
761
+ async function fetchData() {
762
+ const data = await fetch('/api/data');
763
+ return data.json();
764
+ }
765
+ `,
766
+ error: "TypeError: data.json is not a function",
767
+ context: "Using Node.js fetch API"
768
+ })
769
+ ```
770
+
771
+ ---
772
+
773
+ ### grok_architect
774
+
775
+ System architecture and design with Grok-4.
776
+
777
+ #### Schema
778
+
779
+ ```typescript
780
+ {
781
+ requirements: string; // REQUIRED
782
+ constraints?: string;
783
+ scale?: string;
784
+ context?: string;
785
+ }
786
+ ```
787
+
788
+ #### Example Calls
789
+
790
+ **Architecture design:**
791
+ ```typescript
792
+ grok_architect({
793
+ requirements: "Real-time chat application with 100k concurrent users",
794
+ constraints: "Must use AWS, budget $5k/month",
795
+ scale: "100k concurrent, 1M daily active users"
796
+ })
797
+ ```
798
+
799
+ ---
800
+
801
+ ### grok_brainstorm
802
+
803
+ Creative brainstorming using Grok-4-heavy.
804
+
805
+ #### Schema
806
+
807
+ ```typescript
808
+ {
809
+ problem: string; // REQUIRED
810
+ quantity?: number; // Default: 10
811
+ style?: "innovative" | "practical" | "wild" | "systematic";
812
+ constraints?: string;
813
+ }
814
+ ```
815
+
816
+ #### Example Calls
817
+
818
+ **Creative ideation:**
819
+ ```typescript
820
+ grok_brainstorm({
821
+ problem: "Revolutionary social media features",
822
+ quantity: 15,
823
+ style: "wild"
824
+ })
825
+ ```
826
+
827
+ ---
828
+
829
+ ## OpenAI Suite
830
+
831
+ ### openai_brainstorm
832
+
833
+ Creative brainstorming using GPT-5 suite with advanced controls.
834
+
835
+ #### Schema
836
+
837
+ ```typescript
838
+ {
839
+ problem: string; // REQUIRED
840
+ model?: "gpt-5" | "gpt-5-mini" | "gpt-5-nano"; // Default: "gpt-5-mini"
841
+ quantity?: number; // Default: 5
842
+ style?: "innovative" | "practical" | "wild" | "systematic";
843
+ constraints?: string;
844
+ reasoning_effort?: "minimal" | "low" | "medium" | "high";
845
+ verbosity?: "silent" | "minimal" | "concise" | "balanced" | "detailed" | "exhaustive";
846
+ max_tokens?: number; // Default: 4000
847
+ }
848
+ ```
849
+
850
+ #### Parameters
851
+
852
+ | Parameter | Type | Required | Default | Description |
853
+ |-----------|------|----------|---------|-------------|
854
+ | `problem` | `string` | ✅ Yes | - | Problem to brainstorm |
855
+ | `model` | `string` | No | `"gpt-5-mini"` | GPT-5 model variant |
856
+ | `quantity` | `number` | No | `5` | Number of ideas to generate |
857
+ | `style` | `string` | No | `"innovative"` | Brainstorming style |
858
+ | `constraints` | `string` | No | - | Additional constraints |
859
+ | `reasoning_effort` | `string` | No | `"low"` | Reasoning depth (GPT-5 only) |
860
+ | `verbosity` | `string` | No | `"balanced"` | Output verbosity (GPT-5 only) |
861
+ | `max_tokens` | `number` | No | `4000` | Maximum tokens |
862
+
863
+ #### Model Comparison
864
+
865
+ | Model | Speed | Cost | Best For |
866
+ |-------|-------|------|----------|
867
+ | `gpt-5-nano` | Fastest | $ | Quick ideation |
868
+ | `gpt-5-mini` | Fast | $$ | Most tasks (default) |
869
+ | `gpt-5` | Slow | $$$$ | Complex problems requiring deep reasoning |
870
+
871
+ #### Reasoning Effort (GPT-5 only)
872
+
873
+ - `minimal` - Quick responses
874
+ - `low` - Light reasoning
875
+ - `medium` - Balanced reasoning
876
+ - `high` - Deep, thorough reasoning
877
+
878
+ #### Verbosity Levels (GPT-5 only)
879
+
880
+ - `silent` - Minimal output
881
+ - `minimal` - Brief responses
882
+ - `concise` - Compact but complete
883
+ - `balanced` - Standard detail (default)
884
+ - `detailed` - Comprehensive
885
+ - `exhaustive` - Maximum detail
886
+
887
+ #### Example Calls
888
+
889
+ **Basic brainstorming:**
890
+ ```typescript
891
+ openai_brainstorm({
892
+ problem: "New features for a productivity app"
893
+ })
894
+ ```
895
+
896
+ **With GPT-5 and high reasoning:**
897
+ ```typescript
898
+ openai_brainstorm({
899
+ problem: "Solve climate change with technology",
900
+ model: "gpt-5",
901
+ quantity: 10,
902
+ style: "innovative",
903
+ reasoning_effort: "high",
904
+ verbosity: "detailed"
905
+ })
906
+ ```
907
+
908
+ **Quick practical ideas:**
909
+ ```typescript
910
+ openai_brainstorm({
911
+ problem: "Reduce app cold start time",
912
+ model: "gpt-5-nano",
913
+ quantity: 5,
914
+ style: "practical",
915
+ constraints: "Must work on mobile devices"
916
+ })
917
+ ```
918
+
919
+ **Wild ideation:**
920
+ ```typescript
921
+ openai_brainstorm({
922
+ problem: "Future of transportation",
923
+ style: "wild",
924
+ quantity: 20,
925
+ verbosity: "exhaustive"
926
+ })
927
+ ```
928
+
929
+ ---
930
+
931
+ ### openai_compare
932
+
933
+ Multi-option consensus analysis with GPT-5.
934
+
935
+ #### Schema
936
+
937
+ ```typescript
938
+ {
939
+ topic: string; // REQUIRED
940
+ options: string[]; // REQUIRED - Options to compare
941
+ criteria?: string[]; // Evaluation criteria
942
+ includeRecommendation?: boolean; // Default: true
943
+ }
944
+ ```
945
+
946
+ #### Example Calls
947
+
948
+ **Compare frameworks:**
949
+ ```typescript
950
+ openai_compare({
951
+ topic: "JavaScript framework selection",
952
+ options: ["React", "Vue", "Svelte", "Angular"],
953
+ criteria: [
954
+ "Learning curve",
955
+ "Performance",
956
+ "Community support",
957
+ "Ecosystem maturity",
958
+ "Job market demand"
959
+ ],
960
+ includeRecommendation: true
961
+ })
962
+ ```
963
+
964
+ ---
965
+
966
+ ## Gemini Suite
967
+
968
+ ### gemini_brainstorm
969
+
970
+ Collaborative ideation and brainstorming with Gemini.
971
+
972
+ #### Schema
973
+
974
+ ```typescript
975
+ {
976
+ prompt: string; // REQUIRED
977
+ claudeThoughts?: string; // Your initial thoughts
978
+ maxRounds?: number; // Default: 1
979
+ }
980
+ ```
981
+
982
+ #### Example Calls
983
+
984
+ **Basic brainstorming:**
985
+ ```typescript
986
+ gemini_brainstorm({
987
+ prompt: "Innovative features for a fitness app"
988
+ })
989
+ ```
990
+
991
+ **Collaborative brainstorming:**
992
+ ```typescript
993
+ gemini_brainstorm({
994
+ prompt: "Improve code review process",
995
+ claudeThoughts: "I think automated linting and AI suggestions could help",
996
+ maxRounds: 3
997
+ })
998
+ ```
999
+
1000
+ ---
1001
+
1002
+ ### gemini_analyze_code
1003
+
1004
+ Code quality and security analysis with Gemini.
1005
+
1006
+ #### Schema
1007
+
1008
+ ```typescript
1009
+ {
1010
+ code: string; // REQUIRED
1011
+ focus?: "general" | "security" | "performance" | "quality";
1012
+ language?: string;
1013
+ }
1014
+ ```
1015
+
1016
+ #### Example Calls
1017
+
1018
+ **General code analysis:**
1019
+ ```typescript
1020
+ gemini_analyze_code({
1021
+ code: `
1022
+ function processPayment(userId, amount) {
1023
+ const user = db.query('SELECT * FROM users WHERE id = ' + userId);
1024
+ charge(user.card, amount);
1025
+ }
1026
+ `,
1027
+ focus: "security"
1028
+ })
1029
+ ```
1030
+
1031
+ ---
1032
+
1033
+ ### gemini_analyze_text
1034
+
1035
+ Text sentiment, entity extraction, and summarization.
1036
+
1037
+ #### Schema
1038
+
1039
+ ```typescript
1040
+ {
1041
+ text: string; // REQUIRED
1042
+ task: "sentiment" | "entities" | "summary" | "key-points";
1043
+ }
1044
+ ```
1045
+
1046
+ #### Example Calls
1047
+
1048
+ **Sentiment analysis:**
1049
+ ```typescript
1050
+ gemini_analyze_text({
1051
+ text: "The new iPhone is amazing! Best camera ever, but battery life could be better.",
1052
+ task: "sentiment"
1053
+ })
1054
+ ```
1055
+
1056
+ ---
1057
+
1058
+ ## Qwen Suite
1059
+
1060
+ ### qwen_coder
1061
+
1062
+ Advanced code generation with Qwen3-Coder (480B MoE model).
1063
+
1064
+ #### Schema
1065
+
1066
+ ```typescript
1067
+ {
1068
+ task: "generate" | "review" | "optimize" | "debug" | "refactor" | "explain"; // REQUIRED
1069
+ requirements: string; // REQUIRED
1070
+ code?: string; // For non-generate tasks
1071
+ language?: string;
1072
+ useFree?: boolean; // Use free tier model
1073
+ }
1074
+ ```
1075
+
1076
+ #### Parameters
1077
+
1078
+ | Parameter | Type | Required | Default | Description |
1079
+ |-----------|------|----------|---------|-------------|
1080
+ | `task` | `string` | ✅ Yes | - | Task type |
1081
+ | `requirements` | `string` | ✅ Yes | - | What you need |
1082
+ | `code` | `string` | No | - | Existing code (for review/optimize/debug/refactor/explain) |
1083
+ | `language` | `string` | No | Auto-detect | Programming language |
1084
+ | `useFree` | `boolean` | No | `false` | Use free tier model (lower quality) |
1085
+
1086
+ #### Example Calls
1087
+
1088
+ **Generate code:**
1089
+ ```typescript
1090
+ qwen_coder({
1091
+ task: "generate",
1092
+ requirements: "Binary search tree implementation in Python with insert, delete, and search methods",
1093
+ language: "python"
1094
+ })
1095
+ ```
1096
+
1097
+ **Review code:**
1098
+ ```typescript
1099
+ qwen_coder({
1100
+ task: "review",
1101
+ requirements: "Check for bugs, performance issues, and best practices",
1102
+ code: `
1103
+ def fibonacci(n):
1104
+ if n <= 1:
1105
+ return n
1106
+ return fibonacci(n-1) + fibonacci(n-2)
1107
+ `,
1108
+ language: "python"
1109
+ })
1110
+ ```
1111
+
1112
+ **Optimize code:**
1113
+ ```typescript
1114
+ qwen_coder({
1115
+ task: "optimize",
1116
+ requirements: "Improve performance for large datasets",
1117
+ code: "const result = array.filter(x => x > 0).map(x => x * 2).reduce((a, b) => a + b)",
1118
+ language: "javascript"
1119
+ })
1120
+ ```
1121
+
1122
+ ---
1123
+
1124
+ ## Advanced Modes
1125
+
1126
+ ### verifier
1127
+
1128
+ Multi-model parallel verification with consensus analysis.
1129
+
1130
+ #### Schema
1131
+
1132
+ ```typescript
1133
+ {
1134
+ query: string; // REQUIRED
1135
+ variant?: "quick_verify" | "deep_verify" | "fact_check" |
1136
+ "code_verify" | "security_verify"; // Default: "quick_verify"
1137
+ model?: string | string[]; // Override variant models
1138
+ maxTokens?: number;
1139
+ timeout?: number; // Milliseconds
1140
+ includeSources?: boolean; // Default: false (true for fact_check)
1141
+ }
1142
+ ```
1143
+
1144
+ #### Parameters
1145
+
1146
+ | Parameter | Type | Required | Default | Description |
1147
+ |-----------|------|----------|---------|-------------|
1148
+ | `query` | `string` | ✅ Yes | - | Statement or question to verify |
1149
+ | `variant` | `string` | No | `"quick_verify"` | Verification strategy |
1150
+ | `model` | `string \| string[]` | No | Variant-specific | Custom model(s) |
1151
+ | `maxTokens` | `number` | No | Variant-specific | Max tokens per model |
1152
+ | `timeout` | `number` | No | Variant-specific | Timeout in ms |
1153
+ | `includeSources` | `boolean` | No | Variant-specific | Include source citations |
1154
+
1155
+ #### Variants
1156
+
1157
+ **quick_verify** (Default)
1158
+ - Models: `gpt-5-mini`, `gemini-2.5-flash`, `gpt-5`
1159
+ - Tokens: 2000
1160
+ - Timeout: 10s
1161
+ - Use: Fast verification
1162
+
1163
+ **deep_verify**
1164
+ - Models: `gpt-5`, `qwq-32b`, `gemini-2.5-pro`, `qwen/qwen3-coder`
1165
+ - Tokens: 6000
1166
+ - Timeout: 30s
1167
+ - Use: Complex reasoning
1168
+
1169
+ **fact_check**
1170
+ - Models: `gpt-5`, `gemini-2.5-pro`, `gpt-5-mini`
1171
+ - Tokens: 3000
1172
+ - Timeout: 15s
1173
+ - Sources: Enabled by default
1174
+ - Use: Factual verification
1175
+
1176
+ **code_verify**
1177
+ - Models: `gpt-5`, `gemini-2.5-pro`, `qwen/qwen3-coder`
1178
+ - Tokens: 4000
1179
+ - Timeout: 20s
1180
+ - Use: Code correctness
1181
+
1182
+ **security_verify**
1183
+ - Models: `gpt-5`, `gemini-2.5-pro`, `qwen/qwen3-coder`
1184
+ - Tokens: 4000
1185
+ - Timeout: 20s
1186
+ - Use: Security analysis
1187
+
1188
+ #### Example Calls
1189
+
1190
+ **Basic verification:**
1191
+ ```typescript
1192
+ verifier({
1193
+ query: "Is Python a statically typed language?"
1194
+ })
1195
+ ```
1196
+
1197
+ **Fact check with sources:**
1198
+ ```typescript
1199
+ verifier({
1200
+ query: "What is the speed of light?",
1201
+ variant: "fact_check",
1202
+ includeSources: true
1203
+ })
1204
+ ```
1205
+
1206
+ **Code verification:**
1207
+ ```typescript
1208
+ verifier({
1209
+ query: "Is this SQL query safe from injection?",
1210
+ variant: "security_verify"
1211
+ })
1212
+ ```
1213
+
1214
+ **Custom models:**
1215
+ ```typescript
1216
+ verifier({
1217
+ query: "Complex mathematical proof",
1218
+ variant: "deep_verify",
1219
+ model: ["gpt-5", "qwq-32b", "gemini-2.5-pro"],
1220
+ maxTokens: 8000
1221
+ })
1222
+ ```
1223
+
1224
+ ---
1225
+
1226
+ ### scout
1227
+
1228
+ Conditional hybrid intelligence gathering with Perplexity and/or Grok.
1229
+
1230
+ #### Schema
1231
+
1232
+ ```typescript
1233
+ {
1234
+ query: string; // REQUIRED
1235
+ variant?: "research_scout" | "code_scout" | "fact_scout" | "quick_scout";
1236
+ searchProvider?: "perplexity" | "grok" | "both"; // Default: "perplexity"
1237
+ maxTokens?: number;
1238
+ timeout?: number;
1239
+ enableGrokLiveSearch?: boolean; // Default: true (if using grok)
1240
+ maxSearchSources?: number; // Grok source limit
1241
+ searchDomains?: string[]; // Domain whitelist
1242
+ }
1243
+ ```
1244
+
1245
+ #### Parameters
1246
+
1247
+ | Parameter | Type | Required | Default | Description |
1248
+ |-----------|------|----------|---------|-------------|
1249
+ | `query` | `string` | ✅ Yes | - | Research topic or question |
1250
+ | `variant` | `string` | No | `"research_scout"` | Research strategy |
1251
+ | `searchProvider` | `string` | No | `"perplexity"` | Search provider(s) |
1252
+ | `maxTokens` | `number` | No | Variant-specific | Max tokens per call |
1253
+ | `timeout` | `number` | No | Variant-specific | Timeout in ms |
1254
+ | `enableGrokLiveSearch` | `boolean` | No | `true` | Enable Grok live search |
1255
+ | `maxSearchSources` | `number` | No | Variant-specific | Max Grok sources (costs per 1k) |
1256
+ | `searchDomains` | `string[]` | No | - | Restrict to specific domains |
1257
+
1258
+ #### Variants
1259
+
1260
+ **research_scout** (Default)
1261
+ - Flow: Perplexity-first-always
1262
+ - Tokens: 2500
1263
+ - Max Sources: 100
1264
+ - Use: Comprehensive research
1265
+
1266
+ **code_scout**
1267
+ - Flow: Conditional hybrid
1268
+ - Tokens: 2000
1269
+ - Max Sources: 100
1270
+ - Use: Technical documentation
1271
+
1272
+ **fact_scout**
1273
+ - Flow: Waterfall
1274
+ - Tokens: 1500
1275
+ - Max Sources: 150
1276
+ - Use: Fact verification
1277
+
1278
+ **quick_scout**
1279
+ - Flow: Conditional hybrid
1280
+ - Tokens: 1000
1281
+ - Max Sources: 50
1282
+ - Use: Fast lookups
1283
+
1284
+ #### Example Calls
1285
+
1286
+ **Basic research:**
1287
+ ```typescript
1288
+ scout({
1289
+ query: "Latest quantum computing developments 2025"
1290
+ })
1291
+ ```
1292
+
1293
+ **Code documentation search:**
1294
+ ```typescript
1295
+ scout({
1296
+ query: "TypeScript 5.0 new features",
1297
+ variant: "code_scout",
1298
+ searchDomains: ["typescriptlang.org", "github.com/microsoft/TypeScript"]
1299
+ })
1300
+ ```
1301
+
1302
+ **Use Grok live search:**
1303
+ ```typescript
1304
+ scout({
1305
+ query: "Current space missions",
1306
+ searchProvider: "grok",
1307
+ enableGrokLiveSearch: true,
1308
+ maxSearchSources: 50
1309
+ })
1310
+ ```
1311
+
1312
+ **Use both providers:**
1313
+ ```typescript
1314
+ scout({
1315
+ query: "Comprehensive climate change research",
1316
+ searchProvider: "both",
1317
+ variant: "research_scout",
1318
+ maxSearchSources: 100
1319
+ })
1320
+ ```
1321
+
1322
+ **Domain-restricted:**
1323
+ ```typescript
1324
+ scout({
1325
+ query: "Python async/await best practices",
1326
+ searchDomains: ["python.org", "docs.python.org"],
1327
+ variant: "code_scout"
1328
+ })
1329
+ ```
1330
+
1331
+ ---
1332
+
1333
+ ### challenger
1334
+
1335
+ Critical thinking and echo chamber prevention by generating counter-arguments.
1336
+
1337
+ #### Schema
1338
+
1339
+ ```typescript
1340
+ {
1341
+ context: string | object | array; // REQUIRED
1342
+ model?: string; // Default: "gpt-5-mini"
1343
+ maxTokens?: number; // Default: 2000
1344
+ temperature?: number; // 0-1, Default: 0.9
1345
+ }
1346
+ ```
1347
+
1348
+ #### Parameters
1349
+
1350
+ | Parameter | Type | Required | Default | Description |
1351
+ |-----------|------|----------|---------|-------------|
1352
+ | `context` | `string \| object \| array` | ✅ Yes | - | Claims to challenge |
1353
+ | `model` | `string` | No | `"gpt-5-mini"` | AI model to use |
1354
+ | `maxTokens` | `number` | No | `2000` | Max tokens per call |
1355
+ | `temperature` | `number` | No | `0.9` | Creativity (0-1) |
1356
+
1357
+ #### Supported Models
1358
+
1359
+ - `gpt-5-mini`, `gpt-5`, `qwq-32b`, `qwen3-30b`, `qwen3-coder-480b`
1360
+ - `gemini-2.5-flash`, `gemini-2.5-pro`
1361
+ - `grok-4`, `grok-4-0709`
1362
+ - `sonar-pro`, `perplexity-sonar-pro`
1363
+
1364
+ #### Context Types
1365
+
1366
+ **String:**
1367
+ ```typescript
1368
+ challenger({
1369
+ context: "AI will solve all of humanity's problems"
1370
+ })
1371
+ ```
1372
+
1373
+ **Object:**
1374
+ ```typescript
1375
+ challenger({
1376
+ context: {
1377
+ query: "Social media is only beneficial",
1378
+ text: "Everyone should use social media daily"
1379
+ }
1380
+ })
1381
+ ```
1382
+
1383
+ **Array (detects groupthink):**
1384
+ ```typescript
1385
+ challenger({
1386
+ context: [
1387
+ "Everyone agrees this is the best approach",
1388
+ "There is unanimous consensus",
1389
+ "All experts say the same thing"
1390
+ ]
1391
+ })
1392
+ ```
1393
+
1394
+ #### Example Calls
1395
+
1396
+ **Basic challenge:**
1397
+ ```typescript
1398
+ challenger({
1399
+ context: "Remote work is always better than office work"
1400
+ })
1401
+ ```
1402
+
1403
+ **With custom model:**
1404
+ ```typescript
1405
+ challenger({
1406
+ context: "Cryptocurrency will replace traditional banking",
1407
+ model: "gemini-2.5-flash",
1408
+ temperature: 0.7
1409
+ })
1410
+ ```
1411
+
1412
+ **Groupthink detection:**
1413
+ ```typescript
1414
+ challenger({
1415
+ context: [
1416
+ "This architecture is the only correct solution",
1417
+ "No other approach makes sense",
1418
+ "Everyone on the team agrees"
1419
+ ],
1420
+ maxTokens: 3000
1421
+ })
1422
+ ```
1423
+
1424
+ ---
1425
+
1426
+ ## Workflow Tools
1427
+
1428
+ ### workflow
1429
+
1430
+ Execute multi-step AI workflows from YAML/JSON files.
1431
+
1432
+ #### Schema
1433
+
1434
+ ```typescript
1435
+ {
1436
+ name: string; // REQUIRED - Workflow name
1437
+ query: string; // REQUIRED - Input for workflow
1438
+ projectPath?: string; // For custom workflows
1439
+ }
1440
+ ```
1441
+
1442
+ #### Example Calls
1443
+
1444
+ **Execute workflow:**
1445
+ ```typescript
1446
+ workflow({
1447
+ name: "comprehensive-code-review",
1448
+ query: codeToReview
1449
+ })
1450
+ ```
1451
+
1452
+ **Custom workflow:**
1453
+ ```typescript
1454
+ workflow({
1455
+ name: "my-custom-workflow",
1456
+ query: "input data",
1457
+ projectPath: "/path/to/project"
1458
+ })
1459
+ ```
1460
+
1461
+ ---
1462
+
1463
+ ### list_workflows
1464
+
1465
+ List available workflows.
1466
+
1467
+ #### Schema
1468
+
1469
+ ```typescript
1470
+ {
1471
+ projectPath?: string; // For custom workflows
1472
+ }
1473
+ ```
1474
+
1475
+ #### Example Calls
1476
+
1477
+ ```typescript
1478
+ list_workflows({})
1479
+ ```
1480
+
1481
+ ---
1482
+
1483
+ ### create_workflow
1484
+
1485
+ Create custom workflow from template.
1486
+
1487
+ #### Schema
1488
+
1489
+ ```typescript
1490
+ {
1491
+ name: string; // REQUIRED - Workflow name
1492
+ type: "code-review" | "brainstorm" | "debug" | "research" | "custom"; // REQUIRED
1493
+ steps?: string; // Custom YAML/JSON steps
1494
+ }
1495
+ ```
1496
+
1497
+ #### Example Calls
1498
+
1499
+ **Create from template:**
1500
+ ```typescript
1501
+ create_workflow({
1502
+ name: "my-code-review",
1503
+ type: "code-review"
1504
+ })
1505
+ ```
1506
+
1507
+ **Custom workflow:**
1508
+ ```typescript
1509
+ create_workflow({
1510
+ name: "custom-research",
1511
+ type: "custom",
1512
+ steps: `
1513
+ steps:
1514
+ - name: gather-facts
1515
+ tool: perplexity_research
1516
+ input:
1517
+ topic: "\${input}"
1518
+ - name: analyze
1519
+ tool: gemini_analyze_text
1520
+ input:
1521
+ text: "\${gather-facts}"
1522
+ `
1523
+ })
1524
+ ```
1525
+
1526
+ ---
1527
+
1528
+ ### visualize_workflow
1529
+
1530
+ Show workflow structure.
1531
+
1532
+ #### Schema
1533
+
1534
+ ```typescript
1535
+ {
1536
+ name: string; // REQUIRED
1537
+ }
1538
+ ```
1539
+
1540
+ #### Example Calls
1541
+
1542
+ ```typescript
1543
+ visualize_workflow({
1544
+ name: "comprehensive-code-review"
1545
+ })
1546
+ ```
1547
+
1548
+ ---
1549
+
1550
+ ## Collaborative Tools
1551
+
1552
+ ### pingpong
1553
+
1554
+ Standalone multi-model conversation tool.
1555
+
1556
+ #### Schema
1557
+
1558
+ ```typescript
1559
+ {
1560
+ problem: string; // REQUIRED
1561
+ domain?: string;
1562
+ rounds?: number; // Default: 8
1563
+ models?: string[]; // Default: ["grok", "claude-code", "qwen", "openai"]
1564
+ temperature?: number; // 0-1, Default: 0.8
1565
+ style?: "collaborative" | "competitive" | "debate" | "build-upon"; // Default: "collaborative"
1566
+ }
1567
+ ```
1568
+
1569
+ #### Example Calls
1570
+
1571
+ **Collaborative problem-solving:**
1572
+ ```typescript
1573
+ pingpong({
1574
+ problem: "Design a distributed caching system",
1575
+ domain: "architecture",
1576
+ rounds: 8,
1577
+ style: "collaborative"
1578
+ })
1579
+ ```
1580
+
1581
+ **Competitive debate:**
1582
+ ```typescript
1583
+ pingpong({
1584
+ problem: "Best approach to microservices architecture",
1585
+ models: ["grok", "openai", "gemini"],
1586
+ rounds: 10,
1587
+ style: "debate",
1588
+ temperature: 0.9
1589
+ })
1590
+ ```
1591
+
1592
+ ---
1593
+
1594
+ ## Environment Variables
1595
+
1596
+ Configure tool behavior via environment variables:
1597
+
1598
+ ```bash
1599
+ # Search providers
1600
+ DEFAULT_SEARCH_PROVIDER=perplexity
1601
+ GROK_SEARCH_SOURCES_LIMIT=100
1602
+
1603
+ # Tool overrides
1604
+ ENABLE_TOOL_HUNTER=false
1605
+ DISABLE_TOOL_GROK_SEARCH=false
1606
+ DISABLE_ALL_TOOLS=false
1607
+
1608
+ # Performance
1609
+ TACHI_ENABLE_CACHE=true
1610
+ TACHI_ENABLE_BATCHING=true
1611
+ MAX_PINGPONG_ROUNDS=30
1612
+ ```
1613
+
1614
+ ---
1615
+
1616
+ ## See Also
1617
+
1618
+ - [Tool Profiles](TOOL_PROFILES.md) - Pre-configured tool sets
1619
+ - [Tool Parameters](TOOL_PARAMETERS.md) - Detailed parameter docs for advanced modes
1620
+ - [Configuration Guide](CONFIGURATION.md) - Complete configuration reference
1621
+ - [API Keys Guide](API_KEYS.md) - Where to get API keys
1622
+ - [Workflows](WORKFLOWS.md) - Custom workflow creation