@@ -13,9 +13,8 @@ export const getRunDetailsTool = {
13
13
ctx . logger ?. log ( "calling get_run_details" , { input } ) ;
14
14
15
15
if ( ! ctx . isEnvironmentAllowed ( input . environment ) ) {
16
- const allowedEnvs = ctx . options . envOnly ?. join ( ", " ) || "dev" ;
17
16
return respondWithError (
18
- `This MCP server is restricted to the following environments : ${ allowedEnvs } . You tried to access the ${ input . environment } environment. `
17
+ `Cannot access ${ input . environment } environment. This MCP server is restricted to: ${ ctx . getAllowedEnvironments ( ) } `
19
18
) ;
20
19
}
21
20
@@ -71,9 +70,8 @@ export const waitForRunToCompleteTool = {
71
70
ctx . logger ?. log ( "calling wait_for_run_to_complete" , { input } ) ;
72
71
73
72
if ( ! ctx . isEnvironmentAllowed ( input . environment ) ) {
74
- const allowedEnvs = ctx . options . envOnly ?. join ( ", " ) || "dev" ;
75
73
return respondWithError (
76
- `This MCP server is restricted to the following environments : ${ allowedEnvs } . You tried to access the ${ input . environment } environment. `
74
+ `Cannot access ${ input . environment } environment. This MCP server is restricted to: ${ ctx . getAllowedEnvironments ( ) } `
77
75
) ;
78
76
}
79
77
@@ -125,9 +123,8 @@ export const cancelRunTool = {
125
123
ctx . logger ?. log ( "calling cancel_run" , { input } ) ;
126
124
127
125
if ( ! ctx . isEnvironmentAllowed ( input . environment ) ) {
128
- const allowedEnvs = ctx . options . envOnly ?. join ( ", " ) || "dev" ;
129
126
return respondWithError (
130
- `This MCP server is restricted to the following environments : ${ allowedEnvs } . You tried to access the ${ input . environment } environment. `
127
+ `Cannot access ${ input . environment } environment. This MCP server is restricted to: ${ ctx . getAllowedEnvironments ( ) } `
131
128
) ;
132
129
}
133
130
@@ -166,9 +163,8 @@ export const listRunsTool = {
166
163
ctx . logger ?. log ( "calling list_runs" , { input } ) ;
167
164
168
165
if ( ! ctx . isEnvironmentAllowed ( input . environment ) ) {
169
- const allowedEnvs = ctx . options . envOnly ?. join ( ", " ) || "dev" ;
170
166
return respondWithError (
171
- `This MCP server is restricted to the following environments : ${ allowedEnvs } . You tried to access the ${ input . environment } environment. `
167
+ `Cannot access ${ input . environment } environment. This MCP server is restricted to: ${ ctx . getAllowedEnvironments ( ) } `
172
168
) ;
173
169
}
174
170
0 commit comments