{
  "openapi": "3.0.3",
  "info": {
    "title": "LabelQueue — Official Public REST & MCP API",
    "version": "1.0.1",
    "description": "LabelQueue eliminates browser print-scaling drift when batch-printing Avery US Letter/A4 label sheets (5160, 5163, 5164, 5167, 22807) and 4x6 thermal shipping/barcode labels. Users can import CSV SKU or address lists, generate crisp vector Code-128, EAN-13, UPC-A, and QR barcodes, and export 1:1 physical-scale PDFs locked to exact top/left sheet margins and horizontal/vertical pitch. Includes a zero-dependency npm CLI (`labelqueue-cli`), ClawHub skill, and OpenAPI/MCP specification lookup.",
    "contact": {
      "name": "LabelQueue",
      "url": "https://labelqueue.com",
      "email": "admin@labelqueue.com"
    },
    "license": {
      "name": "MIT",
      "url": "https://opensource.org/licenses/MIT"
    }
  },
  "externalDocs": {
    "description": "LabelQueue Official Web Workbench",
    "url": "https://labelqueue.com"
  },
  "servers": [
    {
      "url": "https://labelqueue.com",
      "description": "Production Cloudflare Global Edge"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Optional API Key for Albato / automation tracking (e.g. pk_live_labelqueue_2026)"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/api/v1/me": {
      "get": {
        "operationId": "verifyApiConnection",
        "summary": "Verify LabelQueue API Key & Service Health",
        "description": "Authentication test and metadata endpoint for Albato App Integrator, RapidAPI, Make, and custom workflows.",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          },
          {}
        ],
        "responses": {
          "200": {
            "description": "Authenticated connection status and tool count",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "example": true
                    },
                    "authenticated": {
                      "type": "boolean",
                      "example": true
                    },
                    "service": {
                      "type": "string",
                      "example": "LabelQueue"
                    },
                    "domain": {
                      "type": "string",
                      "example": "labelqueue.com"
                    },
                    "version": {
                      "type": "string",
                      "example": "1.0.1"
                    },
                    "toolsCount": {
                      "type": "integer",
                      "example": 4
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools": {
      "get": {
        "operationId": "listAvailableTools",
        "summary": "List All LabelQueue Read-Only Tools & Schemas",
        "responses": {
          "200": {
            "description": "Array of available read-only tools"
          }
        }
      }
    },
    "/api/mcp": {
      "get": {
        "operationId": "getMcpServerMetadata",
        "summary": "Get LabelQueue MCP Server Metadata",
        "responses": {
          "200": {
            "description": "MCP Server metadata and Grade-A tool annotations"
          }
        }
      },
      "post": {
        "operationId": "invokeMcpJsonRpc",
        "summary": "Execute Streamable HTTP JSON-RPC 2.0 MCP Request",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jsonrpc",
                  "id",
                  "method"
                ],
                "properties": {
                  "jsonrpc": {
                    "type": "string",
                    "example": "2.0"
                  },
                  "id": {
                    "type": "integer",
                    "example": 1
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "initialize",
                      "tools/list",
                      "tools/call"
                    ],
                    "example": "tools/list"
                  },
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 response envelope"
          }
        }
      }
    },
    "/api/v1/tools/lookup_avery_label_specs": {
      "post": {
        "operationId": "lookup_avery_label_specs",
        "summary": "Avery & Standard Sheet Label Geometry Lookup",
        "description": "Look up exact physical sheet and label geometry (width, height, top/left margins, horizontal/vertical pitch in inches and mm, columns, rows) for Avery US Letter & A4 label codes (5160, 5163, 5164, 5167, 22807, L7160).",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "Avery or sheet template code (e.g. \"5160\", \"5163\", \"5164\", \"5167\", \"22807\", \"L7160\")"
                  }
                },
                "required": [
                  "code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic JSON output from lookup_avery_label_specs"
          }
        }
      }
    },
    "/api/v1/tools/lookup_thermal_roll_label_specs": {
      "post": {
        "operationId": "lookup_thermal_roll_label_specs",
        "summary": "4x6 Shipping & Direct Thermal Barcode Roll Spec Lookup",
        "description": "Look up exact dimensions in inches, mm, and dots (at 203 DPI and 300 DPI) for Zebra, Rollo, Dymo 30252/30334, and Brother thermal label rolls.",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rollType": {
                    "type": "string",
                    "enum": [
                      "4x6-shipping",
                      "2.25x1.25-sku",
                      "dymo-30252",
                      "dymo-30334",
                      "fba-fnsku-44up"
                    ],
                    "description": "Thermal roll or FBA label standard"
                  }
                },
                "required": [
                  "rollType"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic JSON output from lookup_thermal_roll_label_specs"
          }
        }
      }
    },
    "/api/v1/tools/diagnose_browser_label_print_drift": {
      "post": {
        "operationId": "diagnose_browser_label_print_drift",
        "summary": "Browser PDF Label Vertical/Horizontal Drift Diagnostic",
        "description": "Diagnose progressive row creep when printing sheet labels from Chrome, Edge, Adobe Acrobat, or macOS Preview caused by Fit-to-Page scaling (~94%–97%).",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "observedDriftMm": {
                    "type": "number",
                    "description": "Measured vertical drift by bottom row in millimeters (e.g. 6.5)"
                  },
                  "viewer": {
                    "type": "string",
                    "enum": [
                      "chrome",
                      "macos-preview",
                      "acrobat",
                      "windows-print"
                    ],
                    "description": "Print dialog environment"
                  }
                },
                "required": [
                  "observedDriftMm"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic JSON output from diagnose_browser_label_print_drift"
          }
        }
      }
    },
    "/api/v1/tools/check_barcode_symbology_requirements": {
      "post": {
        "operationId": "check_barcode_symbology_requirements",
        "summary": "Code-128, UPC-A, EAN-13 & QR Quiet-Zone Spec Checker",
        "description": "Verify character constraints, check-digit math, minimum X-dimension mil width, and mandatory left/right quiet zones for retail and warehouse barcodes.",
        "security": [
          {
            "ApiKeyAuth": []
          },
          {
            "BearerAuth": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "symbology": {
                    "type": "string",
                    "enum": [
                      "CODE128",
                      "UPCA",
                      "EAN13",
                      "QR",
                      "ITF14"
                    ],
                    "description": "Barcode symbology type"
                  }
                },
                "required": [
                  "symbology"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic JSON output from check_barcode_symbology_requirements"
          }
        }
      }
    }
  }
}