Skip to content

Commit 87e6a1f

Browse files
committed
refactor(@angular/cli): Rename devserver MCP tools to use slashes for categorization
1 parent 7c58d25 commit 87e6a1f

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Perform a one-off, non-watched build using "ng build". Use this tool whenever th
9797
</Use Cases>
9898
<Operational Notes>
9999
* This tool runs "ng build" so it expects to run within an Angular workspace.
100-
* If you want a watched build which updates as files are changed, use "devserver_start" instead, which also serves the app.
100+
* If you want a watched build which updates as files are changed, use "devserver/start" instead, which also serves the app.
101101
* You can provide a project instead of building the root one. The "list_projects" MCP tool could be used to obtain the list of projects.
102102
* This tool defaults to a development environment while a regular "ng build" defaults to a production environment. An unexpected build
103103
failure might suggest the project is not configured for the requested environment.

packages/angular/cli/src/commands/mcp/tools/devserver/devserver-start.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,26 +66,26 @@ export const DEVSERVER_START_TOOL: McpToolDeclaration<
6666
typeof devserverStartToolInputSchema.shape,
6767
typeof devserverStartToolOutputSchema.shape
6868
> = declareTool({
69-
name: 'devserver_start',
69+
name: 'devserver/start',
7070
title: 'Start Development Server',
7171
description: `
7272
<Purpose>
73-
Starts the Angular development server ("ng serve") as a background process. Follow this up with "devserver_wait_for_build" to wait until
73+
Starts the Angular development server ("ng serve") as a background process. Follow this up with "devserver/wait_for_build" to wait until
7474
the first build completes.
7575
</Purpose>
7676
<Use Cases>
7777
* **Starting the Server:** Use this tool to begin serving the application. The tool will return immediately while the server runs in the
7878
background.
79-
* **Get Initial Build Logs:** Once a dev server has started, use the "devserver_wait_for_build" tool to ensure it's alive. If there are any
80-
build errors, "devserver_wait_for_build" would provide them back and you can give them to the user or rely on them to propose a fix.
81-
* **Get Updated Build Logs:** Important: as long as a devserver is alive (i.e. "devserver_stop" wasn't called), after every time you make a
82-
change to the workspace, re-run "devserver_wait_for_build" to see whether the change was successfully built and wait for the devserver to
79+
* **Get Initial Build Logs:** Once a dev server has started, use the "devserver/wait_for_build" tool to ensure it's alive. If there are any
80+
build errors, "devserver/wait_for_build" would provide them back and you can give them to the user or rely on them to propose a fix.
81+
* **Get Updated Build Logs:** Important: as long as a devserver is alive (i.e. "devserver/stop" wasn't called), after every time you make a
82+
change to the workspace, re-run "devserver/wait_for_build" to see whether the change was successfully built and wait for the devserver to
8383
be updated.
8484
</Use Cases>
8585
<Operational Notes>
8686
* This tool manages development servers by itself. It maintains at most a single dev server instance for each project in the monorepo.
8787
* This is an asynchronous operation. Subsequent commands can be ran while the server is active.
88-
* Use 'devserver_stop' to gracefully shut down the server and access the full log output.
88+
* Use 'devserver/stop' to gracefully shut down the server and access the full log output.
8989
</Operational Notes>
9090
`,
9191
isReadOnly: true,

packages/angular/cli/src/commands/mcp/tools/devserver/devserver-stop.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ export const DEVSERVER_STOP_TOOL: McpToolDeclaration<
5353
typeof devserverStopToolInputSchema.shape,
5454
typeof devserverStopToolOutputSchema.shape
5555
> = declareTool({
56-
name: 'devserver_stop',
56+
name: 'devserver/stop',
5757
title: 'Stop Development Server',
5858
description: `
5959
<Purpose>
60-
Stops a running Angular development server ("ng serve") that was started with the "devserver_start" tool.
60+
Stops a running Angular development server ("ng serve") that was started with the "devserver/start" tool.
6161
</Purpose>
6262
<Use Cases>
6363
* **Stopping the Server:** Use this tool to terminate a running development server and retrieve the logs.

packages/angular/cli/src/commands/mcp/tools/devserver/devserver-wait-for-build.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,26 +89,26 @@ export const DEVSERVER_WAIT_FOR_BUILD_TOOL: McpToolDeclaration<
8989
typeof devserverWaitForBuildToolInputSchema.shape,
9090
typeof devserverWaitForBuildToolOutputSchema.shape
9191
> = declareTool({
92-
name: 'devserver_wait_for_build',
92+
name: 'devserver/wait_for_build',
9393
title: 'Wait for Devserver Build',
9494
description: `
9595
<Purpose>
96-
Waits for a dev server that was started with the "devserver_start" tool to complete its build, then reports the build logs from its most
96+
Waits for a dev server that was started with the "devserver/start" tool to complete its build, then reports the build logs from its most
9797
recent build.
9898
</Purpose>
9999
<Use Cases>
100-
* **Waiting for a build:** As long as a devserver is alive ("devserver_start" was called for this project and "devserver_stop" wasn't
100+
* **Waiting for a build:** As long as a devserver is alive ("devserver/start" was called for this project and "devserver_stop" wasn't
101101
called yet), then if you're making a file change and want to ensure it was successfully built, call this tool instead of any other build
102102
tool or command. When it retuns you'll get build logs back **and** you'll know the user's devserver is up-to-date with the latest changes.
103103
</Use Cases>
104104
<Operational Notes>
105-
* This tool expects that a dev server was launched on the same project with the "devserver_start" tool, otherwise a "no_devserver_found"
105+
* This tool expects that a dev server was launched on the same project with the "devserver/start" tool, otherwise a "no_devserver_found"
106106
status will be returned.
107107
* This tool will block until the build is complete or the timeout is reached. If you expect a long build process, consider increasing the
108-
timeout. Timeouts on initial run (right after "devserver_start" calls) or after a big change are not necessarily indicative of an error.
108+
timeout. Timeouts on initial run (right after "devserver/start" calls) or after a big change are not necessarily indicative of an error.
109109
* If you encountered a timeout and it might be reasonable, just call this tool again.
110110
* If the dev server is not building, it will return quickly, with the logs from the last build.
111-
* A 'no_devserver_found' status can indicate the underlying server was stopped for some reason. Try first to call the "devserver_start"
111+
* A 'no_devserver_found' status can indicate the underlying server was stopped for some reason. Try first to call the "devserver/start"
112112
tool again, before giving up.
113113
</Operational Notes>
114114
`,

0 commit comments

Comments
 (0)