Skip to main content
Glama

ng_add

Add packages to an Angular workspace to extend functionality, such as including UI libraries like @angular/material or other npm dependencies.

Instructions

Run 'ng add' to add a package to the Angular workspace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageYesThe npm package to add (e.g., @angular/material)
appRootYesThe 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 add

Implementation Reference

  • Handler implementation for the 'ng_add' tool. It constructs the command 'npx ng add <package>' with any provided options and sets the working directory to appRoot if specified.
    case "ng_add": {
      command = "npx";
      commandArgs = ["ng", "add", args.package];
      if (args.options) {
        for (const [key, value] of Object.entries(args.options)) {
          commandArgs.push(`--${key}`, String(value));
        }
      }
      break;
  • Input schema definition for the 'ng_add' tool, specifying required parameters 'package' and 'appRoot', and optional 'options'.
    {
      name: "ng_add",
      description: "Run 'ng add' to add a package to the Angular workspace",
      inputSchema: {
        type: "object",
        properties: {
          package: {
            type: "string",
            description: "The npm package to add (e.g., @angular/material)",
          },
          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 add",
            additionalProperties: { type: "string" },
          },
        },
        required: ["package", "appRoot"],
      },
    },
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 states the tool runs 'ng add' to add a package, implying a mutation operation that modifies the Angular workspace. However, it doesn't disclose critical behavioral traits such as whether it requires specific permissions, what side effects occur (e.g., changes to configuration files), error handling, or any rate limits. This is a significant gap for a mutation tool with zero annotation coverage.

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 extremely concise and front-loaded, consisting of a single sentence that directly states the tool's purpose without any unnecessary words. Every part of the sentence earns its place by clearly conveying the action and target, making it efficient and easy to understand at a glance.

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 complexity of a mutation tool that modifies an Angular workspace, the description is incomplete. No annotations are provided to cover safety or behavioral aspects, and there's no output schema to explain return values. The description lacks details on what happens after execution (e.g., success indicators, error messages), making it inadequate for the tool's context despite the concise purpose statement.

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, providing clear documentation for all parameters ('package', 'appRoot', 'options'). The description adds no additional meaning beyond what the schema already specifies, as it doesn't elaborate on parameter usage, examples, or constraints. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 tool's purpose: 'Run 'ng add' to add a package to the Angular workspace.' It specifies the verb ('add') and resource ('package to the Angular workspace'), making the action clear. However, it doesn't explicitly differentiate from sibling tools like 'ng_update' (which might update packages) or 'ng_generate' (which creates components), leaving some ambiguity in sibling differentiation.

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 when to choose 'ng_add' over sibling tools like 'ng_update' for package management or 'ng_generate' for adding components, nor does it specify prerequisites or exclusions. This lack of contextual usage information leaves the agent without clear direction.

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