Skip to content

Commit e6d80aa

Browse files
committed
refactor(@angular/cli): remove find_examples tool and associated database rule
Remove the `find_examples` tool from the Angular CLI MCP server, along with the `ng_examples_db` Bazel rule and associated example files. With the availability of the official Angular developer skills repository (https://github.com/angular/skills), this local database lookup tool is redundant. Reduce maintenance overhead and simplify the codebase by eliminating the need to maintain a local SQLite database of examples within the CLI repository.
1 parent dc1238e commit e6d80aa

14 files changed

Lines changed: 1 addition & 1157 deletions

File tree

packages/angular/cli/BUILD.bazel

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# found in the LICENSE file at https://angular.dev/license
55

66
load("@npm//:defs.bzl", "npm_link_all_packages")
7-
load("//tools:defaults.bzl", "jasmine_test", "ng_examples_db", "npm_package", "ts_project")
7+
load("//tools:defaults.bzl", "jasmine_test", "npm_package", "ts_project")
88
load("//tools:ng_cli_schema_generator.bzl", "cli_json_schema")
99
load("//tools:ts_json_schema.bzl", "ts_json_schema")
1010

@@ -36,7 +36,6 @@ RUNTIME_ASSETS = glob(
3636
],
3737
) + [
3838
"//packages/angular/cli:lib/config/schema.json",
39-
"//packages/angular/cli:lib/code-examples.db",
4039
":angular_best_practices",
4140
]
4241

@@ -87,17 +86,6 @@ ts_project(
8786
],
8887
)
8988

90-
ng_examples_db(
91-
name = "cli_example_database",
92-
srcs = glob(
93-
include = [
94-
"lib/examples/**/*.md",
95-
],
96-
),
97-
out = "lib/code-examples.db",
98-
path = "packages/angular/cli/lib/examples",
99-
)
100-
10189
CLI_SCHEMA_DATA = [
10290
"//packages/angular/build:schemas",
10391
"//packages/angular_devkit/build_angular:schemas",

packages/angular/cli/lib/examples/if-block.md

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

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ 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 { FIND_EXAMPLE_TOOL } from './tools/examples/index';
2524
import { MODERNIZE_TOOL } from './tools/modernize';
2625
import { ZONELESS_MIGRATION_TOOL } from './tools/onpush-zoneless-migration/zoneless-migration';
2726
import { LIST_PROJECTS_TOOL } from './tools/projects';
@@ -41,7 +40,6 @@ const STABLE_TOOLS = [
4140
AI_TUTOR_TOOL,
4241
BEST_PRACTICES_TOOL,
4342
DOC_SEARCH_TOOL,
44-
FIND_EXAMPLE_TOOL,
4543
LIST_PROJECTS_TOOL,
4644
ZONELESS_MIGRATION_TOOL,
4745
] as const;
@@ -107,7 +105,6 @@ equivalent actions.
107105
108106
* **3. Answer User Questions:**
109107
- For conceptual questions ("what is..."), use \`search_documentation\`.
110-
- For code examples ("show me how to..."), use \`find_examples\`.
111108
</Core Workflows & Tool Guide>
112109
113110
<Key Concepts>
@@ -163,9 +160,6 @@ export function assembleToolDeclarations(
163160
}
164161

165162
const enabledExperimentalTools = new Set(options.experimentalTools);
166-
if (process.env['NG_MCP_CODE_EXAMPLES'] === '1') {
167-
enabledExperimentalTools.add('find_examples');
168-
}
169163
for (const [toolGroupName, toolGroup] of Object.entries(EXPERIMENTAL_TOOL_GROUPS)) {
170164
if (enabledExperimentalTools.delete(toolGroupName)) {
171165
for (const tool of toolGroup) {

packages/angular/cli/src/commands/mcp/tools/examples/database-discovery.ts

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

packages/angular/cli/src/commands/mcp/tools/examples/database-discovery_spec.ts

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

0 commit comments

Comments
 (0)