Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/angular/cli/src/commands/mcp/tools/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Perform a one-off, non-watched build using "ng build". Use this tool whenever th
</Use Cases>
<Operational Notes>
* This tool runs "ng build" so it expects to run within an Angular workspace.
* If you want a watched build which updates as files are changed, use "devserver/start" instead, which also serves the app.
* If you want a watched build which updates as files are changed, use "devserver.start" instead, which also serves the app.
* 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.
* This tool defaults to a development environment while a regular "ng build" defaults to a production environment. An unexpected build
failure might suggest the project is not configured for the requested environment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,26 +66,26 @@ export const DEVSERVER_START_TOOL: McpToolDeclaration<
typeof devserverStartToolInputSchema.shape,
typeof devserverStartToolOutputSchema.shape
> = declareTool({
name: 'devserver/start',
name: 'devserver.start',
title: 'Start Development Server',
description: `
<Purpose>
Starts the Angular development server ("ng serve") as a background process. Follow this up with "devserver/wait_for_build" to wait until
Starts the Angular development server ("ng serve") as a background process. Follow this up with "devserver.wait_for_build" to wait until
the first build completes.
</Purpose>
<Use Cases>
* **Starting the Server:** Use this tool to begin serving the application. The tool will return immediately while the server runs in the
background.
* **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
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.
* **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
change to the workspace, re-run "devserver/wait_for_build" to see whether the change was successfully built and wait for the devserver to
* **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
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.
* **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
change to the workspace, re-run "devserver.wait_for_build" to see whether the change was successfully built and wait for the devserver to
be updated.
</Use Cases>
<Operational Notes>
* This tool manages development servers by itself. It maintains at most a single dev server instance for each project in the monorepo.
* This is an asynchronous operation. Subsequent commands can be ran while the server is active.
* Use 'devserver/stop' to gracefully shut down the server and access the full log output.
* Use 'devserver.stop' to gracefully shut down the server and access the full log output.
</Operational Notes>
`,
isReadOnly: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ export const DEVSERVER_STOP_TOOL: McpToolDeclaration<
typeof devserverStopToolInputSchema.shape,
typeof devserverStopToolOutputSchema.shape
> = declareTool({
name: 'devserver/stop',
name: 'devserver.stop',
title: 'Stop Development Server',
description: `
<Purpose>
Stops a running Angular development server ("ng serve") that was started with the "devserver/start" tool.
Stops a running Angular development server ("ng serve") that was started with the "devserver.start" tool.
</Purpose>
<Use Cases>
* **Stopping the Server:** Use this tool to terminate a running development server and retrieve the logs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,26 @@ export const DEVSERVER_WAIT_FOR_BUILD_TOOL: McpToolDeclaration<
typeof devserverWaitForBuildToolInputSchema.shape,
typeof devserverWaitForBuildToolOutputSchema.shape
> = declareTool({
name: 'devserver/wait_for_build',
name: 'devserver.wait_for_build',
title: 'Wait for Devserver Build',
description: `
<Purpose>
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
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
recent build.
</Purpose>
<Use Cases>
* **Waiting for a build:** As long as a devserver is alive ("devserver/start" was called for this project and "devserver_stop" wasn't
* **Waiting for a build:** As long as a devserver is alive ("devserver.start" was called for this project and "devserver.stop" wasn't
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
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.
</Use Cases>
<Operational Notes>
* This tool expects that a dev server was launched on the same project with the "devserver/start" tool, otherwise a "no_devserver_found"
* This tool expects that a dev server was launched on the same project with the "devserver.start" tool, otherwise a "no_devserver_found"
status will be returned.
* This tool will block until the build is complete or the timeout is reached. If you expect a long build process, consider increasing the
timeout. Timeouts on initial run (right after "devserver/start" calls) or after a big change are not necessarily indicative of an error.
timeout. Timeouts on initial run (right after "devserver.start" calls) or after a big change are not necessarily indicative of an error.
* If you encountered a timeout and it might be reasonable, just call this tool again.
* If the dev server is not building, it will return quickly, with the logs from the last build.
* A 'no_devserver_found' status can indicate the underlying server was stopped for some reason. Try first to call the "devserver/start"
* A 'no_devserver_found' status can indicate the underlying server was stopped for some reason. Try first to call the "devserver.start"
tool again, before giving up.
</Operational Notes>
`,
Expand Down