{
  "get_workflow_history": {
    "type": "object",
    "properties": {
      "project_id": {
        "type": "string",
        "description": "Project identifier."
      },
      "db_path": {
        "type": "string",
        "description": "Optional path to the SQLite store."
      }
    },
    "required": [
      "project_id"
    ]
  },
  "get_gate_readiness_history": {
    "type": "object",
    "properties": {
      "project_id": {
        "type": "string",
        "description": "Project identifier."
      },
      "gate": {
        "type": "string",
        "enum": [
          "GATE_0",
          "GATE_1",
          "GATE_2",
          "GATE_3",
          "GATE_4",
          "GATE_5",
          "PAR"
        ],
        "description": "Optional gate filter."
      },
      "db_path": {
        "type": "string",
        "description": "Optional path to the SQLite store."
      }
    },
    "required": [
      "project_id"
    ]
  },
  "log_change_request": {
    "type": "object",
    "properties": {
      "project_id": {
        "type": "string",
        "description": "Project identifier."
      },
      "title": {
        "type": "string",
        "description": "Short, descriptive title for the change request."
      },
      "description": {
        "type": "string",
        "description": "What is changing and why."
      },
      "change_type": {
        "type": "string",
        "enum": [
          "SCOPE",
          "COST",
          "SCHEDULE",
          "RESOURCE",
          "TECHNICAL",
          "GOVERNANCE",
          "RISK"
        ],
        "description": "Category of change.",
        "default": "SCOPE"
      },
      "impact_cost": {
        "type": "number",
        "description": "Financial impact in \u00a3. Positive = cost increase, negative = saving."
      },
      "impact_schedule_days": {
        "type": "integer",
        "description": "Schedule impact in days. Positive = delay, negative = acceleration."
      },
      "impact_scope": {
        "type": "string",
        "description": "Narrative description of the scope change."
      },
      "raised_by": {
        "type": "string",
        "description": "Name or identifier of the person raising the request."
      },
      "raised_date": {
        "type": "string",
        "description": "ISO date the change was raised (defaults to today)."
      },
      "notes": {
        "type": "string",
        "description": "Optional additional notes."
      },
      "db_path": {
        "type": "string",
        "description": "Optional path to the SQLite store. Defaults to ~/.pm_data_tools/store.db"
      }
    },
    "required": [
      "project_id",
      "title"
    ]
  },
  "update_change_status": {
    "type": "object",
    "properties": {
      "change_id": {
        "type": "string",
        "description": "Unique ID of the change request to update."
      },
      "status": {
        "type": "string",
        "enum": [
          "SUBMITTED",
          "UNDER_REVIEW",
          "APPROVED",
          "REJECTED",
          "IMPLEMENTED",
          "WITHDRAWN"
        ],
        "description": "New status to apply."
      },
      "approved_by": {
        "type": "string",
        "description": "Name or identifier of the approver. Required when status is APPROVED."
      },
      "decision_date": {
        "type": "string",
        "description": "ISO date of the approval or rejection decision."
      },
      "implementation_date": {
        "type": "string",
        "description": "ISO date the change was implemented. Relevant for IMPLEMENTED status."
      },
      "notes": {
        "type": "string",
        "description": "Optional notes about the status change."
      },
      "db_path": {
        "type": "string",
        "description": "Optional path to the SQLite store. Defaults to ~/.pm_data_tools/store.db"
      }
    },
    "required": [
      "change_id",
      "status"
    ]
  },
  "get_change_log": {
    "type": "object",
    "properties": {
      "project_id": {
        "type": "string",
        "description": "Project identifier."
      },
      "status": {
        "type": "string",
        "enum": [
          "SUBMITTED",
          "UNDER_REVIEW",
          "APPROVED",
          "REJECTED",
          "IMPLEMENTED",
          "WITHDRAWN"
        ],
        "description": "Optional status filter."
      },
      "change_type": {
        "type": "string",
        "enum": [
          "SCOPE",
          "COST",
          "SCHEDULE",
          "RESOURCE",
          "TECHNICAL",
          "GOVERNANCE",
          "RISK"
        ],
        "description": "Optional change type filter."
      },
      "db_path": {
        "type": "string",
        "description": "Optional path to the SQLite store. Defaults to ~/.pm_data_tools/store.db"
      }
    },
    "required": [
      "project_id"
    ]
  },
  "get_change_impact_summary": {
    "type": "object",
    "properties": {
      "project_id": {
        "type": "string",
        "description": "Project identifier."
      },
      "db_path": {
        "type": "string",
        "description": "Optional path to the SQLite store. Defaults to ~/.pm_data_tools/store.db"
      }
    },
    "required": [
      "project_id"
    ]
  },
  "analyse_change_pressure": {
    "type": "object",
    "properties": {
      "project_id": {
        "type": "string",
        "description": "Project identifier."
      },
      "window_days": {
        "type": "integer",
        "description": "Look-back window in days for rate calculation.",
        "default": 90
      },
      "db_path": {
        "type": "string",
        "description": "Optional path to the SQLite store. Defaults to ~/.pm_data_tools/store.db"
      }
    },
    "required": [
      "project_id"
    ]
  }
}
