Skip to main content
Glama

ng_new

Create a new Angular workspace with a specified name and directory structure, generating the initial project files and configuration for Angular development.

Instructions

Run 'ng new' to create a new Angular workspace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the new workspace
directoryNoThe directory to create the workspace in
appRootNoThe absolute path to the first folder in the 'path' property. For example, if 'path' is 'webui/src/app/modules/alerts', then 'appRoot' should be the absolute path to 'webui'.
optionsNoAdditional options for ng new

Implementation Reference

  • Handler logic for the 'ng_new' tool. Sets up the 'npx ng new' command using the provided name, optionally sets working directory from 'directory' arg, and appends any options as flags.
    case "ng_new": {
      command = "npx";
      commandArgs = ["ng", "new", args.name];
      if (args.directory) {
        cwd = args.directory;
      }
      if (args.options) {
        for (const [key, value] of Object.entries(args.options)) {
          commandArgs.push(`--${key}`, String(value));
        }
      }
      break;
  • Schema definition for the 'ng_new' tool, including input schema with required 'name' and optional 'directory', 'appRoot', 'options'.
    {
      name: "ng_new",
      description: "Run 'ng new' to create a new Angular workspace",
      inputSchema: {
        type: "object",
        properties: {
          name: {
            type: "string",
            description: "The name of the new workspace",
          },
          directory: {
            type: "string",
            description: "The directory to create the workspace in",
          },
          appRoot: {
            type: "string",
            description:
              "The absolute path to the first folder in the 'path' property. For example, if 'path' is 'webui/src/app/modules/alerts', then 'appRoot' should be the absolute path to 'webui'.",
          },
          options: {
            type: "object",
            description: "Additional options for ng new",
            additionalProperties: { type: "string" },
          },
        },
        required: ["name"],
      },
    },
  • Registration of tool handlers on the MCP server: ListTools returns the list of tools including 'ng_new', CallTool dispatches to handleToolCall based on name.
    export function setupRequestHandlers(server: Server, tools: Tool[]) {
      // List tools handler
      server.setRequestHandler(ListToolsRequestSchema, async () => ({
        tools: tools,
      }));
  • src/index.ts:22-26 (registration)
    Initializes the tool definitions array (including 'ng_new') and sets up the request handlers on the server.
    // Create tool definitions
    const TOOLS = createToolDefinitions();
    
    // Setup request handlers
    setupRequestHandlers(server, TOOLS);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool creates a new workspace, implying a write operation, but doesn't cover critical aspects like side effects (e.g., file system changes), permissions needed, error handling, or output format. This leaves significant gaps for an agent to understand the tool's behavior.

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 any wasted words. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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?

Given the tool's complexity (creates a new Angular workspace with 4 parameters), lack of annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns, potential side effects, or how it interacts with the system, leaving the agent with incomplete information for safe and effective use.

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 schema description coverage is 100%, with all parameters well-documented in the input schema. The description adds no additional parameter semantics beyond what's in the schema, such as examples or constraints. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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 ('Run ng new') and the outcome ('create a new Angular workspace'), providing a specific verb and resource. However, it doesn't differentiate this tool from its siblings (e.g., ng_add, ng_generate), which might also create or modify Angular projects in different ways, so it doesn't reach the highest score.

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 ng_add or ng_generate, nor does it mention prerequisites or exclusions. It simply states what the tool does without contextual usage information.

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/talzach/mcp-angular-cli'

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