{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/hegemonart/get-design-done/main/scripts/mcp-servers/gdd-state/schemas/checkpoint.schema.json",
  "title": "GddStateCheckpoint",
  "description": "MCP tool gdd_state__checkpoint — bump frontmatter.last_checkpoint + append a <timestamps> entry. Emits state.mutation.",
  "type": "object",
  "additionalProperties": false,
  "required": ["input", "output"],
  "properties": {
    "input": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "label": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256,
          "description": "Optional label for the timestamp entry key. When absent the key is `<stage>_checkpoint_at`."
        }
      }
    },
    "output": {
      "type": "object",
      "additionalProperties": false,
      "required": ["success"],
      "properties": {
        "success": { "type": "boolean" },
        "data": {
          "type": "object",
          "additionalProperties": true,
          "properties": {
            "last_checkpoint": {
              "type": "string",
              "format": "date-time"
            },
            "timestamp_key": { "type": "string" }
          }
        },
        "error": {
          "type": "object",
          "additionalProperties": true,
          "required": ["code", "message", "kind"],
          "properties": {
            "code": { "type": "string" },
            "message": { "type": "string" },
            "kind": { "type": "string", "enum": ["validation", "state_conflict", "operation_failed", "unknown"] }
          }
        }
      }
    }
  }
}
