Skip to main content
Glama

init_project

Initialize a new project with Starwind UI components using your preferred package manager to start building interfaces quickly.

Instructions

Initializes a new project with Starwind UI

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageManagerNoPackage manager to use (npm, yarn, pnpm)

Implementation Reference

  • The main handler function for the 'init_project' tool. It determines the package manager, constructs the appropriate 'starwind init' command using npx/yarn dlx/pnpm dlx, and returns an object with the command, timestamp, and instructions.
    handler: async (args: InitProjectArgs = {}) => { const packageManager = args.packageManager || "npx"; // Build the init command based on the package manager let initCommand: string; switch (packageManager) { case "npm": initCommand = "npx starwind@latest init --defaults"; break; case "yarn": initCommand = "yarn dlx starwind@latest init --defaults"; break; case "pnpm": initCommand = "pnpm dlx starwind@latest init --defaults"; break; default: initCommand = "npx starwind@latest init --defaults"; } return { packageManager, command: initCommand, timestamp: new Date().toISOString(), instructions: "Run this command in your project directory to initialize Starwind UI", note: "This will create or modify files in your project directory. Make sure to review the changes and have a clean git working tree before running.", }; },
  • Input schema definition for the 'init_project' tool, validating the optional 'packageManager' argument with enum values.
    inputSchema: { type: "object", properties: { packageManager: { type: "string", description: "Package manager to use (npm, yarn, pnpm)", enum: ["npm", "yarn", "pnpm"], }, }, required: [], },
  • TypeScript interface defining the arguments for the init_project handler, used for type safety.
    export interface InitProjectArgs { /** Package manager to use (npm, yarn, pnpm) */ packageManager?: "npm" | "yarn" | "pnpm"; /** Additional options for initialization */ options?: string[]; }
  • Registers the initProjectTool in the central 'tools' Map by name, making it available for MCP server handling.
    // Register init project tool tools.set(initProjectTool.name, initProjectTool);
  • Lists 'init_project' as an enabled tool in the configuration settings.
    "init_project",

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/starwind-ui/starwind-ui-mcp'

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