Skip to content

refactor(@angular/cli): add architect target discovery to list_projects MCP tool#33208

Open
clydin wants to merge 1 commit into
angular:mainfrom
clydin:feat/mcp-list-projects-targets
Open

refactor(@angular/cli): add architect target discovery to list_projects MCP tool#33208
clydin wants to merge 1 commit into
angular:mainfrom
clydin:feat/mcp-list-projects-targets

Conversation

@clydin
Copy link
Copy Markdown
Member

@clydin clydin commented May 16, 2026

Enhance the list_projects MCP tool to extract and provide configured architect targets (e.g., lint, e2e, serve, deploy) in the tool's output schema.

…ts MCP tool

Enhance the `list_projects` MCP tool to extract and provide configured architect targets (e.g., `lint`, `e2e`, `serve`, `deploy`) in the tool's output schema.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds the ability to extract and list available architect targets (such as build, test, and lint) for Angular projects within the MCP tools. The changes include updating the project output schema, adding a new use case to the documentation, and implementing the logic to retrieve target keys from the workspace configuration. A new test suite, projects_spec.ts, was also introduced to verify that targets are correctly identified and returned. The reviewer provided feedback to improve the formatting of user-facing strings by removing commas immediately following the 'e.g.' abbreviation.

targets: z
.array(z.string())
.describe(
'Available architect targets (e.g., ["build", "test", "lint", "e2e"]).',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Avoid placing a comma immediately after abbreviations like 'e.g.' in user-facing messages.

Suggested change
'Available architect targets (e.g., ["build", "test", "lint", "e2e"]).',
'Available architect targets (e.g. ["build", "test", "lint", "e2e"]).',
References
  1. Avoid placing a comma immediately after abbreviations like 'e.g.' in user-facing messages.

* Getting the \`selectorPrefix\` for a project before generating a new component to ensure it follows conventions.
* Identifying the major version of the Angular framework for each workspace, which is crucial for monorepos.
* Determining a project's primary function by inspecting its builder (e.g., '@angular-devkit/build-angular:browser' for an application).
* Identifying available architect targets (e.g., \`lint\`, \`e2e\`, \`serve\`, \`deploy\`) before attempting execution.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Avoid placing a comma immediately after abbreviations like 'e.g.' in user-facing messages.

Suggested change
* Identifying available architect targets (e.g., \`lint\`, \`e2e\`, \`serve\`, \`deploy\`) before attempting execution.
* Identifying available architect targets (e.g. lint, e2e, serve, deploy) before attempting execution.
References
  1. Avoid placing a comma immediately after abbreviations like 'e.g.' in user-facing messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant