Skip to main content
Glama
AbdurRaahimm

MCP Terminal & Git Server

by AbdurRaahimm

install_next_project

Create a Next.js project with TypeScript support, install dependencies, and open it in VSCode for immediate development.

Instructions

Create a new Next.js project and open it in VSCode

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNameYesName of the Next.js project
destinationYesDirectory where to create the project (e.g., ~/Desktop)
typescriptNoUse TypeScript (default: true)
installDependenciesNoInstall dependencies after creating project (default: true)

Implementation Reference

  • The handler function for the 'install_next_project' tool. It creates a new Next.js project using 'npx create-next-app' with options for TypeScript, Tailwind, App Router, no Git init, optional dependency installation skip, ensures directory, resolves paths, executes the command, and opens the project in VSCode.
    case "install_next_project": {
      const { 
        projectName, 
        destination, 
        typescript = true,
        installDependencies = true 
      } = args as {
        projectName: string;
        destination: string;
        typescript?: boolean;
        installDependencies?: boolean;
      };
      
      const destPath = resolvePath(destination);
      await ensureDirectory(destPath);
      
      const tsFlag = typescript ? "--typescript" : "--javascript";
      const skipInstallFlag = installDependencies ? "" : "--skip-install";
      const command = `npx create-next-app@latest ${projectName} ${tsFlag} --tailwind --app --no-git ${skipInstallFlag}`;
      
      const { stdout, stderr } = await execa(command, {
        shell: true,
        cwd: destPath,
      });
      
      const projectPath = path.join(destPath, projectName);
      
      // Open in VSCode
      await openInVSCode(projectPath);
      
      return {
        content: [
          {
            type: "text",
            text: `Next.js project "${projectName}" created successfully at ${projectPath}\n\n` +
                  `TypeScript: ${typescript ? "Yes" : "No"}\n` +
                  `Dependencies: ${installDependencies ? "Installed" : "Not installed (run npm install manually)"}\n` +
                  `VSCode: Opened\n\n` +
                  `To start development:\n` +
                  `  cd ${projectPath}\n` +
                  `  ${installDependencies ? "" : "npm install\n  "}npm run dev`,
          },
        ],
      };
    }
  • src/index.ts:172-196 (registration)
    Registration of the 'install_next_project' tool in the list of available tools, including its name, description, and input schema definition.
      name: "install_next_project",
      description: "Create a new Next.js project and open it in VSCode",
      inputSchema: {
        type: "object",
        properties: {
          projectName: {
            type: "string",
            description: "Name of the Next.js project",
          },
          destination: {
            type: "string",
            description: "Directory where to create the project (e.g., ~/Desktop)",
          },
          typescript: {
            type: "boolean",
            description: "Use TypeScript (default: true)",
          },
          installDependencies: {
            type: "boolean",
            description: "Install dependencies after creating project (default: true)",
          },
        },
        required: ["projectName", "destination"],
      },
    },
  • Input schema for the 'install_next_project' tool, defining parameters like projectName (required), destination (required), typescript (boolean, default true), installDependencies (boolean, default true).
      name: "install_next_project",
      description: "Create a new Next.js project and open it in VSCode",
      inputSchema: {
        type: "object",
        properties: {
          projectName: {
            type: "string",
            description: "Name of the Next.js project",
          },
          destination: {
            type: "string",
            description: "Directory where to create the project (e.g., ~/Desktop)",
          },
          typescript: {
            type: "boolean",
            description: "Use TypeScript (default: true)",
          },
          installDependencies: {
            type: "boolean",
            description: "Install dependencies after creating project (default: true)",
          },
        },
        required: ["projectName", "destination"],
      },
    },
  • Helper function to open a project directory in VSCode, trying multiple possible 'code' command paths if the default fails.
    async function openInVSCode(projectPath: string): Promise<void> {
      try {
        await execa("code", [projectPath]);
      } catch (error) {
        // If 'code' command fails, try common VSCode executable paths
        const vscodePaths = [
          "code",
          "/usr/local/bin/code",
          "/usr/bin/code",
          "C:\\Program Files\\Microsoft VS Code\\Code.exe",
          "C:\\Program Files (x86)\\Microsoft VS Code\\Code.exe",
        ];
    
        for (const codePath of vscodePaths) {
          try {
            await execa(codePath, [projectPath]);
            return;
          } catch {
            // Continue to next path
          }
        }
        
        throw new Error("VSCode not found. Please ensure VSCode is installed and 'code' command is available in PATH");
      }
  • Helper function to ensure a directory exists, creating it recursively if necessary.
    async function ensureDirectory(dirPath: string): Promise<void> {
      try {
        await fs.mkdir(dirPath, { recursive: true });
      } catch (error) {
        console.error(`Error creating directory ${dirPath}:`, 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 for behavioral disclosure. While 'Create' implies a write/mutation operation, it doesn't specify what happens if the directory exists, what permissions are needed, whether it modifies system state, or what happens on failure. The description lacks critical behavioral context for a tool that creates files and opens applications.

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 front-loads the core functionality. Every word earns its place - 'Create' (action), 'new Next.js project' (what), 'and open it in VSCode' (additional outcome). No wasted words or redundant information.

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 tool with 4 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what happens after creation (success/failure indicators), what 'open in VSCode' means practically, or system requirements. The combination of mutation behavior and lack of structured metadata demands more descriptive 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?

With 100% schema description coverage, the input schema already documents all 4 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain parameter relationships, constraints, or usage patterns. The baseline score of 3 reflects adequate but minimal value addition.

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 new Next.js project and open it in VSCode'), including both the creation and opening steps. It distinguishes from siblings like install_react_project and install_vue_project by specifying Next.js, and from open_in_vscode by including project creation.

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

Usage Guidelines3/5

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

The description implies usage for creating Next.js projects, but provides no explicit guidance on when to use this versus alternatives like install_react_project or install_vue_project. There's no mention of prerequisites, when-not scenarios, or comparisons with 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/AbdurRaahimm/mcp-git-terminal-server'

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