feat(scenarios): require environment for scenario runs
- require environmentId when creating runs in API and MCP tools - pass selected environment data into step execution helpers - prompt for environment selection before running scenarios in UI
This commit is contained in:
@@ -670,11 +670,15 @@ export class McpService {
|
||||
description: "Trigger an immediate run of a scenario by ID",
|
||||
inputSchema: {
|
||||
id: z.string().uuid().describe("Scenario ID to run"),
|
||||
environmentId: z
|
||||
.string()
|
||||
.uuid()
|
||||
.describe("Environment ID to run the scenario in"),
|
||||
},
|
||||
},
|
||||
async ({ id }) => {
|
||||
async ({ id, environmentId }) => {
|
||||
try {
|
||||
const run = await this.scenarioService.createRun(id);
|
||||
const run = await this.scenarioService.createRun(id, environmentId);
|
||||
return {
|
||||
content: [{ type: "text" as const, text: JSON.stringify(run) }],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user