Skip to main content
Glama
Tai-DT
by Tai-DT

create_project

Set up a complete web development project with Vite, Tailwind CSS, and shadcn/ui components using your preferred framework and template.

Instructions

Create a complete project with Vite + Tailwind + shadcn/ui setup

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNameYesName of the project
frameworkNoFramework to usereact
typescriptNoUse TypeScript
componentsNoInitial shadcn/ui components to include
templateNoProject templatebasic

Implementation Reference

  • src/index.ts:124-158 (registration)
    Registration of the 'create_project' tool in the TOOLS array, including name, description, and input schema for MCP listTools.
    {
      name: 'create_project',
      description: 'Create a complete project with Vite + Tailwind + shadcn/ui setup',
      inputSchema: {
        type: 'object',
        properties: {
          projectName: {
            type: 'string',
            description: 'Name of the project'
          },
          framework: {
            type: 'string',
            enum: ['react', 'vue', 'svelte'],
            default: 'react',
            description: 'Framework to use'
          },
          typescript: {
            type: 'boolean',
            default: true,
            description: 'Use TypeScript'
          },
          components: {
            type: 'array',
            items: { type: 'string' },
            description: 'Initial shadcn/ui components to include'
          },
          template: {
            type: 'string',
            enum: ['basic', 'dashboard', 'landing', 'blog', 'auth'],
            default: 'basic',
            description: 'Project template'
          }
        },
        required: ['projectName']
      }
  • src/index.ts:435-436 (registration)
    Tool call dispatching logic in the switch statement for handling 'create_project' requests.
    case 'create_project':
      return await createProject(args as unknown as ProjectGenerationOptions);
  • The handler function implementing the 'create_project' tool logic (placeholder version).
    // Project Generator
    export async function createProject(args: ProjectGenerationOptions) {
      return {
        content: [
          {
            type: 'text',
            text: `Created project: ${args.projectName}\nFramework: ${args.framework}\nTemplate: ${args.template || 'basic'}`
          }
        ]
      };
    }
  • Advanced helper/utility for project generation with detailed configs, AI integration, and setup instructions (not directly used in current MCP tool).
    export async function createProject(args: ProjectArgs) {
      try {
        const {
          projectName,
          framework = 'react',
          typescript = true,
          components = [],
          template = 'basic'
        } = args;
    
        const templateConfig = PROJECT_TEMPLATES[template];
        const allComponents = [...new Set([...templateConfig.components, ...components])];
    
        let content = `# ${projectName} - ${framework} Project Setup\n\n`;
        content += `Generated project setup for a ${templateConfig.description}.\n\n`;
    
        // 1. Package.json
        const packageConfig = PACKAGE_CONFIGS[framework];
        const packageJson = {
          name: projectName.toLowerCase().replace(/\s+/g, '-'),
          private: true,
          version: '0.1.0',
          type: 'module',
          scripts: {
            dev: 'vite',
            build: typescript ? 'tsc && vite build' : 'vite build',
            preview: 'vite preview',
            lint: 'eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0'
          },
          dependencies: Object.fromEntries(packageConfig.dependencies.map(dep => [dep, 'latest'])),
          devDependencies: Object.fromEntries(packageConfig.devDependencies.map(dep => [dep, 'latest']))
        };
    
        content += `## 1. Package Configuration\n\n\`\`\`json\n${JSON.stringify(packageJson, null, 2)}\n\`\`\`\n\n`;
    
        // 2. Vite config
        content += `## 2. Vite Configuration\n\n\`\`\`${typescript ? 'ts' : 'js'}\n${VITE_CONFIGS[framework]}\n\`\`\`\n\n`;
    
        // 3. Tailwind config
        const tailwindConfig = `/** @type {import('tailwindcss').Config} */
    export default {
      content: ['./index.html', './src/**/*.{${framework === 'svelte' ? 'js,ts,svelte' : 'js,ts,jsx,tsx'}}'],
      theme: {
        extend: {
          colors: {
            border: "hsl(var(--border))",
            input: "hsl(var(--input))",
            ring: "hsl(var(--ring))",
            background: "hsl(var(--background))",
            foreground: "hsl(var(--foreground))",
            primary: {
              DEFAULT: "hsl(var(--primary))",
              foreground: "hsl(var(--primary-foreground))",
            },
            secondary: {
              DEFAULT: "hsl(var(--secondary))",
              foreground: "hsl(var(--secondary-foreground))",
            },
            destructive: {
              DEFAULT: "hsl(var(--destructive))",
              foreground: "hsl(var(--destructive-foreground))",
            },
            muted: {
              DEFAULT: "hsl(var(--muted))",
              foreground: "hsl(var(--muted-foreground))",
            },
            accent: {
              DEFAULT: "hsl(var(--accent))",
              foreground: "hsl(var(--accent-foreground))",
            },
            popover: {
              DEFAULT: "hsl(var(--popover))",
              foreground: "hsl(var(--popover-foreground))",
            },
            card: {
              DEFAULT: "hsl(var(--card))",
              foreground: "hsl(var(--card-foreground))",
            },
          },
          borderRadius: {
            lg: "var(--radius)",
            md: "calc(var(--radius) - 2px)",
            sm: "calc(var(--radius) - 4px)",
          },
        },
      },
      plugins: [],
    }`;
    
        content += `## 3. Tailwind Configuration\n\n\`\`\`js\n${tailwindConfig}\n\`\`\`\n\n`;
    
        // 4. CSS with CSS variables
        const cssContent = `@import "tailwindcss";
    
    @layer base {
      :root {
        --background: 0 0% 100%;
        --foreground: 222.2 84% 4.9%;
        --card: 0 0% 100%;
        --card-foreground: 222.2 84% 4.9%;
        --popover: 0 0% 100%;
        --popover-foreground: 222.2 84% 4.9%;
        --primary: 221.2 83.2% 53.3%;
        --primary-foreground: 210 40% 98%;
        --secondary: 210 40% 96%;
        --secondary-foreground: 222.2 84% 4.9%;
        --muted: 210 40% 96%;
        --muted-foreground: 215.4 16.3% 46.9%;
        --accent: 210 40% 96%;
        --accent-foreground: 222.2 84% 4.9%;
        --destructive: 0 84.2% 60.2%;
        --destructive-foreground: 210 40% 98%;
        --border: 214.3 31.8% 91.4%;
        --input: 214.3 31.8% 91.4%;
        --ring: 221.2 83.2% 53.3%;
        --radius: 0.5rem;
      }
    
      .dark {
        --background: 222.2 84% 4.9%;
        --foreground: 210 40% 98%;
        --card: 222.2 84% 4.9%;
        --card-foreground: 210 40% 98%;
        --popover: 222.2 84% 4.9%;
        --popover-foreground: 210 40% 98%;
        --primary: 217.2 91.2% 59.8%;
        --primary-foreground: 222.2 84% 4.9%;
        --secondary: 217.2 32.6% 17.5%;
        --secondary-foreground: 210 40% 98%;
        --muted: 217.2 32.6% 17.5%;
        --muted-foreground: 215 20.2% 65.1%;
        --accent: 217.2 32.6% 17.5%;
        --accent-foreground: 210 40% 98%;
        --destructive: 0 62.8% 30.6%;
        --destructive-foreground: 210 40% 98%;
        --border: 217.2 32.6% 17.5%;
        --input: 217.2 32.6% 17.5%;
        --ring: 224.3 76.3% 94.1%;
      }
    }
    
    @layer base {
      * {
        @apply border-border;
      }
      body {
        @apply bg-background text-foreground;
      }
    }`;
    
        content += `## 4. Global CSS\n\n\`\`\`css\n${cssContent}\n\`\`\`\n\n`;
    
        // 5. Utility functions
        const utilsContent = framework === 'react' ? 
          `import { type ClassValue, clsx } from "clsx"
    import { twMerge } from "tailwind-merge"
    
    export function cn(...inputs: ClassValue[]) {
      return twMerge(clsx(inputs))
    }` :
          `import { clsx, type ClassValue } from "clsx";
    import { twMerge } from "tailwind-merge";
    
    export function cn(...inputs: ClassValue[]) {
      return twMerge(clsx(inputs));
    }`;
    
        content += `## 5. Utility Functions\n\n\`\`\`${typescript ? 'ts' : 'js'}\n${utilsContent}\n\`\`\`\n\n`;
    
        // 6. Installation steps
        content += `## 6. Installation Steps\n\n`;
        content += `\`\`\`bash\n# 1. Create project directory\nmkdir ${projectName.toLowerCase().replace(/\s+/g, '-')}\ncd ${projectName.toLowerCase().replace(/\s+/g, '-')}\n\n`;
        content += `# 2. Initialize project\nnpm create vite@latest . --template ${framework}${typescript ? '-ts' : ''}\n\n`;
        content += `# 3. Install dependencies\nnpm install ${packageConfig.dependencies.join(' ')}\n\n`;
        content += `# 4. Install dev dependencies\nnpm install -D ${packageConfig.devDependencies.join(' ')}\n\n`;
        content += `# 5. Start development server\nnpm run dev\n\`\`\`\n\n`;
    
        // 7. Components to implement
        content += `## 7. Recommended Components\n\n`;
        content += `The following shadcn/ui components are recommended for this template:\n\n`;
        allComponents.forEach(comp => {
          content += `- ${comp}\n`;
        });
        content += `\n`;
    
        // 8. AI-generated project structure
        if (process.env.GEMINI_API_KEY) {
          try {
            const model = genAI.getGenerativeModel({ model: 'gemini-pro' });
            const prompt = `Generate a detailed project structure and initial implementation plan for a ${framework} project with the following requirements:
    
    Project Name: ${projectName}
    Template: ${template} (${templateConfig.description})
    Framework: ${framework}
    TypeScript: ${typescript}
    Components needed: ${allComponents.join(', ')}
    
    Please provide:
    1. Detailed folder structure
    2. Key files to create initially
    3. Development workflow recommendations
    4. Best practices for this setup
    5. Next steps after setup`;
    
            const result = await model.generateContent(prompt);
            const aiRecommendations = result.response.text();
            
            content += `## 8. AI-Generated Project Plan\n\n${aiRecommendations}\n\n`;
          } catch (error) {
            console.warn('Failed to get AI recommendations:', error);
          }
        }
    
        return {
          content: [
            {
              type: 'text',
              text: content
            }
          ]
        };
    
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error creating project: ${error instanceof Error ? error.message : 'Unknown error'}`
            }
          ]
        };
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states what the tool does, not how it behaves. It doesn't disclose whether this creates files locally, requires internet access, has side effects, handles errors, or provides progress feedback. For a project creation tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that immediately conveys the core functionality. Every word earns its place by specifying the exact technology stack, making it front-loaded and waste-free.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a project creation tool with 5 parameters and no annotations or output schema, the description is insufficient. It doesn't explain what 'complete project' means in practice, what files are generated, whether dependencies are installed, or what happens after creation. The context signals indicate significant complexity that isn't addressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 5 parameters thoroughly. The description doesn't add any parameter-specific context beyond implying the tool combines these technologies. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Create a complete project') and specifies the exact technologies involved ('Vite + Tailwind + shadcn/ui setup'). It distinguishes this from sibling tools like 'create_layout' or 'create_theme' by focusing on full project scaffolding rather than partial components.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'create_layout' or 'generate_component'. It doesn't mention prerequisites, dependencies, or scenarios where this tool is preferred over manual setup or other sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/Tai-DT/mcp-tailwind-gemini'

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