Skip to main content
Glama
TonyBro
by TonyBro

create_game_project

Initialize a new React Three Fiber game project with templates for platformer, puzzle, endless runner, physics-based, or arcade games, and automatically set up Linear integration for project management.

Instructions

Create a new game project with Linear integration and setup

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gameNameYesName of the game
gameTypeYesType of game to create
teamIdYesLinear team ID for project creation
projectPathYesPath where to create the game project

Implementation Reference

  • This is the core handler method that orchestrates the creation of a game project, including knowledge updates, Linear integration, and template generation.
    async createProject(args) {
      const { gameName, gameType, teamId, projectPath } = args;
      
      console.log(chalk.blue('\nšŸŽ® Creating game project...\n'));
      
      // Step 1: Update knowledge base
      const knowledgeSpinner = ora('Updating knowledge base...').start();
      try {
        await this.gameTemplateService.updateKnowledge([
          'react-three-fiber',
          'game-design',
          'performance',
        ]);
        knowledgeSpinner.succeed('Knowledge base updated');
      } catch (error) {
        knowledgeSpinner.fail('Failed to update knowledge base');
      }
    
      // Step 2: Create Linear project structure (via MCP tool call)
      const linearSpinner = ora('Creating Linear project...').start();
      let linearProject;
      try {
        linearProject = await this.linearService.createGameDevelopmentStructure(
          teamId,
          gameName,
          gameType
        );
        linearSpinner.succeed('Linear project created successfully');
        
        console.log(chalk.green('\nāœ… Linear project setup complete!'));
        console.log(chalk.yellow(`\nProject: ${linearProject.project.name}`));
        console.log(chalk.yellow(`Sprints: ${linearProject.sprints.length}`));
        console.log(chalk.yellow(`Tasks: ${linearProject.issues.length}`));
      } catch (error) {
        linearSpinner.fail('Failed to create Linear project');
        throw error;
      }
    
      // Step 3: Ask for confirmation to proceed
      const confirmation = await this.askForConfirmation(linearProject);
      
      if (!confirmation.proceed) {
        return {
          status: 'cancelled',
          message: 'Project creation cancelled by user',
          linearProject,
        };
      }
    
      // Step 4: Generate game template
      const templateSpinner = ora('Generating game template...').start();
      let generatedPath;
      try {
        generatedPath = await this.gameTemplateService.generateGameTemplate(
          gameType,
          gameName,
          projectPath
        );
        templateSpinner.succeed('Game template generated');
      } catch (error) {
        templateSpinner.fail('Failed to generate game template');
        throw error;
      }
    
      // Step 5: Create setup instructions
      const setupInstructions = this.generateSetupInstructions(gameName, generatedPath);
    
      return {
        status: 'success',
        message: 'Game project created successfully!',
        linearProject,
        projectPath: generatedPath,
        setupInstructions,
        nextSteps: [
          `cd ${generatedPath}`,
          'npm install',
          'npm run dev',
        ],
      };
    }
  • src/index.js:38-64 (registration)
    Tool registration for 'create_game_project', defining the name, description, and input schema.
    {
      name: 'create_game_project',
      description: 'Create a new game project with Linear integration and setup',
      inputSchema: {
        type: 'object',
        properties: {
          gameName: {
            type: 'string',
            description: 'Name of the game',
          },
          gameType: {
            type: 'string',
            enum: ['platformer', 'puzzle', 'endless-runner', 'physics-based', 'arcade'],
            description: 'Type of game to create',
          },
          teamId: {
            type: 'string',
            description: 'Linear team ID for project creation',
          },
          projectPath: {
            type: 'string',
            description: 'Path where to create the game project',
          },
        },
        required: ['gameName', 'gameType', 'teamId', 'projectPath'],
      },
    },
  • The MCP tool handler method in the main server class that invokes the gameProjectManager service.
    async createGameProject(args) {
      try {
        const result = await this.gameProjectManager.createProject(args);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error creating game project: ${error.message}`,
            },
          ],
        };
      }
    }

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/TonyBro/MCP_Game'

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