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"], }, },
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