dumpPlan
Export the complete task plan as a dictionary for backup or recovery. Use the generated object with loadPlan to restore the saved state in MCPlanManager.
Instructions
导出当前完整的计划数据为一个字典对象。 这个导出的对象可以被 loadPlan 工具用来恢复状态。
Returns: ToolResponse[dict]: 包含当前完整计划数据的响应对象。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcplanmanager/app.py:38-47 (handler)MCP tool handler for 'dumpPlan'. Registered via @mcp.tool() decorator. Executes by calling PlanManager.dumpPlan() and wrapping in ToolResponse.@mcp.tool() def dumpPlan() -> ToolResponse[dict]: """ 导出当前完整的计划数据为一个字典对象。 这个导出的对象可以被 loadPlan 工具用来恢复状态。 Returns: ToolResponse[dict]: 包含当前完整计划数据的响应对象。 """ return plan_manager.dumpPlan()
- Core implementation in PlanManager that deep-copies the entire plan data (meta, state, tasks) into a success response dictionary.def dumpPlan(self) -> Dict: """导出完整的计划数据为一个字典对象。""" return { "success": True, "data": deepcopy(self.plan_data), "message": "Plan dumped successfully." }