Skip to content

Commit 9ee8f9b

Browse files
herdiyana256alan-agius4
authored andcommitted
fix(@angular/cli): declare devserver_start and devserver_stop as isReadOnly:false
Both tools are declared isReadOnly:true, so they remain registered and callable when the MCP server is started with --read-only, and MCP host clients that use readOnlyHint to auto-approve tool calls without asking the user will call them without confirmation. devserver_start spawns a background ng serve child process and binds a network port. devserver_stop sends SIGTERM to that process. Neither is a read-only operation. devserver_wait_for_build only polls status and logs of an already-running server, so it correctly stays isReadOnly:true. run_target.ts already declares isReadOnly:false for the same reason, so this aligns the two devserver lifecycle tools with the existing pattern. (cherry picked from commit 1f36380)
1 parent beac493 commit 9ee8f9b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ the first build completes.
119119
* **Consistent Ports**: If making multiple calls, it is recommended to reuse the port you got from the first call for subsequent ones.
120120
</Operational Notes>
121121
`,
122-
isReadOnly: true,
122+
isReadOnly: false,
123123
isLocalOnly: true,
124124
inputSchema: devserverStartToolInputSchema.shape,
125125
outputSchema: devserverStartToolOutputSchema.shape,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Stops a running Angular development server ("ng serve") that was started with th
6969
time after this is called. However note that this is not a blocker for starting a new devserver.
7070
</Operational Notes>
7171
`,
72-
isReadOnly: true,
72+
isReadOnly: false,
7373
isLocalOnly: true,
7474
inputSchema: devserverStopToolInputSchema.shape,
7575
outputSchema: devserverStopToolOutputSchema.shape,

0 commit comments

Comments
 (0)