tachibot-mcp 2.8.0 → 2.9.0
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.
- package/dist/src/config/model-constants.js +7 -0
- package/dist/src/profiles/balanced.js +4 -0
- package/dist/src/profiles/code_focus.js +4 -0
- package/dist/src/profiles/full.js +4 -0
- package/dist/src/profiles/heavy_coding.js +5 -1
- package/dist/src/profiles/minimal.js +4 -0
- package/dist/src/profiles/research_power.js +4 -0
- package/dist/src/prompt-engineer-lite.js +58 -10
- package/dist/src/server.js +7 -0
- package/dist/src/tools/advanced-modes.js +48 -38
- package/dist/src/tools/claude-integration.js +8 -6
- package/dist/src/tools/gemini-tools.js +35 -23
- package/dist/src/tools/grok-tools.js +29 -24
- package/dist/src/tools/lmstudio-tools.js +18 -16
- package/dist/src/tools/openai-tools.js +167 -30
- package/dist/src/tools/openrouter-tools.js +70 -42
- package/dist/src/tools/perplexity-tools.js +27 -19
- package/dist/src/tools/prompt-technique-tools.js +404 -0
- package/dist/src/tools/qwen-wrapper.js +16 -11
- package/dist/src/tools/tachi-tool.js +3 -3
- package/dist/src/workflows/custom-workflows.js +14 -2
- package/package.json +1 -1
- package/profiles/balanced.json +6 -2
- package/profiles/code_focus.json +6 -2
- package/profiles/full.json +6 -2
- package/profiles/heavy_coding.json +6 -2
- package/profiles/minimal.json +6 -2
- package/profiles/research_power.json +6 -2
- package/tools.config.json +2 -1
|
@@ -125,6 +125,7 @@ export const CURRENT_MODELS = {
|
|
|
125
125
|
brainstorm: OPENAI_MODELS.DEFAULT, // Creative ideation (gpt-5.2 + effort=medium)
|
|
126
126
|
code: OPENAI_MODELS.DEFAULT, // Code tasks (gpt-5.2 + effort=medium)
|
|
127
127
|
explain: OPENAI_MODELS.DEFAULT, // Explanations (gpt-5.2 + effort=low)
|
|
128
|
+
search: OPENAI_MODELS.DEFAULT, // Web search (gpt-5.2 + web_search tool)
|
|
128
129
|
// Premium option for opt-in (use sparingly - 12x more expensive)
|
|
129
130
|
premium: OPENAI_MODELS.PRO, // Expert mode (gpt-5.2-pro - 88.4% GPQA, $21/$168)
|
|
130
131
|
},
|
|
@@ -175,6 +176,12 @@ export const TOOL_DEFAULTS = {
|
|
|
175
176
|
maxTokens: 1500,
|
|
176
177
|
temperature: 0.7,
|
|
177
178
|
},
|
|
179
|
+
openai_search: {
|
|
180
|
+
model: CURRENT_MODELS.openai.search,
|
|
181
|
+
reasoning_effort: OPENAI_REASONING.LOW,
|
|
182
|
+
maxTokens: 6000,
|
|
183
|
+
temperature: 0.3,
|
|
184
|
+
},
|
|
178
185
|
// Gemini tools
|
|
179
186
|
gemini_brainstorm: {
|
|
180
187
|
model: CURRENT_MODELS.gemini.default,
|
|
@@ -19,6 +19,7 @@ export const balancedProfile = {
|
|
|
19
19
|
openai_brainstorm: true,
|
|
20
20
|
openai_code_review: false,
|
|
21
21
|
openai_explain: false,
|
|
22
|
+
openai_search: true,
|
|
22
23
|
gemini_brainstorm: true,
|
|
23
24
|
gemini_analyze_code: true,
|
|
24
25
|
gemini_analyze_text: true,
|
|
@@ -36,5 +37,8 @@ export const balancedProfile = {
|
|
|
36
37
|
workflow_status: false,
|
|
37
38
|
validate_workflow: false,
|
|
38
39
|
validate_workflow_file: false,
|
|
40
|
+
list_prompt_techniques: true,
|
|
41
|
+
preview_prompt_technique: true,
|
|
42
|
+
execute_prompt_technique: true,
|
|
39
43
|
}
|
|
40
44
|
};
|
|
@@ -19,6 +19,7 @@ export const codeFocusProfile = {
|
|
|
19
19
|
openai_brainstorm: false,
|
|
20
20
|
openai_code_review: true,
|
|
21
21
|
openai_explain: false,
|
|
22
|
+
openai_search: false,
|
|
22
23
|
gemini_brainstorm: true,
|
|
23
24
|
gemini_analyze_code: true,
|
|
24
25
|
gemini_analyze_text: false,
|
|
@@ -36,5 +37,8 @@ export const codeFocusProfile = {
|
|
|
36
37
|
workflow_status: false,
|
|
37
38
|
validate_workflow: true,
|
|
38
39
|
validate_workflow_file: false,
|
|
40
|
+
list_prompt_techniques: true,
|
|
41
|
+
preview_prompt_technique: true,
|
|
42
|
+
execute_prompt_technique: true,
|
|
39
43
|
}
|
|
40
44
|
};
|
|
@@ -19,6 +19,7 @@ export const fullProfile = {
|
|
|
19
19
|
openai_brainstorm: true,
|
|
20
20
|
openai_code_review: true,
|
|
21
21
|
openai_explain: true,
|
|
22
|
+
openai_search: true,
|
|
22
23
|
gemini_brainstorm: true,
|
|
23
24
|
gemini_analyze_code: true,
|
|
24
25
|
gemini_analyze_text: true,
|
|
@@ -36,5 +37,8 @@ export const fullProfile = {
|
|
|
36
37
|
workflow_status: true,
|
|
37
38
|
validate_workflow: true,
|
|
38
39
|
validate_workflow_file: true,
|
|
40
|
+
list_prompt_techniques: true,
|
|
41
|
+
preview_prompt_technique: true,
|
|
42
|
+
execute_prompt_technique: true,
|
|
39
43
|
}
|
|
40
44
|
};
|
|
@@ -18,11 +18,12 @@ export const heavyCodingProfile = {
|
|
|
18
18
|
grok_architect: true,
|
|
19
19
|
grok_brainstorm: true,
|
|
20
20
|
grok_search: true,
|
|
21
|
-
// OpenAI - reason
|
|
21
|
+
// OpenAI - reason, brainstorm, search
|
|
22
22
|
openai_reason: true,
|
|
23
23
|
openai_brainstorm: true,
|
|
24
24
|
openai_code_review: false,
|
|
25
25
|
openai_explain: false,
|
|
26
|
+
openai_search: true,
|
|
26
27
|
// Gemini - all enabled
|
|
27
28
|
gemini_brainstorm: true,
|
|
28
29
|
gemini_analyze_code: true,
|
|
@@ -43,5 +44,8 @@ export const heavyCodingProfile = {
|
|
|
43
44
|
workflow_status: false,
|
|
44
45
|
validate_workflow: false,
|
|
45
46
|
validate_workflow_file: false,
|
|
47
|
+
list_prompt_techniques: true,
|
|
48
|
+
preview_prompt_technique: true,
|
|
49
|
+
execute_prompt_technique: true,
|
|
46
50
|
}
|
|
47
51
|
};
|
|
@@ -19,6 +19,7 @@ export const minimalProfile = {
|
|
|
19
19
|
openai_brainstorm: false,
|
|
20
20
|
openai_code_review: false,
|
|
21
21
|
openai_explain: false,
|
|
22
|
+
openai_search: false,
|
|
22
23
|
gemini_brainstorm: true,
|
|
23
24
|
gemini_analyze_code: false,
|
|
24
25
|
gemini_analyze_text: false,
|
|
@@ -36,5 +37,8 @@ export const minimalProfile = {
|
|
|
36
37
|
workflow_status: false,
|
|
37
38
|
validate_workflow: false,
|
|
38
39
|
validate_workflow_file: false,
|
|
40
|
+
list_prompt_techniques: true,
|
|
41
|
+
preview_prompt_technique: false,
|
|
42
|
+
execute_prompt_technique: false,
|
|
39
43
|
}
|
|
40
44
|
};
|
|
@@ -19,6 +19,7 @@ export const researchPowerProfile = {
|
|
|
19
19
|
openai_brainstorm: true,
|
|
20
20
|
openai_code_review: false,
|
|
21
21
|
openai_explain: false,
|
|
22
|
+
openai_search: true,
|
|
22
23
|
gemini_brainstorm: true,
|
|
23
24
|
gemini_analyze_code: false,
|
|
24
25
|
gemini_analyze_text: false,
|
|
@@ -36,5 +37,8 @@ export const researchPowerProfile = {
|
|
|
36
37
|
workflow_status: false,
|
|
37
38
|
validate_workflow: false,
|
|
38
39
|
validate_workflow_file: false,
|
|
40
|
+
list_prompt_techniques: true,
|
|
41
|
+
preview_prompt_technique: true,
|
|
42
|
+
execute_prompt_technique: true,
|
|
39
43
|
}
|
|
40
44
|
};
|
|
@@ -6,34 +6,66 @@ export class PromptEngineerLite {
|
|
|
6
6
|
['alt_view', (q) => `"${q}" from 5 angles: child, scientist, artist, strategist, futurist.`],
|
|
7
7
|
['creative_use', (q, c) => `Creative applications of "${q}"${c ? ' findings' : ''} across domains.`],
|
|
8
8
|
['innovate', (q) => `Generate creative, unconventional solutions for "${q}". Consider multiple approaches: rethinking existing processes, drawing inspiration from other domains, removing constraints, and combining different methods. Provide 3+ novel, practical approaches.`],
|
|
9
|
-
// Research
|
|
9
|
+
// Research
|
|
10
10
|
['investigate', (q) => `5W1H analysis of "${q}": Who/What/When/Where/Why/How + recent developments.`],
|
|
11
|
-
['evidence', (q,
|
|
11
|
+
['evidence', (q, _c) => `Evidence for "${q}": support, contradict, cases, stats, experts.`],
|
|
12
12
|
// Analytical
|
|
13
|
-
['analyze', (q,
|
|
13
|
+
['analyze', (q, _c) => `"${q}" systematic: components→relationships→patterns→strengths/risks→conclusions.`],
|
|
14
14
|
['first_prin', (q) => `"${q}" first principles: truths→assumptions→atomic units→rebuild.`],
|
|
15
|
-
['feasible', (q,
|
|
15
|
+
['feasible', (q, _c) => `"${q}" feasibility: technical/economic/time/resources/risks/metrics.`],
|
|
16
16
|
// Reflective
|
|
17
|
-
['reflect', (q,
|
|
18
|
-
['patterns', (q,
|
|
17
|
+
['reflect', (q, _c) => `"${q}" reflection: patterns, surprises, key insight, gaps, next steps.`],
|
|
18
|
+
['patterns', (q, _c) => `"${q}" patterns: themes, causality, cycles, anomalies, system insights.`],
|
|
19
19
|
['decompose', (q) => `"${q}" breakdown: core→sub-problems→dependencies→constraints→steps.`],
|
|
20
|
-
['integrate', (q) => `"${q}" synthesis: convergent themes, complements, contradictions, meta-pattern.`]
|
|
20
|
+
['integrate', (q) => `"${q}" synthesis: convergent themes, complements, contradictions, meta-pattern.`],
|
|
21
|
+
// Reasoning (2025-2026 patterns)
|
|
22
|
+
['chain_of_thought', (q) => `Think step-by-step about "${q}": 1) Identify the core question, 2) Break into sub-problems, 3) Apply logical reasoning to each, 4) Synthesize conclusion.`],
|
|
23
|
+
['tree_of_thoughts', (q) => `For "${q}": Branch into 3 distinct solution paths, explore each path's implications, evaluate pros/cons, prune weak branches, synthesize best elements.`],
|
|
24
|
+
['graph_of_thoughts', (q) => `Map "${q}" as an idea graph: identify key concept nodes, draw connection edges (supports/contradicts/depends), find feedback loops and central hubs.`],
|
|
25
|
+
// Verification
|
|
26
|
+
['self_consistency', (q) => `For "${q}": Generate 3 independent solutions, compare approaches, identify consensus points, vote on best answer, explain confidence level.`],
|
|
27
|
+
['constitutional', (q) => `Solve "${q}", then critique your answer against: accuracy (is it factually correct?), safety (any risks?), helpfulness (does it address the need?). Revise based on critique.`],
|
|
28
|
+
// Meta
|
|
29
|
+
['meta_prompting', (q) => `First, write a better prompt for "${q}" that would get a more useful response. Then, answer using that improved prompt.`],
|
|
30
|
+
// Debate
|
|
31
|
+
['adversarial', (q) => `For "${q}": First argue strongly FOR this position with best evidence. Then argue strongly AGAINST with counterarguments. Finally, synthesize a balanced view.`],
|
|
32
|
+
['persona_simulation', (q) => `Simulate expert debate on "${q}": Have a skeptic raise concerns, an optimist highlight benefits, a pragmatist focus on implementation, and a visionary explore possibilities. Synthesize insights.`]
|
|
21
33
|
]);
|
|
22
|
-
// Compact technique mapping
|
|
34
|
+
// Compact technique mapping (aliases to canonical names)
|
|
23
35
|
this.techniqueMap = {
|
|
36
|
+
// Existing aliases
|
|
24
37
|
'what_if_speculation': 'what_if',
|
|
25
38
|
'alternative_perspectives': 'alt_view',
|
|
39
|
+
'perspectives': 'alt_view',
|
|
26
40
|
'creative_applications': 'creative_use',
|
|
41
|
+
'applications': 'creative_use',
|
|
27
42
|
'innovative_solutions': 'innovate',
|
|
43
|
+
'solutions': 'innovate',
|
|
28
44
|
'comprehensive_investigation': 'investigate',
|
|
45
|
+
'5w1h': 'investigate',
|
|
29
46
|
'evidence_gathering': 'evidence',
|
|
47
|
+
'facts': 'evidence',
|
|
30
48
|
'systematic_analysis': 'analyze',
|
|
49
|
+
'systematic': 'analyze',
|
|
31
50
|
'first_principles': 'first_prin',
|
|
32
51
|
'feasibility_analysis': 'feasible',
|
|
52
|
+
'feasibility': 'feasible',
|
|
33
53
|
'quick_reflection': 'reflect',
|
|
34
54
|
'pattern_recognition': 'patterns',
|
|
55
|
+
'connections': 'patterns',
|
|
35
56
|
'problem_decomposition': 'decompose',
|
|
36
|
-
'
|
|
57
|
+
'breakdown': 'decompose',
|
|
58
|
+
'integration_reflection': 'integrate',
|
|
59
|
+
'synthesize': 'integrate',
|
|
60
|
+
// New technique aliases (2025-2026)
|
|
61
|
+
'step_by_step': 'chain_of_thought',
|
|
62
|
+
'explore_paths': 'tree_of_thoughts',
|
|
63
|
+
'idea_map': 'graph_of_thoughts',
|
|
64
|
+
'consensus': 'self_consistency',
|
|
65
|
+
'principles': 'constitutional',
|
|
66
|
+
'improve_prompt': 'meta_prompting',
|
|
67
|
+
'critic': 'adversarial',
|
|
68
|
+
'debate': 'persona_simulation'
|
|
37
69
|
};
|
|
38
70
|
}
|
|
39
71
|
applyTechnique(tool, technique, query, prev) {
|
|
@@ -58,19 +90,35 @@ export class PromptEngineerLite {
|
|
|
58
90
|
}
|
|
59
91
|
getTechniqueDescription(technique) {
|
|
60
92
|
const desc = {
|
|
93
|
+
// Creative
|
|
61
94
|
'what_if': 'What if...',
|
|
62
95
|
'alt_view': 'Multi-angle',
|
|
63
96
|
'creative_use': 'Applications',
|
|
64
97
|
'innovate': 'Innovation',
|
|
98
|
+
// Research
|
|
65
99
|
'investigate': '5W1H',
|
|
66
100
|
'evidence': 'Evidence',
|
|
101
|
+
// Analytical
|
|
67
102
|
'analyze': 'Analysis',
|
|
68
103
|
'first_prin': 'First principles',
|
|
69
104
|
'feasible': 'Feasibility',
|
|
105
|
+
// Reflective
|
|
70
106
|
'reflect': 'Reflection',
|
|
71
107
|
'patterns': 'Patterns',
|
|
72
108
|
'decompose': 'Breakdown',
|
|
73
|
-
'integrate': 'Synthesis'
|
|
109
|
+
'integrate': 'Synthesis',
|
|
110
|
+
// Reasoning (2025-2026)
|
|
111
|
+
'chain_of_thought': 'Step-by-step',
|
|
112
|
+
'tree_of_thoughts': 'Explore paths',
|
|
113
|
+
'graph_of_thoughts': 'Idea map',
|
|
114
|
+
// Verification
|
|
115
|
+
'self_consistency': 'Consensus',
|
|
116
|
+
'constitutional': 'Principles check',
|
|
117
|
+
// Meta
|
|
118
|
+
'meta_prompting': 'Improve prompt',
|
|
119
|
+
// Debate
|
|
120
|
+
'adversarial': 'Pro/Con',
|
|
121
|
+
'persona_simulation': 'Expert debate'
|
|
74
122
|
};
|
|
75
123
|
const key = this.techniqueMap[technique] || technique;
|
|
76
124
|
return desc[key] || technique;
|
package/dist/src/server.js
CHANGED
|
@@ -72,6 +72,7 @@ import { isOpenAIAvailable, getAllOpenAITools } from "./tools/openai-tools.js";
|
|
|
72
72
|
import { isGeminiAvailable, geminiBrainstormTool, geminiAnalyzeCodeTool } from "./tools/gemini-tools.js";
|
|
73
73
|
import { isOpenRouterAvailable } from "./tools/openrouter-tools.js";
|
|
74
74
|
import { getTachiTools } from "./tools/tachi-tool.js";
|
|
75
|
+
import { getPromptTechniqueTools } from "./tools/prompt-technique-tools.js";
|
|
75
76
|
// import { registerGPT5Tools, isGPT5Available } from "./tools/openai-gpt5-fixed.js"; // DISABLED - using regular openai-tools.ts
|
|
76
77
|
import { initializeOptimizations } from "./optimization/index.js";
|
|
77
78
|
import { FocusModeRegistry } from "./application/services/focus/FocusModeRegistry.js";
|
|
@@ -609,6 +610,12 @@ async function initializeServer() {
|
|
|
609
610
|
safeAddTool(tool);
|
|
610
611
|
});
|
|
611
612
|
console.error(`✅ Registered tachi tools (tachi, focus alias)`);
|
|
613
|
+
// Register prompt technique tools (transparent prompt engineering)
|
|
614
|
+
const promptTechniqueTools = getPromptTechniqueTools();
|
|
615
|
+
promptTechniqueTools.forEach(tool => {
|
|
616
|
+
safeAddTool(tool);
|
|
617
|
+
});
|
|
618
|
+
console.error(`✅ Registered ${promptTechniqueTools.length} prompt technique tools`);
|
|
612
619
|
// Log startup information
|
|
613
620
|
const perplexityCount = isPerplexityAvailable() ? getAllPerplexityTools().length : 0;
|
|
614
621
|
const grokCount = isGrokAvailable() ? getAllGrokTools().length : 0;
|
|
@@ -15,10 +15,10 @@ const testArchitect = new TestArchitect();
|
|
|
15
15
|
// Auditor Tool
|
|
16
16
|
export const auditorTool = {
|
|
17
17
|
name: "auditor",
|
|
18
|
-
description:
|
|
18
|
+
description: "Evidence-based audit. Put the CONTEXT in the 'context' parameter.",
|
|
19
19
|
parameters: z.object({
|
|
20
|
-
context: z.string(),
|
|
21
|
-
evidenceRequired: z.boolean().optional()
|
|
20
|
+
context: z.string().describe("What to audit (REQUIRED - put your audit request here)"),
|
|
21
|
+
evidenceRequired: z.boolean().optional().describe("Require evidence for claims")
|
|
22
22
|
}),
|
|
23
23
|
execute: async (args, { log }) => {
|
|
24
24
|
log.info("Starting audit");
|
|
@@ -35,13 +35,13 @@ export const auditorTool = {
|
|
|
35
35
|
// Commit Guardian Tool
|
|
36
36
|
export const commitGuardianTool = {
|
|
37
37
|
name: "commit_guardian",
|
|
38
|
-
description:
|
|
38
|
+
description: "Pre-commit validation. Put the CONTEXT in the 'context' parameter.",
|
|
39
39
|
parameters: z.object({
|
|
40
|
-
context: z.string(),
|
|
41
|
-
strict: z.boolean().optional(),
|
|
42
|
-
checkSecurity: z.boolean().optional(),
|
|
43
|
-
checkQuality: z.boolean().optional(),
|
|
44
|
-
checkTests: z.boolean().optional()
|
|
40
|
+
context: z.string().describe("Code changes to validate (REQUIRED - put your diff/changes here)"),
|
|
41
|
+
strict: z.boolean().optional().describe("Use strict validation rules"),
|
|
42
|
+
checkSecurity: z.boolean().optional().describe("Check for security issues"),
|
|
43
|
+
checkQuality: z.boolean().optional().describe("Check code quality"),
|
|
44
|
+
checkTests: z.boolean().optional().describe("Check test coverage")
|
|
45
45
|
}),
|
|
46
46
|
execute: async (args, { log }) => {
|
|
47
47
|
log.info("Validating commit");
|
|
@@ -62,18 +62,14 @@ export const commitGuardianTool = {
|
|
|
62
62
|
// Architect Tool
|
|
63
63
|
export const architectTool = {
|
|
64
64
|
name: "architect",
|
|
65
|
-
description:
|
|
66
|
-
|
|
67
|
-
Parameters:
|
|
68
|
-
- query (required): What to analyze in the codebase
|
|
69
|
-
- path (optional): Path to codebase
|
|
70
|
-
- depth (optional, default: normal): shallow|normal|deep
|
|
71
|
-
- focusAreas (optional): Specific areas to focus on`,
|
|
65
|
+
description: "Full codebase analysis. Put your QUERY in the 'query' parameter.",
|
|
72
66
|
parameters: z.object({
|
|
73
|
-
query: z.string(),
|
|
74
|
-
path: z.string().optional(),
|
|
75
|
-
depth: z.enum(["shallow", "normal", "deep"])
|
|
76
|
-
|
|
67
|
+
query: z.string().describe("What to analyze in the codebase (REQUIRED - put your question here)"),
|
|
68
|
+
path: z.string().optional().describe("Path to the codebase to analyze"),
|
|
69
|
+
depth: z.enum(["shallow", "normal", "deep"])
|
|
70
|
+
.optional()
|
|
71
|
+
.describe("Analysis depth - must be one of: shallow, normal, deep"),
|
|
72
|
+
focusAreas: z.array(z.string()).optional().describe("Specific areas to focus on")
|
|
77
73
|
}),
|
|
78
74
|
execute: async (args, { log }) => {
|
|
79
75
|
log.info("Starting architecture analysis", {
|
|
@@ -98,13 +94,17 @@ Parameters:
|
|
|
98
94
|
// Code Reviewer Tool
|
|
99
95
|
export const codeReviewerTool = {
|
|
100
96
|
name: "code_reviewer",
|
|
101
|
-
description:
|
|
97
|
+
description: "Code review. Put the CODE in the 'code' parameter, NOT in 'focusAreas' or 'severity'.",
|
|
102
98
|
parameters: z.object({
|
|
103
|
-
code: z.string(),
|
|
104
|
-
language: z.string().optional(),
|
|
105
|
-
focusAreas: z.array(z.enum(['security', 'performance', 'readability', 'bugs', 'best-practices']))
|
|
106
|
-
|
|
107
|
-
|
|
99
|
+
code: z.string().describe("The actual source code to review (REQUIRED - put your code here)"),
|
|
100
|
+
language: z.string().optional().describe("Programming language (e.g., 'typescript', 'python')"),
|
|
101
|
+
focusAreas: z.array(z.enum(['security', 'performance', 'readability', 'bugs', 'best-practices']))
|
|
102
|
+
.optional()
|
|
103
|
+
.describe("Focus areas - array of: security, performance, readability, bugs, best-practices"),
|
|
104
|
+
severity: z.enum(['low', 'medium', 'high'])
|
|
105
|
+
.optional()
|
|
106
|
+
.describe("Minimum severity to report - must be one of: low, medium, high"),
|
|
107
|
+
model: z.string().optional().describe("Model to use for review")
|
|
108
108
|
}),
|
|
109
109
|
execute: async (args, { log }) => {
|
|
110
110
|
log.info("Starting code review", {
|
|
@@ -128,13 +128,17 @@ export const codeReviewerTool = {
|
|
|
128
128
|
// Documentation Writer Tool
|
|
129
129
|
export const documentationWriterTool = {
|
|
130
130
|
name: "documentation_writer",
|
|
131
|
-
description:
|
|
131
|
+
description: "Documentation generation. Put the CODE in the 'code' parameter.",
|
|
132
132
|
parameters: z.object({
|
|
133
|
-
code: z.string(),
|
|
134
|
-
style: z.enum(['narrative', 'technical', 'beginner-friendly', 'api-reference'])
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
133
|
+
code: z.string().describe("The source code to document (REQUIRED - put your code here)"),
|
|
134
|
+
style: z.enum(['narrative', 'technical', 'beginner-friendly', 'api-reference'])
|
|
135
|
+
.optional()
|
|
136
|
+
.describe("Documentation style - must be one of: narrative, technical, beginner-friendly, api-reference"),
|
|
137
|
+
includeExamples: z.boolean().optional().describe("Include usage examples"),
|
|
138
|
+
generateToc: z.boolean().optional().describe("Generate table of contents"),
|
|
139
|
+
format: z.enum(['markdown', 'html', 'plain'])
|
|
140
|
+
.optional()
|
|
141
|
+
.describe("Output format - must be one of: markdown, html, plain")
|
|
138
142
|
}),
|
|
139
143
|
execute: async (args, { log }) => {
|
|
140
144
|
log.info("Generating documentation", {
|
|
@@ -159,13 +163,19 @@ export const documentationWriterTool = {
|
|
|
159
163
|
// Test Architect Tool
|
|
160
164
|
export const testArchitectTool = {
|
|
161
165
|
name: "test_architect",
|
|
162
|
-
description:
|
|
166
|
+
description: "Test suite design. Put the CODE in the 'code' parameter.",
|
|
163
167
|
parameters: z.object({
|
|
164
|
-
code: z.string(),
|
|
165
|
-
testFramework: z.enum(['jest', 'mocha', 'vitest', 'cypress', 'playwright'])
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
168
|
+
code: z.string().describe("The source code to create tests for (REQUIRED - put your code here)"),
|
|
169
|
+
testFramework: z.enum(['jest', 'mocha', 'vitest', 'cypress', 'playwright'])
|
|
170
|
+
.optional()
|
|
171
|
+
.describe("Test framework - must be one of: jest, mocha, vitest, cypress, playwright"),
|
|
172
|
+
testTypes: z.array(z.enum(['unit', 'integration', 'e2e', 'performance', 'security']))
|
|
173
|
+
.optional()
|
|
174
|
+
.describe("Types of tests - array of: unit, integration, e2e, performance, security"),
|
|
175
|
+
coverage: z.enum(['basic', 'thorough', 'comprehensive'])
|
|
176
|
+
.optional()
|
|
177
|
+
.describe("Coverage level - must be one of: basic, thorough, comprehensive"),
|
|
178
|
+
generateMocks: z.boolean().optional().describe("Generate mock implementations")
|
|
169
179
|
}),
|
|
170
180
|
execute: async (args, { log }) => {
|
|
171
181
|
log.info("Architecting test suite", {
|
|
@@ -342,13 +342,15 @@ export class ClaudeCodeIntegration {
|
|
|
342
342
|
// Export the tool for MCP registration
|
|
343
343
|
export const claudeIntegrationTool = {
|
|
344
344
|
name: 'think',
|
|
345
|
-
description: 'Log reasoning',
|
|
345
|
+
description: 'Log reasoning. Put your THOUGHT in the thought/prompt/content parameter.',
|
|
346
346
|
inputSchema: z.object({
|
|
347
|
-
thought: z.string().optional(),
|
|
348
|
-
prompt: z.string().optional(),
|
|
349
|
-
content: z.string().optional(),
|
|
350
|
-
context: z.any().optional(),
|
|
351
|
-
mode: z.enum(['analyze', 'plan', 'synthesize', 'reflect'])
|
|
347
|
+
thought: z.string().optional().describe("The thought or reasoning to log (put your reasoning here)"),
|
|
348
|
+
prompt: z.string().optional().describe("Alternative: the prompt to process"),
|
|
349
|
+
content: z.string().optional().describe("Alternative: the content to process"),
|
|
350
|
+
context: z.any().optional().describe("Additional context for the reasoning"),
|
|
351
|
+
mode: z.enum(['analyze', 'plan', 'synthesize', 'reflect'])
|
|
352
|
+
.optional()
|
|
353
|
+
.describe("Reasoning mode - must be one of: analyze, plan, synthesize, reflect")
|
|
352
354
|
}),
|
|
353
355
|
execute: async (args, context) => {
|
|
354
356
|
const integration = new ClaudeCodeIntegration();
|
|
@@ -155,10 +155,13 @@ export async function callGemini(prompt, model = GEMINI_MODELS.GEMINI_3_PRO, sys
|
|
|
155
155
|
*/
|
|
156
156
|
export const geminiQueryTool = {
|
|
157
157
|
name: "gemini_query",
|
|
158
|
-
description: "Query Gemini",
|
|
158
|
+
description: "Query Gemini. Put your PROMPT in the 'prompt' parameter.",
|
|
159
159
|
parameters: z.object({
|
|
160
|
-
prompt: z.string(),
|
|
161
|
-
model: z.enum(["gemini-3", "pro", "flash"])
|
|
160
|
+
prompt: z.string().describe("Your question or request (REQUIRED - put your question here)"),
|
|
161
|
+
model: z.enum(["gemini-3", "pro", "flash"])
|
|
162
|
+
.optional()
|
|
163
|
+
.default("gemini-3")
|
|
164
|
+
.describe("Model variant - must be one of: gemini-3 (default), pro, flash")
|
|
162
165
|
}),
|
|
163
166
|
execute: async (args, { log }) => {
|
|
164
167
|
let model = GEMINI_MODELS.GEMINI_3_PRO; // Default to Gemini 3
|
|
@@ -181,11 +184,11 @@ export const geminiQueryTool = {
|
|
|
181
184
|
*/
|
|
182
185
|
export const geminiBrainstormTool = {
|
|
183
186
|
name: "gemini_brainstorm",
|
|
184
|
-
description: "Brainstorming",
|
|
187
|
+
description: "Brainstorming. Put your PROMPT in the 'prompt' parameter.",
|
|
185
188
|
parameters: z.object({
|
|
186
|
-
prompt: z.string(),
|
|
187
|
-
claudeThoughts: z.string().optional(),
|
|
188
|
-
maxRounds: z.number().optional().default(1)
|
|
189
|
+
prompt: z.string().describe("The topic or problem to brainstorm about (REQUIRED - put your topic here)"),
|
|
190
|
+
claudeThoughts: z.string().optional().describe("Claude's initial thoughts to build upon"),
|
|
191
|
+
maxRounds: z.number().optional().default(1).describe("Number of brainstorming rounds (default: 1)")
|
|
189
192
|
}),
|
|
190
193
|
execute: async (args, { log }) => {
|
|
191
194
|
const systemPrompt = `Creative brainstorming partner.
|
|
@@ -205,11 +208,11 @@ ${FORMAT_INSTRUCTION}`;
|
|
|
205
208
|
*/
|
|
206
209
|
export const geminiAnalyzeCodeTool = {
|
|
207
210
|
name: "gemini_analyze_code",
|
|
208
|
-
description: "
|
|
211
|
+
description: "Analyze code for bugs, quality, security, or performance issues. Put the CODE in the 'code' parameter, NOT in 'focus'.",
|
|
209
212
|
parameters: z.object({
|
|
210
|
-
code: z.string(),
|
|
211
|
-
language: z.string().optional(),
|
|
212
|
-
focus: z.enum(["quality", "security", "performance", "bugs", "general"]).optional().default("general")
|
|
213
|
+
code: z.string().describe("The actual source code to analyze (REQUIRED - put your code here)"),
|
|
214
|
+
language: z.string().optional().describe("Programming language (e.g., 'typescript', 'python')"),
|
|
215
|
+
focus: z.enum(["quality", "security", "performance", "bugs", "general"]).optional().default("general").describe("Analysis focus area - must be one of: quality, security, performance, bugs, general")
|
|
213
216
|
}),
|
|
214
217
|
execute: async (args, { log }) => {
|
|
215
218
|
const focusPrompts = {
|
|
@@ -233,10 +236,13 @@ ${FORMAT_INSTRUCTION}`;
|
|
|
233
236
|
*/
|
|
234
237
|
export const geminiAnalyzeTextTool = {
|
|
235
238
|
name: "gemini_analyze_text",
|
|
236
|
-
description: "Text analysis",
|
|
239
|
+
description: "Text analysis. Put the TEXT in the 'text' parameter, NOT in 'type'.",
|
|
237
240
|
parameters: z.object({
|
|
238
|
-
text: z.string(),
|
|
239
|
-
type: z.enum(["sentiment", "summary", "entities", "key-points", "general"])
|
|
241
|
+
text: z.string().describe("The text to analyze (REQUIRED - put your text here)"),
|
|
242
|
+
type: z.enum(["sentiment", "summary", "entities", "key-points", "general"])
|
|
243
|
+
.optional()
|
|
244
|
+
.default("general")
|
|
245
|
+
.describe("Analysis type - must be one of: sentiment, summary, entities, key-points, general")
|
|
240
246
|
}),
|
|
241
247
|
execute: async (args, { log }) => {
|
|
242
248
|
const analysisPrompts = {
|
|
@@ -259,11 +265,17 @@ ${FORMAT_INSTRUCTION}`;
|
|
|
259
265
|
*/
|
|
260
266
|
export const geminiSummarizeTool = {
|
|
261
267
|
name: "gemini_summarize",
|
|
262
|
-
description: "Summarization",
|
|
268
|
+
description: "Summarization. Put the CONTENT in the 'content' parameter.",
|
|
263
269
|
parameters: z.object({
|
|
264
|
-
content: z.string(),
|
|
265
|
-
length: z.enum(["brief", "moderate", "detailed"])
|
|
266
|
-
|
|
270
|
+
content: z.string().describe("The content to summarize (REQUIRED - put your text here)"),
|
|
271
|
+
length: z.enum(["brief", "moderate", "detailed"])
|
|
272
|
+
.optional()
|
|
273
|
+
.default("moderate")
|
|
274
|
+
.describe("Summary length - must be one of: brief, moderate, detailed"),
|
|
275
|
+
format: z.enum(["paragraph", "bullet-points", "outline"])
|
|
276
|
+
.optional()
|
|
277
|
+
.default("paragraph")
|
|
278
|
+
.describe("Output format - must be one of: paragraph, bullet-points, outline")
|
|
267
279
|
}),
|
|
268
280
|
execute: async (args, { log }) => {
|
|
269
281
|
const lengthGuides = {
|
|
@@ -295,12 +307,12 @@ ${FORMAT_INSTRUCTION}`;
|
|
|
295
307
|
*/
|
|
296
308
|
export const geminiImagePromptTool = {
|
|
297
309
|
name: "gemini_image_prompt",
|
|
298
|
-
description: "Image prompt generation",
|
|
310
|
+
description: "Image prompt generation. Put the DESCRIPTION in the 'description' parameter.",
|
|
299
311
|
parameters: z.object({
|
|
300
|
-
description: z.string(),
|
|
301
|
-
style: z.string().optional(),
|
|
302
|
-
mood: z.string().optional(),
|
|
303
|
-
details: z.string().optional()
|
|
312
|
+
description: z.string().describe("What you want in the image (REQUIRED - describe the image)"),
|
|
313
|
+
style: z.string().optional().describe("Artistic style (e.g., 'watercolor', 'photorealistic')"),
|
|
314
|
+
mood: z.string().optional().describe("Mood or atmosphere (e.g., 'serene', 'dramatic')"),
|
|
315
|
+
details: z.string().optional().describe("Additional details to include")
|
|
304
316
|
}),
|
|
305
317
|
execute: async (args, { log }) => {
|
|
306
318
|
const systemPrompt = `You are an expert at creating detailed image generation prompts.
|
|
@@ -122,12 +122,14 @@ forceVisibleOutput = true, validationContext = 'llm-orchestration') {
|
|
|
122
122
|
*/
|
|
123
123
|
export const grokReasonTool = {
|
|
124
124
|
name: "grok_reason",
|
|
125
|
-
description: "Deep reasoning",
|
|
125
|
+
description: "Deep reasoning. Put your PROBLEM or QUESTION in the 'problem' parameter.",
|
|
126
126
|
parameters: z.object({
|
|
127
|
-
problem: z.string(),
|
|
128
|
-
approach: z.enum(["analytical", "creative", "systematic", "first-principles"])
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
problem: z.string().describe("The problem or question to reason about (REQUIRED - put your question here)"),
|
|
128
|
+
approach: z.enum(["analytical", "creative", "systematic", "first-principles"])
|
|
129
|
+
.optional()
|
|
130
|
+
.describe("Reasoning approach - must be one of: analytical, creative, systematic, first-principles"),
|
|
131
|
+
context: z.string().optional().describe("Additional context for the problem"),
|
|
132
|
+
useHeavy: z.boolean().optional().describe("Use expensive Grok 4 Heavy model ($3/$15) for complex tasks")
|
|
131
133
|
}),
|
|
132
134
|
execute: async (args, { log }) => {
|
|
133
135
|
const { problem, approach = "first-principles", context, useHeavy } = args;
|
|
@@ -164,12 +166,13 @@ ${FORMAT_INSTRUCTION}`
|
|
|
164
166
|
*/
|
|
165
167
|
export const grokCodeTool = {
|
|
166
168
|
name: "grok_code",
|
|
167
|
-
description: "Code analysis",
|
|
169
|
+
description: "Code analysis. Put the CODE in the 'code' parameter, NOT in 'task'.",
|
|
168
170
|
parameters: z.object({
|
|
169
|
-
task: z.enum(["analyze", "optimize", "debug", "review", "refactor"])
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
task: z.enum(["analyze", "optimize", "debug", "review", "refactor"])
|
|
172
|
+
.describe("Code task - must be one of: analyze, optimize, debug, review, refactor"),
|
|
173
|
+
code: z.string().describe("The actual source code to analyze (REQUIRED - put your code here)"),
|
|
174
|
+
language: z.string().optional().describe("Programming language (e.g., 'typescript', 'python')"),
|
|
175
|
+
requirements: z.string().optional().describe("Specific requirements or focus areas")
|
|
173
176
|
}),
|
|
174
177
|
execute: async (args, { log }) => {
|
|
175
178
|
const { task, code, language, requirements } = args;
|
|
@@ -205,12 +208,12 @@ ${FORMAT_INSTRUCTION}`
|
|
|
205
208
|
*/
|
|
206
209
|
export const grokDebugTool = {
|
|
207
210
|
name: "grok_debug",
|
|
208
|
-
description: "Debug assistance",
|
|
211
|
+
description: "Debug assistance. Describe the ISSUE in the 'issue' parameter.",
|
|
209
212
|
parameters: z.object({
|
|
210
|
-
issue: z.string(),
|
|
211
|
-
code: z.string().optional(),
|
|
212
|
-
error: z.string().optional(),
|
|
213
|
-
context: z.string().optional()
|
|
213
|
+
issue: z.string().describe("Description of the issue or bug (REQUIRED - put your problem here)"),
|
|
214
|
+
code: z.string().optional().describe("Relevant code that has the issue"),
|
|
215
|
+
error: z.string().optional().describe("Error message or stack trace"),
|
|
216
|
+
context: z.string().optional().describe("Additional context about the environment or conditions")
|
|
214
217
|
}),
|
|
215
218
|
execute: async (args, { log }) => {
|
|
216
219
|
const { issue, code, error, context } = args;
|
|
@@ -251,11 +254,13 @@ ${FORMAT_INSTRUCTION}`
|
|
|
251
254
|
*/
|
|
252
255
|
export const grokArchitectTool = {
|
|
253
256
|
name: "grok_architect",
|
|
254
|
-
description: "Architecture design",
|
|
257
|
+
description: "Architecture design. Put your REQUIREMENTS in the 'requirements' parameter.",
|
|
255
258
|
parameters: z.object({
|
|
256
|
-
requirements: z.string(),
|
|
257
|
-
constraints: z.string().optional(),
|
|
258
|
-
scale: z.enum(["small", "medium", "large", "enterprise"])
|
|
259
|
+
requirements: z.string().describe("The architecture requirements or design question (REQUIRED - put your question here)"),
|
|
260
|
+
constraints: z.string().optional().describe("Technical or business constraints to consider"),
|
|
261
|
+
scale: z.enum(["small", "medium", "large", "enterprise"])
|
|
262
|
+
.optional()
|
|
263
|
+
.describe("Expected scale - must be one of: small, medium, large, enterprise")
|
|
259
264
|
}),
|
|
260
265
|
execute: async (args, { log }) => {
|
|
261
266
|
const { requirements, constraints, scale } = args;
|
|
@@ -284,12 +289,12 @@ ${FORMAT_INSTRUCTION}`
|
|
|
284
289
|
*/
|
|
285
290
|
export const grokBrainstormTool = {
|
|
286
291
|
name: "grok_brainstorm",
|
|
287
|
-
description: "Creative brainstorming",
|
|
292
|
+
description: "Creative brainstorming. Put your TOPIC in the 'topic' parameter.",
|
|
288
293
|
parameters: z.object({
|
|
289
|
-
topic: z.string(),
|
|
290
|
-
constraints: z.string().optional(),
|
|
291
|
-
numIdeas: z.number().optional(),
|
|
292
|
-
forceHeavy: z.boolean().optional()
|
|
294
|
+
topic: z.string().describe("The topic to brainstorm about (REQUIRED - put your idea/topic here)"),
|
|
295
|
+
constraints: z.string().optional().describe("Any constraints or requirements to consider"),
|
|
296
|
+
numIdeas: z.number().optional().describe("Number of ideas to generate (default: 5)"),
|
|
297
|
+
forceHeavy: z.boolean().optional().describe("Use expensive Grok 4 Heavy model ($3/$15) for deeper creativity")
|
|
293
298
|
}),
|
|
294
299
|
execute: async (args, { log }) => {
|
|
295
300
|
const { topic, constraints, numIdeas = 5, forceHeavy = false } = args; // Changed: Default to cheap model
|