Skip to main content
Glama

mcp__gemini__generate_component

Create UI components for React, Vue, Angular, or Svelte by specifying the name, framework, styling, and features. Simplifies frontend development with tailored component generation.

Instructions

Generate UI components for React, Vue, Angular, Svelte

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
featuresNoComponent features
frameworkNoFrameworkreact
nameYesComponent name
stylingNoStyling approachcss

Implementation Reference

  • The main handler function that implements the tool logic: destructures arguments, validates input, constructs an AI prompt for component generation, calls the AI client, and formats the response.
    handler: async (args) => { const { name, framework = 'react', styling = 'css', features = '' } = args; validateString(name, 'component name'); const prompt = `Generate a ${framework} component named "${name}" with ${styling} styling. Features: ${features} Provide: 1. Complete component code 2. Proper imports and exports 3. TypeScript if applicable 4. Basic styling 5. Usage example`; const result = await aiClient.call(prompt, 'coding'); return `🎨 **${framework.toUpperCase()} Component Generated**\n\n${result}`; }
  • The tool's input schema definition including description and parameters for name (required), framework, styling, and features.
    'mcp__gemini__generate_component': { description: 'Generate UI components for React, Vue, Angular, Svelte', parameters: { name: { type: 'string', description: 'Component name', required: true }, framework: { type: 'string', description: 'Framework', default: 'react' }, styling: { type: 'string', description: 'Styling approach', default: 'css' }, features: { type: 'string', description: 'Component features' } },
  • Registers all tools from the codeTools module (which contains mcp__gemini__generate_component) into the central ToolRegistry via registerToolsFromModule.
    // Register additional tools from modules this.registerToolsFromModule(codeTools); this.registerToolsFromModule(analysisTools); this.registerToolsFromModule(enhancedTools); this.registerToolsFromModule(businessTools); this.registerToolsFromModule(licenseTools);
  • Imports the codeTools object containing the generate_component tool definition.
    import { codeTools } from './code-tools.js';

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/emmron/gemini-mcp'

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