{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/hegemonart/get-design-done/main/scripts/mcp-servers/gdd-state/schemas/add_blocker.schema.json",
  "title": "GddStateAddBlocker",
  "description": "MCP tool gdd_state__add_blocker — append one entry to <blockers>. Emits state.mutation.",
  "type": "object",
  "additionalProperties": false,
  "required": ["input", "output"],
  "properties": {
    "input": {
      "type": "object",
      "additionalProperties": false,
      "required": ["text"],
      "properties": {
        "text": {
          "type": "string",
          "minLength": 1,
          "maxLength": 8192,
          "description": "Human-readable blocker description."
        },
        "stage": {
          "type": "string",
          "maxLength": 64,
          "description": "Optional. Defaults to <position>.stage."
        },
        "date": {
          "type": "string",
          "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
          "description": "Optional ISO date (YYYY-MM-DD). Defaults to today (UTC)."
        }
      }
    },
    "output": {
      "type": "object",
      "additionalProperties": false,
      "required": ["success"],
      "properties": {
        "success": { "type": "boolean" },
        "data": {
          "type": "object",
          "additionalProperties": true,
          "properties": {
            "blocker": {
              "type": "object",
              "additionalProperties": false,
              "required": ["stage", "date", "text"],
              "properties": {
                "stage": { "type": "string" },
                "date": { "type": "string" },
                "text": { "type": "string" }
              }
            },
            "count": { "type": "integer", "minimum": 1 }
          }
        },
        "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"] }
          }
        }
      }
    }
  }
}
