export_scenarios
Save generated test scenarios to a JSON file for storage and reuse in development workflows.
Instructions
Save generated test scenarios into a JSON file and store in memory.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scenarios | Yes | ||
| file_name | No | scenarios.json |
Implementation Reference
- server.py:35-41 (handler)The core handler function for the 'export_scenarios' MCP tool, including the @mcp.tool() decorator for automatic registration. It saves the provided scenarios dictionary to a JSON file at the specified path (default 'scenarios.json') and stores the scenarios in an in-memory dictionary for later retrieval via resources.@mcp.tool() def export_scenarios(scenarios: dict, file_name: str = "scenarios.json") -> str: """Save generated test scenarios into a JSON file and store in memory.""" with open(file_name, "w") as f: json.dump(scenarios, f, indent=2) exported_scenarios[file_name] = scenarios return file_name