Skip to content

Commit 8545403

Browse files
committed
refactor(@angular/cli): remove modernize tool and add instructions for schematic discovery
Remove the `modernize` tool from the Angular CLI MCP server, as it is largely redundant with the official Angular developer skill and direct usage of schematics. To compensate for this removal, add instructions to the server describing how agents can use `ng generate <package>: --help` to discover available modernization schematics. This simplifies the codebase while maintaining the ability for agents to perform code modernization.
1 parent e6d80aa commit 8545403

4 files changed

Lines changed: 10 additions & 327 deletions

File tree

packages/angular/cli/src/commands/mcp/mcp-server.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { DEVSERVER_STOP_TOOL } from './tools/devserver/devserver-stop';
2121
import { DEVSERVER_WAIT_FOR_BUILD_TOOL } from './tools/devserver/devserver-wait-for-build';
2222
import { DOC_SEARCH_TOOL } from './tools/doc-search';
2323
import { E2E_TOOL } from './tools/e2e';
24-
import { MODERNIZE_TOOL } from './tools/modernize';
24+
2525
import { ZONELESS_MIGRATION_TOOL } from './tools/onpush-zoneless-migration/zoneless-migration';
2626
import { LIST_PROJECTS_TOOL } from './tools/projects';
2727
import { TEST_TOOL } from './tools/test';
@@ -51,7 +51,7 @@ const STABLE_TOOLS = [
5151
export const EXPERIMENTAL_TOOLS = [
5252
BUILD_TOOL,
5353
E2E_TOOL,
54-
MODERNIZE_TOOL,
54+
5555
TEST_TOOL,
5656
...DEVSERVER_TOOLS,
5757
] as const;
@@ -105,6 +105,12 @@ equivalent actions.
105105
106106
* **3. Answer User Questions:**
107107
- For conceptual questions ("what is..."), use \`search_documentation\`.
108+
109+
* **4. Discover Schematics for Modernization:** Since this server does not provide a
110+
specific tool for listing available schematics, you can use a shell command (if
111+
available) with \`ng generate <package-name>: --help\` to discover what migrations
112+
are available in a package (e.g., running \`ng generate @angular/core: --help\`
113+
will list migrations like \`control-flow\` and \`standalone\`).
108114
</Core Workflows & Tool Guide>
109115
110116
<Key Concepts>

packages/angular/cli/src/commands/mcp/tools/modernize.ts

Lines changed: 0 additions & 192 deletions
This file was deleted.

packages/angular/cli/src/commands/mcp/tools/modernize_spec.ts

Lines changed: 0 additions & 131 deletions
This file was deleted.

packages/angular/cli/src/commands/mcp/tools/onpush-zoneless-migration/zoneless-migration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ most important action to take in the migration journey.
4444
* **Iterative Process:** The migration process is iterative. You must call this tool repeatedly,
4545
applying the suggested fix after each call, until the tool indicates that no more actions are
4646
needed.
47-
* **Relationship to \`modernize\`:** This tool is the specialized starting point for the zoneless/OnPush
48-
migration. For other migrations (like signal inputs), you should use the \`modernize\` tool first,
47+
* **Relationship to other migrations:** This tool is the specialized starting point for the zoneless/OnPush
48+
migration. For other migrations (like signal inputs), you should run the corresponding schematics first,
4949
as the zoneless migration may depend on them as prerequisites.
5050
* **Input:** The tool can operate on either a single file or an entire directory. Provide the
5151
absolute path.

0 commit comments

Comments
 (0)