mcp-server-gemini 1.1.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/CHANGELOG.md +155 -0
- package/LICENSE +21 -0
- package/README.md +180 -0
- package/dist/config/constants.js +71 -0
- package/dist/config/constants.js.map +1 -0
- package/dist/config/models.js +121 -0
- package/dist/config/models.js.map +1 -0
- package/dist/enhanced-stdio-server.js +1164 -0
- package/dist/enhanced-stdio-server.js.map +1 -0
- package/dist/i18n.js +109 -0
- package/dist/i18n.js.map +1 -0
- package/dist/server.js +251 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/analyze-codebase.js +373 -0
- package/dist/tools/analyze-codebase.js.map +1 -0
- package/dist/tools/analyze-content.js +295 -0
- package/dist/tools/analyze-content.js.map +1 -0
- package/dist/tools/brainstorm.js +237 -0
- package/dist/tools/brainstorm.js.map +1 -0
- package/dist/tools/definitions.js +375 -0
- package/dist/tools/definitions.js.map +1 -0
- package/dist/tools/fix-ui.js +262 -0
- package/dist/tools/fix-ui.js.map +1 -0
- package/dist/tools/generate-ui.js +311 -0
- package/dist/tools/generate-ui.js.map +1 -0
- package/dist/tools/index.js +17 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/list-models.js +30 -0
- package/dist/tools/list-models.js.map +1 -0
- package/dist/tools/multimodal-query.js +83 -0
- package/dist/tools/multimodal-query.js.map +1 -0
- package/dist/tools/search.js +94 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/error-handler.js +69 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/file-reader.js +470 -0
- package/dist/utils/file-reader.js.map +1 -0
- package/dist/utils/gemini-client.js +184 -0
- package/dist/utils/gemini-client.js.map +1 -0
- package/dist/utils/security.js +370 -0
- package/dist/utils/security.js.map +1 -0
- package/dist/utils/validators.js +150 -0
- package/dist/utils/validators.js.map +1 -0
- package/dist/windows-utils.js +175 -0
- package/dist/windows-utils.js.map +1 -0
- package/package.json +69 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analyze-content.js","sourceRoot":"","sources":["../../src/tools/analyze-content.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,aAAa,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAe,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,iCAAiC;AACjC,MAAM,6BAA6B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAuCd,CAAC;AAuCzB;;GAEG;AACH,SAAS,iBAAiB,CAAC,OAAe,EAAE,QAAiB;IAC3D,4DAA4D;IAC5D,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,cAAc,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAEtC,0BAA0B;IAC1B,IAAI,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACrE,IAAI,CAAC;YACH,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;YAC3B,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,MAAM,CAAC;YACP,oCAAoC;QACtC,CAAC;IACH,CAAC;IAED,sBAAsB;IACtB,IAAI,cAAc,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,cAAc,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC;QAC9E,0DAA0D;QAC1D,IAAI,cAAc,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,cAAc,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YACrF,OAAO,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,EAAE,CAAC;oBACd,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;gBACpC,CAAC;gBAED,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;gBACvC,IAAI,MAAM,CAAC,OAAO;oBAAE,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;gBACpD,IAAI,MAAM,CAAC,WAAW;oBAAE,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;gBAChE,IAAI,MAAM,CAAC,MAAM;oBAAE,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;YACnD,CAAC;YAAC,MAAM,CAAC;gBACP,8CAA8C;YAChD,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAEhB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,QAAQ,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;QAClC,MAAM,cAAc,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool 7: gemini_brainstorm
|
|
3
|
+
* Creative brainstorming tool - Generate creative ideas and solutions
|
|
4
|
+
* Priority: P2 - Phase 4
|
|
5
|
+
*/
|
|
6
|
+
import { validateRequired, validateString, validateNumber } from '../utils/validators.js';
|
|
7
|
+
import { handleAPIError, logError } from '../utils/error-handler.js';
|
|
8
|
+
import { readFile, readFiles } from '../utils/file-reader.js';
|
|
9
|
+
// Brainstorming system prompt
|
|
10
|
+
const BRAINSTORM_SYSTEM_PROMPT = `You are a creative innovation consultant with expertise in:
|
|
11
|
+
- Product ideation and design thinking
|
|
12
|
+
- Problem-solving and lateral thinking
|
|
13
|
+
- Technology trends and market analysis
|
|
14
|
+
- Business strategy and innovation
|
|
15
|
+
|
|
16
|
+
Brainstorming approach:
|
|
17
|
+
1. Understand the topic and context deeply
|
|
18
|
+
2. Generate diverse ideas across different dimensions
|
|
19
|
+
3. Evaluate each idea objectively
|
|
20
|
+
4. Provide actionable details
|
|
21
|
+
|
|
22
|
+
Idea generation styles:
|
|
23
|
+
- Innovative: Push boundaries, explore emerging technologies
|
|
24
|
+
- Practical: Focus on feasibility and immediate implementation
|
|
25
|
+
- Radical: Challenge assumptions, think unconventionally
|
|
26
|
+
|
|
27
|
+
For each idea, provide:
|
|
28
|
+
- Clear, descriptive title
|
|
29
|
+
- Detailed description of the concept
|
|
30
|
+
- Pros: Benefits and advantages
|
|
31
|
+
- Cons: Challenges and limitations
|
|
32
|
+
- Feasibility: Realistic assessment (low/medium/high)
|
|
33
|
+
|
|
34
|
+
Quality requirements:
|
|
35
|
+
- Each idea should be distinct and valuable
|
|
36
|
+
- Balance creativity with practicality
|
|
37
|
+
- Consider technical, business, and user perspectives
|
|
38
|
+
- Provide specific, actionable suggestions`;
|
|
39
|
+
/**
|
|
40
|
+
* Build brainstorming prompt
|
|
41
|
+
* @param params Original parameters
|
|
42
|
+
* @param count Number of ideas
|
|
43
|
+
* @param style Style
|
|
44
|
+
* @param projectContext Project context content
|
|
45
|
+
*/
|
|
46
|
+
function buildBrainstormPrompt(params, count, style, projectContext) {
|
|
47
|
+
let prompt = `# Brainstorming Session\n\n`;
|
|
48
|
+
prompt += `## Topic\n${params.topic}\n\n`;
|
|
49
|
+
// [NEW] Add project context
|
|
50
|
+
if (projectContext) {
|
|
51
|
+
prompt += `## Project Background\n${projectContext}\n`;
|
|
52
|
+
prompt += `**Important**: Please ensure your ideas are compatible with the project's architecture and tech stack.\n\n`;
|
|
53
|
+
}
|
|
54
|
+
if (params.context) {
|
|
55
|
+
prompt += `## Additional Context\n${params.context}\n\n`;
|
|
56
|
+
}
|
|
57
|
+
prompt += `## Requirements\n`;
|
|
58
|
+
prompt += `- Generate exactly ${count} distinct ideas\n`;
|
|
59
|
+
prompt += `- Style: ${style}\n\n`;
|
|
60
|
+
prompt += `## Style Guidelines\n`;
|
|
61
|
+
switch (style) {
|
|
62
|
+
case 'innovative':
|
|
63
|
+
prompt += `Focus on innovation:
|
|
64
|
+
- Leverage emerging technologies (AI, blockchain, IoT, etc.)
|
|
65
|
+
- Explore new business models
|
|
66
|
+
- Consider future trends
|
|
67
|
+
- Push beyond conventional solutions\n\n`;
|
|
68
|
+
break;
|
|
69
|
+
case 'practical':
|
|
70
|
+
prompt += `Focus on practicality:
|
|
71
|
+
- Prioritize quick implementation
|
|
72
|
+
- Use proven technologies
|
|
73
|
+
- Consider resource constraints
|
|
74
|
+
- Focus on immediate impact\n\n`;
|
|
75
|
+
break;
|
|
76
|
+
case 'radical':
|
|
77
|
+
prompt += `Focus on radical thinking:
|
|
78
|
+
- Challenge all assumptions
|
|
79
|
+
- Explore completely new approaches
|
|
80
|
+
- Don't be limited by current constraints
|
|
81
|
+
- Think 10x, not 10%\n\n`;
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
prompt += `## Output Format
|
|
85
|
+
Provide your response as valid JSON with this exact structure:
|
|
86
|
+
{
|
|
87
|
+
"ideas": [
|
|
88
|
+
{
|
|
89
|
+
"title": "Clear, descriptive title",
|
|
90
|
+
"description": "Detailed description of the idea (2-3 sentences)",
|
|
91
|
+
"pros": ["benefit 1", "benefit 2", "benefit 3"],
|
|
92
|
+
"cons": ["challenge 1", "challenge 2"],
|
|
93
|
+
"feasibility": "low" | "medium" | "high"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
Important:
|
|
99
|
+
- Return ONLY valid JSON, no additional text
|
|
100
|
+
- Each idea must have all required fields
|
|
101
|
+
- Pros and cons should be specific and meaningful
|
|
102
|
+
- Feasibility should reflect realistic assessment`;
|
|
103
|
+
return prompt;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Parse brainstorming response
|
|
107
|
+
*/
|
|
108
|
+
function parseBrainstormResponse(response, expectedCount) {
|
|
109
|
+
try {
|
|
110
|
+
// Try to extract JSON content (may be wrapped in markdown code blocks)
|
|
111
|
+
let jsonContent = response;
|
|
112
|
+
const jsonMatch = response.match(/```(?:json)?\s*([\s\S]*?)```/);
|
|
113
|
+
if (jsonMatch) {
|
|
114
|
+
jsonContent = jsonMatch[1].trim();
|
|
115
|
+
}
|
|
116
|
+
// Try to parse directly
|
|
117
|
+
const parsed = JSON.parse(jsonContent);
|
|
118
|
+
if (parsed.ideas && Array.isArray(parsed.ideas)) {
|
|
119
|
+
// Validate and normalize each idea
|
|
120
|
+
return parsed.ideas.map((idea, index) => ({
|
|
121
|
+
title: idea.title || `Idea ${index + 1}`,
|
|
122
|
+
description: idea.description || 'No description provided',
|
|
123
|
+
pros: Array.isArray(idea.pros) ? idea.pros : ['Not specified'],
|
|
124
|
+
cons: Array.isArray(idea.cons) ? idea.cons : ['Not specified'],
|
|
125
|
+
feasibility: ['low', 'medium', 'high'].includes(idea.feasibility)
|
|
126
|
+
? idea.feasibility
|
|
127
|
+
: 'medium'
|
|
128
|
+
}));
|
|
129
|
+
}
|
|
130
|
+
// If response is in array format
|
|
131
|
+
if (Array.isArray(parsed)) {
|
|
132
|
+
return parsed.map((idea, index) => ({
|
|
133
|
+
title: idea.title || `Idea ${index + 1}`,
|
|
134
|
+
description: idea.description || 'No description provided',
|
|
135
|
+
pros: Array.isArray(idea.pros) ? idea.pros : ['Not specified'],
|
|
136
|
+
cons: Array.isArray(idea.cons) ? idea.cons : ['Not specified'],
|
|
137
|
+
feasibility: ['low', 'medium', 'high'].includes(idea.feasibility)
|
|
138
|
+
? idea.feasibility
|
|
139
|
+
: 'medium'
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
catch {
|
|
144
|
+
// JSON parsing failed, try to extract ideas from text
|
|
145
|
+
}
|
|
146
|
+
// If JSON parsing fails, create an idea containing the raw response
|
|
147
|
+
return [{
|
|
148
|
+
title: 'Brainstorm Results',
|
|
149
|
+
description: response.substring(0, 500) + (response.length > 500 ? '...' : ''),
|
|
150
|
+
pros: ['See full response for details'],
|
|
151
|
+
cons: ['Response could not be parsed as structured data'],
|
|
152
|
+
feasibility: 'medium'
|
|
153
|
+
}];
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Handle gemini_brainstorm tool invocation
|
|
157
|
+
*/
|
|
158
|
+
export async function handleBrainstorm(params, client) {
|
|
159
|
+
try {
|
|
160
|
+
// Parameter validation
|
|
161
|
+
validateRequired(params.topic, 'topic');
|
|
162
|
+
validateString(params.topic, 'topic', 5);
|
|
163
|
+
if (params.context) {
|
|
164
|
+
validateString(params.context, 'context', 5);
|
|
165
|
+
}
|
|
166
|
+
// Validate optional enum parameters
|
|
167
|
+
const validStyles = ['innovative', 'practical', 'radical'];
|
|
168
|
+
if (params.style && !validStyles.includes(params.style)) {
|
|
169
|
+
throw new Error(`Invalid style: ${params.style}. Must be one of: ${validStyles.join(', ')}`);
|
|
170
|
+
}
|
|
171
|
+
// Validate count parameter
|
|
172
|
+
if (params.count !== undefined) {
|
|
173
|
+
validateNumber(params.count, 'count', 1, 20);
|
|
174
|
+
}
|
|
175
|
+
// Set default values
|
|
176
|
+
const count = params.count || 5;
|
|
177
|
+
const style = params.style || 'innovative';
|
|
178
|
+
// [NEW] Read project context files
|
|
179
|
+
let projectContext = '';
|
|
180
|
+
const contextFilesUsed = [];
|
|
181
|
+
// Read single context file
|
|
182
|
+
if (params.contextFilePath) {
|
|
183
|
+
try {
|
|
184
|
+
const fileContent = await readFile(params.contextFilePath);
|
|
185
|
+
contextFilesUsed.push(fileContent.path);
|
|
186
|
+
projectContext += `### ${fileContent.path}\n`;
|
|
187
|
+
projectContext += fileContent.content + '\n\n';
|
|
188
|
+
}
|
|
189
|
+
catch (error) {
|
|
190
|
+
logError('brainstorm:readContextFilePath', error);
|
|
191
|
+
// Continue execution without interrupting
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
// Read multiple context files
|
|
195
|
+
if (params.contextFiles && params.contextFiles.length > 0) {
|
|
196
|
+
try {
|
|
197
|
+
const contextContents = await readFiles(params.contextFiles);
|
|
198
|
+
for (const file of contextContents) {
|
|
199
|
+
contextFilesUsed.push(file.path);
|
|
200
|
+
projectContext += `### ${file.path}\n`;
|
|
201
|
+
projectContext += file.content + '\n\n';
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
catch (error) {
|
|
205
|
+
logError('brainstorm:readContextFiles', error);
|
|
206
|
+
// Continue execution without interrupting
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
// Build prompt (with project context)
|
|
210
|
+
const prompt = buildBrainstormPrompt(params, count, style, projectContext || undefined);
|
|
211
|
+
// Call Gemini API (using default model gemini-3-pro-preview)
|
|
212
|
+
const response = await client.generate(prompt, {
|
|
213
|
+
systemInstruction: BRAINSTORM_SYSTEM_PROMPT,
|
|
214
|
+
temperature: style === 'radical' ? 0.9 : (style === 'innovative' ? 0.8 : 0.6),
|
|
215
|
+
maxTokens: 8192
|
|
216
|
+
});
|
|
217
|
+
// Parse response
|
|
218
|
+
const ideas = parseBrainstormResponse(response, count);
|
|
219
|
+
// Build return result
|
|
220
|
+
return {
|
|
221
|
+
topic: params.topic,
|
|
222
|
+
style: style,
|
|
223
|
+
ideas: ideas,
|
|
224
|
+
// [NEW] Return used context files
|
|
225
|
+
contextFilesUsed: contextFilesUsed.length > 0 ? contextFilesUsed : undefined,
|
|
226
|
+
metadata: {
|
|
227
|
+
totalIdeas: ideas.length,
|
|
228
|
+
modelUsed: client.getModel()
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
catch (error) {
|
|
233
|
+
logError('brainstorm', error);
|
|
234
|
+
throw handleAPIError(error);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
//# sourceMappingURL=brainstorm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brainstorm.js","sourceRoot":"","sources":["../../src/tools/brainstorm.ts"],"names":[],"mappings":"AAAA;;;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jB,MAAM,KAAK,GAAG,uBAAuB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QAEvD,sBAAsB;QACtB,OAAO;YACL,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,KAAK;YACZ,kCAAkC;YAClC,gBAAgB,EAAE,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS;YAC5E,QAAQ,EAAE;gBACR,UAAU,EAAE,KAAK,CAAC,MAAM;gBACxB,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE;aAC7B;SACF,CAAC;IAEJ,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAC9B,MAAM,cAAc,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP tool definitions
|
|
3
|
+
* Tool schemas compliant with MCP protocol
|
|
4
|
+
*/
|
|
5
|
+
import { TOOL_NAMES } from '../config/constants.js';
|
|
6
|
+
/**
|
|
7
|
+
* Definitions of all tools
|
|
8
|
+
*/
|
|
9
|
+
export const TOOL_DEFINITIONS = [
|
|
10
|
+
// 🎨 Tool 1: gemini_generate_ui
|
|
11
|
+
{
|
|
12
|
+
name: TOOL_NAMES.GENERATE_UI,
|
|
13
|
+
description: 'Generate HTML/CSS/JavaScript UI components from description or design image. Specializes in pixel-perfect implementations, responsive layouts, and smooth animations. Supports technology stack context for generating code that matches your project.',
|
|
14
|
+
inputSchema: {
|
|
15
|
+
type: 'object',
|
|
16
|
+
properties: {
|
|
17
|
+
description: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
description: 'Description of the UI component to generate'
|
|
20
|
+
},
|
|
21
|
+
designImage: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
description: 'Optional: Design image as file path (e.g., ./images/design.png) or Base64 data URI. File paths will be automatically converted to Base64.'
|
|
24
|
+
},
|
|
25
|
+
framework: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
enum: ['vanilla', 'react', 'vue', 'svelte'],
|
|
28
|
+
description: 'Target framework (default: vanilla)',
|
|
29
|
+
default: 'vanilla'
|
|
30
|
+
},
|
|
31
|
+
// [NEW] Tech stack context
|
|
32
|
+
techContext: {
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
cssFramework: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
enum: ['tailwind', 'bootstrap', 'styled-components', 'css-modules', 'emotion'],
|
|
38
|
+
description: 'CSS framework to use for styling'
|
|
39
|
+
},
|
|
40
|
+
uiLibrary: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
enum: ['shadcn', 'antd', 'mui', 'chakra', 'radix'],
|
|
43
|
+
description: 'UI component library to use'
|
|
44
|
+
},
|
|
45
|
+
typescript: {
|
|
46
|
+
type: 'boolean',
|
|
47
|
+
description: 'Use TypeScript with full type definitions'
|
|
48
|
+
},
|
|
49
|
+
stateManagement: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
enum: ['zustand', 'redux', 'jotai', 'recoil'],
|
|
52
|
+
description: 'State management library if needed'
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
description: 'Technology stack context for generating code that matches your project'
|
|
56
|
+
},
|
|
57
|
+
// [NEW] Configuration file path
|
|
58
|
+
configPath: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: 'Path to package.json for auto-detecting tech stack. The tool will analyze dependencies to determine CSS framework, UI library, TypeScript usage, etc.'
|
|
61
|
+
},
|
|
62
|
+
includeAnimation: {
|
|
63
|
+
type: 'boolean',
|
|
64
|
+
description: 'Include animations and transitions (default: true)',
|
|
65
|
+
default: true
|
|
66
|
+
},
|
|
67
|
+
responsive: {
|
|
68
|
+
type: 'boolean',
|
|
69
|
+
description: 'Make the UI responsive (default: true)',
|
|
70
|
+
default: true
|
|
71
|
+
},
|
|
72
|
+
style: {
|
|
73
|
+
type: 'string',
|
|
74
|
+
enum: ['modern', 'minimal', 'glassmorphism', 'neumorphism'],
|
|
75
|
+
description: 'Optional: Design style preference'
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
required: ['description']
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
// 🖼️ Tool 2: gemini_multimodal_query
|
|
82
|
+
{
|
|
83
|
+
name: TOOL_NAMES.MULTIMODAL_QUERY,
|
|
84
|
+
description: 'Query using images + text for multimodal understanding. Analyze designs, diagrams, screenshots, or any visual content with natural language questions.',
|
|
85
|
+
inputSchema: {
|
|
86
|
+
type: 'object',
|
|
87
|
+
properties: {
|
|
88
|
+
prompt: {
|
|
89
|
+
type: 'string',
|
|
90
|
+
description: 'Question or instruction about the images'
|
|
91
|
+
},
|
|
92
|
+
images: {
|
|
93
|
+
type: 'array',
|
|
94
|
+
items: { type: 'string' },
|
|
95
|
+
description: 'Images as file paths (e.g., ./images/screenshot.png) or Base64 data URIs. File paths will be automatically converted to Base64.'
|
|
96
|
+
},
|
|
97
|
+
outputFormat: {
|
|
98
|
+
type: 'string',
|
|
99
|
+
enum: ['text', 'code', 'json'],
|
|
100
|
+
description: 'Desired output format (default: text)',
|
|
101
|
+
default: 'text'
|
|
102
|
+
},
|
|
103
|
+
context: {
|
|
104
|
+
type: 'string',
|
|
105
|
+
description: 'Optional: Additional context for better understanding'
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
required: ['prompt', 'images']
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
// 🐛 Tool 3: gemini_fix_ui_from_screenshot (Visual Debug Loop)
|
|
112
|
+
{
|
|
113
|
+
name: TOOL_NAMES.FIX_UI,
|
|
114
|
+
description: `Visual Debug Loop - Identify and fix UI issues from screenshots.
|
|
115
|
+
|
|
116
|
+
Core workflow:
|
|
117
|
+
1. Analyze screenshot to identify visual problems
|
|
118
|
+
2. Cross-reference with source code to locate root cause
|
|
119
|
+
3. Generate git diff patches for precise fixes
|
|
120
|
+
|
|
121
|
+
Best practice: Provide all three inputs for optimal results:
|
|
122
|
+
- screenshot: The UI problem screenshot
|
|
123
|
+
- sourceCodePath: Main source file path
|
|
124
|
+
- issueDescription: What's wrong and expected behavior
|
|
125
|
+
|
|
126
|
+
Output: Returns git diff format patches that can be directly applied with 'git apply'.`,
|
|
127
|
+
inputSchema: {
|
|
128
|
+
type: 'object',
|
|
129
|
+
properties: {
|
|
130
|
+
screenshot: {
|
|
131
|
+
type: 'string',
|
|
132
|
+
description: 'Screenshot of the UI problem as file path (e.g., ./screenshots/bug.png) or Base64 data URI. File paths will be automatically converted to Base64.'
|
|
133
|
+
},
|
|
134
|
+
sourceCodePath: {
|
|
135
|
+
type: 'string',
|
|
136
|
+
description: '[Recommended] Path to the main source code file causing the issue (e.g., "./src/components/LoginForm.tsx"). Required for generating accurate git diff patches.'
|
|
137
|
+
},
|
|
138
|
+
relatedFiles: {
|
|
139
|
+
type: 'array',
|
|
140
|
+
items: { type: 'string' },
|
|
141
|
+
description: 'Paths to related files like CSS, parent components, or utilities (e.g., ["./src/styles/login.css", "./src/components/Button.tsx"])'
|
|
142
|
+
},
|
|
143
|
+
issueDescription: {
|
|
144
|
+
type: 'string',
|
|
145
|
+
description: '[Recommended] Description of the problem and expected behavior. The more specific, the better the fix.'
|
|
146
|
+
},
|
|
147
|
+
targetState: {
|
|
148
|
+
type: 'string',
|
|
149
|
+
description: 'Optional: Expected state as text description or reference image path'
|
|
150
|
+
},
|
|
151
|
+
currentCode: {
|
|
152
|
+
type: 'string',
|
|
153
|
+
description: '[Deprecated] Direct code input. Prefer using sourceCodePath for better context.'
|
|
154
|
+
},
|
|
155
|
+
thinkingLevel: {
|
|
156
|
+
type: 'string',
|
|
157
|
+
enum: ['low', 'high'],
|
|
158
|
+
description: 'Thinking depth: low for speed, high for complex analysis (default: high)',
|
|
159
|
+
default: 'high'
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
required: ['screenshot']
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
// ✨ Tool 4: gemini_create_animation removed
|
|
166
|
+
// Animation generation can be done via gemini_generate_ui tool by describing animation needs in the description
|
|
167
|
+
// 📄 Tool 4: gemini_analyze_content
|
|
168
|
+
{
|
|
169
|
+
name: TOOL_NAMES.ANALYZE_CONTENT,
|
|
170
|
+
description: 'Analyze code, documents, or data. Supports file path or direct content input. Provides summarization, code review, explanation, optimization, and debugging. Auto-detects content type and programming language.',
|
|
171
|
+
inputSchema: {
|
|
172
|
+
type: 'object',
|
|
173
|
+
properties: {
|
|
174
|
+
// Method 1: Direct content input (kept for backward compatibility)
|
|
175
|
+
content: {
|
|
176
|
+
type: 'string',
|
|
177
|
+
description: 'Content to analyze (direct input). Use this or filePath.'
|
|
178
|
+
},
|
|
179
|
+
// Method 2: File path input (new)
|
|
180
|
+
filePath: {
|
|
181
|
+
type: 'string',
|
|
182
|
+
description: 'File path to read and analyze (e.g., "./src/utils/parser.ts"). The tool will automatically read the file and detect the language. Use this or content.'
|
|
183
|
+
},
|
|
184
|
+
type: {
|
|
185
|
+
type: 'string',
|
|
186
|
+
enum: ['code', 'document', 'data', 'auto'],
|
|
187
|
+
description: 'Content type (default: auto)',
|
|
188
|
+
default: 'auto'
|
|
189
|
+
},
|
|
190
|
+
task: {
|
|
191
|
+
type: 'string',
|
|
192
|
+
enum: ['summarize', 'review', 'explain', 'optimize', 'debug'],
|
|
193
|
+
description: 'Analysis task (default: summarize)',
|
|
194
|
+
default: 'summarize'
|
|
195
|
+
},
|
|
196
|
+
language: {
|
|
197
|
+
type: 'string',
|
|
198
|
+
description: 'Optional: Programming language (if code). Auto-detected when using filePath.'
|
|
199
|
+
},
|
|
200
|
+
focus: {
|
|
201
|
+
type: 'array',
|
|
202
|
+
items: { type: 'string' },
|
|
203
|
+
description: 'Optional: Specific areas to focus on (e.g., ["security", "performance"])'
|
|
204
|
+
},
|
|
205
|
+
outputFormat: {
|
|
206
|
+
type: 'string',
|
|
207
|
+
enum: ['text', 'json', 'markdown'],
|
|
208
|
+
description: 'Output format (default: markdown)',
|
|
209
|
+
default: 'markdown'
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
required: [] // Changed to empty array, as either content or filePath is required
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
// 📦 Tool 6: gemini_analyze_codebase
|
|
216
|
+
{
|
|
217
|
+
name: TOOL_NAMES.ANALYZE_CODEBASE,
|
|
218
|
+
description: 'Analyze entire codebase using 1M token context. Supports directory path, file paths, or file contents. Provides architecture overview, identifies patterns, security issues, performance bottlenecks, and dependency problems.',
|
|
219
|
+
inputSchema: {
|
|
220
|
+
type: 'object',
|
|
221
|
+
properties: {
|
|
222
|
+
// Method 1: Directory path (new)
|
|
223
|
+
directory: {
|
|
224
|
+
type: 'string',
|
|
225
|
+
description: 'Directory path to analyze (e.g., "./src" or "C:/Project/src"). The tool will automatically read files from this directory.'
|
|
226
|
+
},
|
|
227
|
+
include: {
|
|
228
|
+
type: 'array',
|
|
229
|
+
items: { type: 'string' },
|
|
230
|
+
description: 'Glob patterns to include files (e.g., ["**/*.ts", "**/*.tsx"]). Only used with directory parameter.'
|
|
231
|
+
},
|
|
232
|
+
exclude: {
|
|
233
|
+
type: 'array',
|
|
234
|
+
items: { type: 'string' },
|
|
235
|
+
description: 'Glob patterns to exclude files (e.g., ["node_modules/**", "**/*.test.ts"]). Only used with directory parameter.'
|
|
236
|
+
},
|
|
237
|
+
// Method 2: List of file paths (new)
|
|
238
|
+
filePaths: {
|
|
239
|
+
type: 'array',
|
|
240
|
+
items: { type: 'string' },
|
|
241
|
+
description: 'List of file paths to analyze (e.g., ["./src/index.ts", "./src/utils/helper.ts"]). The tool will automatically read these files.'
|
|
242
|
+
},
|
|
243
|
+
// Method 3: Array of file contents (kept for backward compatibility)
|
|
244
|
+
files: {
|
|
245
|
+
type: 'array',
|
|
246
|
+
items: {
|
|
247
|
+
type: 'object',
|
|
248
|
+
properties: {
|
|
249
|
+
path: { type: 'string' },
|
|
250
|
+
content: { type: 'string' }
|
|
251
|
+
},
|
|
252
|
+
required: ['path', 'content']
|
|
253
|
+
},
|
|
254
|
+
description: 'List of files with their content (for backward compatibility). Use directory or filePaths for easier usage.'
|
|
255
|
+
},
|
|
256
|
+
focus: {
|
|
257
|
+
type: 'string',
|
|
258
|
+
enum: ['architecture', 'security', 'performance', 'dependencies', 'patterns'],
|
|
259
|
+
description: 'Optional: Analysis focus area'
|
|
260
|
+
},
|
|
261
|
+
deepThink: {
|
|
262
|
+
type: 'boolean',
|
|
263
|
+
description: 'Enable Deep Think mode for complex analysis (default: false)',
|
|
264
|
+
default: false
|
|
265
|
+
},
|
|
266
|
+
thinkingLevel: {
|
|
267
|
+
type: 'string',
|
|
268
|
+
enum: ['low', 'high'],
|
|
269
|
+
description: 'Thinking depth: low for speed, high for complex analysis (default: high)',
|
|
270
|
+
default: 'high'
|
|
271
|
+
},
|
|
272
|
+
outputFormat: {
|
|
273
|
+
type: 'string',
|
|
274
|
+
enum: ['markdown', 'json'],
|
|
275
|
+
description: 'Output format (default: markdown)',
|
|
276
|
+
default: 'markdown'
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
required: [] // Changed to empty array, as any one of the three input methods is required
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
// 💡 Tool 7: gemini_brainstorm
|
|
283
|
+
{
|
|
284
|
+
name: TOOL_NAMES.BRAINSTORM,
|
|
285
|
+
description: 'Generate creative ideas and solutions. Provides multiple ideas with pros/cons and feasibility assessment. Supports reading project context files to generate ideas that fit your project.',
|
|
286
|
+
inputSchema: {
|
|
287
|
+
type: 'object',
|
|
288
|
+
properties: {
|
|
289
|
+
topic: {
|
|
290
|
+
type: 'string',
|
|
291
|
+
description: 'Topic for brainstorming'
|
|
292
|
+
},
|
|
293
|
+
context: {
|
|
294
|
+
type: 'string',
|
|
295
|
+
description: 'Optional: Additional context'
|
|
296
|
+
},
|
|
297
|
+
// [NEW] Project context file path
|
|
298
|
+
contextFilePath: {
|
|
299
|
+
type: 'string',
|
|
300
|
+
description: 'Path to project context file (e.g., README.md, PRD.md). Ideas will be tailored to fit the project.'
|
|
301
|
+
},
|
|
302
|
+
// [NEW] Multiple context files
|
|
303
|
+
contextFiles: {
|
|
304
|
+
type: 'array',
|
|
305
|
+
items: { type: 'string' },
|
|
306
|
+
description: 'Paths to multiple context files (e.g., ["./README.md", "./docs/architecture.md"])'
|
|
307
|
+
},
|
|
308
|
+
count: {
|
|
309
|
+
type: 'number',
|
|
310
|
+
description: 'Number of ideas to generate (default: 5)',
|
|
311
|
+
default: 5
|
|
312
|
+
},
|
|
313
|
+
style: {
|
|
314
|
+
type: 'string',
|
|
315
|
+
enum: ['innovative', 'practical', 'radical'],
|
|
316
|
+
description: 'Optional: Brainstorming style'
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
required: ['topic']
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
// 🔍 Tool 8: gemini_search
|
|
323
|
+
{
|
|
324
|
+
name: TOOL_NAMES.SEARCH,
|
|
325
|
+
description: `Search the web using Gemini's built-in Google Search grounding.
|
|
326
|
+
|
|
327
|
+
Features:
|
|
328
|
+
- Returns up-to-date information with source citations
|
|
329
|
+
- Supports thinkingLevel for reasoning depth control
|
|
330
|
+
- Ideal for: current events, latest documentation, real-time data, fact-checking
|
|
331
|
+
|
|
332
|
+
Usage Tips:
|
|
333
|
+
- Use thinkingLevel: 'low' for simple queries (faster response)
|
|
334
|
+
- Use thinkingLevel: 'high' for complex analysis (default, deeper reasoning)
|
|
335
|
+
- Use outputFormat: 'json' when you need structured data
|
|
336
|
+
- Search results include source URLs in groundingMetadata`,
|
|
337
|
+
inputSchema: {
|
|
338
|
+
type: 'object',
|
|
339
|
+
properties: {
|
|
340
|
+
query: {
|
|
341
|
+
type: 'string',
|
|
342
|
+
description: 'Search query or question to answer using web search'
|
|
343
|
+
},
|
|
344
|
+
context: {
|
|
345
|
+
type: 'string',
|
|
346
|
+
description: 'Optional: Additional context to help refine the search'
|
|
347
|
+
},
|
|
348
|
+
thinkingLevel: {
|
|
349
|
+
type: 'string',
|
|
350
|
+
enum: ['low', 'high'],
|
|
351
|
+
description: 'Thinking depth: low for speed, high for complex analysis (default: high)',
|
|
352
|
+
default: 'high'
|
|
353
|
+
},
|
|
354
|
+
outputFormat: {
|
|
355
|
+
type: 'string',
|
|
356
|
+
enum: ['text', 'json'],
|
|
357
|
+
description: 'Output format: text for readable response, json for structured data (default: text)',
|
|
358
|
+
default: 'text'
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
required: ['query']
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
// 📋 Tool 9: list_models
|
|
365
|
+
{
|
|
366
|
+
name: TOOL_NAMES.LIST_MODELS,
|
|
367
|
+
description: 'List all available Gemini models with their capabilities, context windows, and use cases.',
|
|
368
|
+
inputSchema: {
|
|
369
|
+
type: 'object',
|
|
370
|
+
properties: {},
|
|
371
|
+
required: []
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
];
|
|
375
|
+
//# sourceMappingURL=definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,gCAAgC;IAChC;QACE,IAAI,EAAE,UAAU,CAAC,WAAW;QAC5B,WAAW,EAAE,wPAAwP;QACrQ,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6CAA6C;iBAC3D;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,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