Skip to main content
Glama
starwind-ui

Starwind UI MCP Server

by starwind-ui

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",
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool initializes a project, implying it creates files or sets up structure, but doesn't describe what exactly gets created, whether it's idempotent, if it requires specific permissions, or what happens on failure. This leaves significant gaps for a mutation tool.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with no wasted verbiage.

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 mutation tool ('initializes') with no annotations and no output schema, the description is insufficient. It doesn't explain what 'Starwind UI' is, what the initialization entails (e.g., creates files, installs dependencies), or what the expected outcome is, leaving the agent with incomplete context.

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?

The input schema has 100% description coverage, with the single parameter 'packageManager' fully documented in the schema (including enum values). The description adds no parameter-specific information beyond what the schema provides, so it meets the baseline of 3 for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('Initializes') and the resource ('a new project with Starwind UI'), making the purpose understandable. However, it doesn't differentiate this tool from potential siblings like 'install_component' or 'update_component' that might also involve project setup or modification.

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. It doesn't mention prerequisites (e.g., whether a project directory must exist), when not to use it, or how it relates to sibling tools like 'install_component' or 'get_package_manager'.

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

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