{
  "openapi": "3.1.1",
  "info": {
    "title": "Pageboard API",
    "version": "1.0.0",
    "summary": "Deterministic tools for people and AI agents.",
    "description": "Every endpoint performs the same calculation as the human page and returns inputs, result, units, assumptions, sources, warnings and computedAt. MCP endpoint: /mcp."
  },
  "servers": [
    {
      "url": "https://pageboard.usefulweb.app"
    }
  ],
  "paths": {
    "/api/v1/tools": {
      "get": {
        "operationId": "listTools",
        "summary": "Catalog of all tools",
        "responses": {
          "200": {
            "description": "Tool list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/{id}": {
      "get": {
        "operationId": "getTool",
        "summary": "Definition of one tool",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "pageboard-reference-planner",
                "pageboard-board-inspector",
                "pageboard-tag-organizer",
                "a11y-snapshot"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool definition.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/pageboard-reference-planner/calculate": {
      "post": {
        "operationId": "calculatePageboardReferencePlanner",
        "summary": "Turn a list of website references into an editable board.",
        "description": "Create an organized Pageboard from one reference per line, with optional source, type, platform and tags. Download the project and continue arranging it in Pageboard.\n\nMethodology:\n- Each nonempty line is split into up to five pipe-separated fields: title, source URL, site type, platform and comma-separated tags. Empty optional fields may be left blank.\n- The board allows at most 100 references and eight tags per reference. URLs must be HTTP or HTTPS without credentials; each entry receives a stable sequential ID and an editable neutral accent.\n- Links are stored as text and never fetched. Screenshots must be added separately in Pageboard; use images you have permission to include.\n- The download is the native editable project. If its encoded data exceeds one million characters, import the project file instead of using the editor link.\n\nThis tool does not capture screenshots, fetch URLs or import third-party galleries. Use your own links and images.",
        "tags": [
          "apps"
        ],
        "x-mcp-tool": "pageboard_reference_planner",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PageboardReferencePlannerInput"
              },
              "examples": {
                "example1": {
                  "summary": "Create a website research board",
                  "value": {}
                },
                "example2": {
                  "summary": "Plan a collection without links",
                  "value": {
                    "name": "Event ideas",
                    "references": "Festival landing | | Event | Mobile | color, type\nTicketing page | | Event | Desktop | conversion"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageboardReferencePlannerResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/pageboard-board-inspector/calculate": {
      "post": {
        "operationId": "calculatePageboardBoardInspector",
        "summary": "Inspect your references and make a portable visual board.",
        "description": "Validate a Pageboard project, count its references and tags, and export a self-contained HTML contact sheet and editable project file.\n\nMethodology:\n- Validates the native Pageboard format, text limits, safe HTTP(S) links, screenshot data and the four-megabyte project budget before reporting.\n- Counts entries, favorites, screenshots, source links, types, platforms and tags. Counts describe saved metadata; they do not evaluate the quality or accessibility of referenced websites.\n- The HTML sheet embeds allowed screenshot data, escapes user text, restricts page content with a CSP, and uses safe links that open only on a user click. No remote page or image is fetched.\n- Both exports can contain private notes or screenshots. Editor links embed project data in their fragment; larger projects receive a downloadable file instead.\n\nThe generated page contains your notes, links and embedded images. Share it only with intended recipients.",
        "tags": [
          "apps"
        ],
        "x-mcp-tool": "pageboard_board_inspector",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PageboardBoardInspectorInput"
              },
              "examples": {
                "example1": {
                  "summary": "Inspect a sample reference board",
                  "value": {}
                },
                "example2": {
                  "summary": "Inspect an empty board",
                  "value": {
                    "project": "{\"format\":\"pageboard-project\",\"version\":1,\"name\":\"Research ideas\",\"entries\":[],\"moodboard\":{\"items\":[]}}"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageboardBoardInspectorResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/pageboard-tag-organizer/calculate": {
      "post": {
        "operationId": "calculatePageboardTagOrganizer",
        "summary": "Clean up and apply tags across a reference board.",
        "description": "Normalize tags on a Pageboard project, then optionally add or remove a tag on every reference. Download the updated editable board.\n\nMethodology:\n- Trims and collapses whitespace in existing tags and removes empty tags. Tags that differ only in letter case are merged: the first spelling on the board (in reference order) is used everywhere, and duplicates on one reference are removed.\n- Add and remove apply to every reference after normalization. Adding a duplicate has no effect; removing compares without case. The entire operation is rejected if adding would exceed eight tags on any reference.\n- All other reference fields, links, notes, favorites and screenshots are preserved. No source pages are loaded.\n- The project download is the editable result; the editor link carries the same data and is omitted when it would exceed one million encoded characters.",
        "tags": [
          "apps"
        ],
        "x-mcp-tool": "pageboard_tag_organizer",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PageboardTagOrganizerInput"
              },
              "examples": {
                "example1": {
                  "summary": "Clean up messy tags",
                  "value": {
                    "project": "{\"format\":\"pageboard-project\",\"version\":1,\"name\":\"Imported bookmarks\",\"entries\":[{\"id\":\"pricing\",\"title\":\"Pricing with three plans\",\"url\":\"\",\"type\":\"Pricing\",\"platform\":\"Desktop\",\"tags\":[\"  Pricing \",\"pricing\",\"Conversion  table\"],\"notes\":\"\",\"favorite\":false,\"accent\":\"#c9bca8\",\"screenshot\":\"\"},{\"id\":\"footer\",\"title\":\"Footer with a sitemap\",\"url\":\"\",\"type\":\"Footer\",\"platform\":\"Desktop\",\"tags\":[\"Navigation\",\"navigation \",\"Typography\"],\"notes\":\"\",\"favorite\":false,\"accent\":\"#c9bca8\",\"screenshot\":\"\"},{\"id\":\"signup\",\"title\":\"Signup in one step\",\"url\":\"\",\"type\":\"Form\",\"platform\":\"Mobile\",\"tags\":[\"Forms\",\"typography\",\"Forms\"],\"notes\":\"\",\"favorite\":false,\"accent\":\"#c9bca8\",\"screenshot\":\"\"}],\"moodboard\":{\"items\":[]}}"
                  }
                },
                "example2": {
                  "summary": "Add a research tag to every reference",
                  "value": {
                    "action": "add",
                    "tag": "research"
                  }
                },
                "example3": {
                  "summary": "Remove a tag in any letter case",
                  "value": {
                    "project": "{\"format\":\"pageboard-project\",\"version\":1,\"name\":\"Imported bookmarks\",\"entries\":[{\"id\":\"pricing\",\"title\":\"Pricing with three plans\",\"url\":\"\",\"type\":\"Pricing\",\"platform\":\"Desktop\",\"tags\":[\"  Pricing \",\"pricing\",\"Conversion  table\"],\"notes\":\"\",\"favorite\":false,\"accent\":\"#c9bca8\",\"screenshot\":\"\"},{\"id\":\"footer\",\"title\":\"Footer with a sitemap\",\"url\":\"\",\"type\":\"Footer\",\"platform\":\"Desktop\",\"tags\":[\"Navigation\",\"navigation \",\"Typography\"],\"notes\":\"\",\"favorite\":false,\"accent\":\"#c9bca8\",\"screenshot\":\"\"},{\"id\":\"signup\",\"title\":\"Signup in one step\",\"url\":\"\",\"type\":\"Form\",\"platform\":\"Mobile\",\"tags\":[\"Forms\",\"typography\",\"Forms\"],\"notes\":\"\",\"favorite\":false,\"accent\":\"#c9bca8\",\"screenshot\":\"\"}],\"moodboard\":{\"items\":[]}}",
                    "action": "remove",
                    "tag": "TYPOGRAPHY"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageboardTagOrganizerResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/a11y-snapshot/calculate": {
      "post": {
        "operationId": "calculateA11ySnapshot",
        "summary": "Static WCAG 2.2 snapshot of a page: findings by severity, evidence and manual checks.",
        "description": "Fetch a public URL or paste HTML to get a deterministic accessibility snapshot: page language, title, image alternatives, form labels, button and link names, heading outline, landmarks, tables, iframes, zoom blocking and more — each finding mapped to a WCAG 2.2 success criterion with the offending element. It also lists what must be checked by hand.\n\nMethodology:\n- The HTML is parsed by a tolerant tokenizer/tree builder; no JavaScript is executed and no CSS is computed, so content injected by scripts is not seen.\n- 28 rules run: language, title, text alternatives, form labels, button/link names, headings, duplicate ids, viewport zoom, data tables, iframe titles, autoplaying media, landmarks, skip link, tabindex and aria-hidden misuse.\n- Each finding is classed as \"failure\" (strong evidence of a WCAG 2.2 success-criterion failure), \"best-practice\" (recommended but not a strict failure, e.g. heading order or duplicate ids — SC 4.1.1 Parsing is obsolete in WCAG 2.2) or \"needs-review\".\n- Accessible names are approximated from aria-labelledby, aria-label, label elements, content text, image alt and title, in that order.\n- Criteria that need rendering or human judgement (colour, contrast, keyboard, focus visibility, captions…) are listed as manual checks.\n\nAutomated static checks can only detect some failures. They cannot establish WCAG 2.2 conformance: conformance requires a full manual review of every page state (WCAG 2.2 §5.2), including rendered contrast, keyboard operation and assistive-technology testing.",
        "tags": [
          "developer"
        ],
        "x-mcp-tool": "a11y_snapshot",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/A11ySnapshotInput"
              },
              "examples": {
                "example1": {
                  "summary": "Landing page with common problems",
                  "value": {
                    "html": "<!doctype html>\n<html>\n<head><meta name=\"viewport\" content=\"width=device-width, user-scalable=no\"><title></title></head>\n<body>\n<div class=\"nav\"><a href=\"/\"><img src=\"logo.png\"></a> <a href=\"/shop\">Shop</a> <a href=\"/blog\">Blog</a> <a href=\"/help\">Help</a> <a href=\"/about\">About</a> <a href=\"/cart\"><svg aria-hidden=\"true\"></svg></a></div>\n<h1>Spring sale</h1>\n<h3>Newsletter</h3>\n<form><input type=\"email\" name=\"email\" placeholder=\"Your email\"><button><svg aria-hidden=\"true\"></svg></button></form>\n<p>Read our offers <a href=\"/offers\">click here</a>.</p>\n<iframe src=\"https://www.youtube.com/embed/xyz\"></iframe>\n</body>\n</html>",
                    "maxFindings": 100
                  }
                },
                "example2": {
                  "summary": "Well-structured contact page",
                  "value": {
                    "html": "<!doctype html>\n<html lang=\"en\">\n<head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><title>Contact – Example Ltd</title></head>\n<body>\n<a class=\"skip-link\" href=\"#main\">Skip to main content</a>\n<header><nav aria-label=\"Main\"><a href=\"/\">Home</a> <a href=\"/products\">Products</a> <a href=\"/pricing\">Pricing</a> <a href=\"/support\">Support</a> <a href=\"/contact\">Contact</a></nav></header>\n<main id=\"main\">\n<h1>Contact us</h1>\n<form><label for=\"name\">Name</label><input id=\"name\" name=\"name\" autocomplete=\"name\"><label for=\"msg\">Message</label><textarea id=\"msg\" name=\"msg\"></textarea><button type=\"submit\">Send</button></form>\n<img src=\"/team.jpg\" alt=\"Our support team in the Berlin office\">\n</main>\n</body>\n</html>",
                    "maxFindings": 50
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/A11ySnapshotResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workflows": {
      "get": {
        "operationId": "listWorkflows",
        "summary": "Multi-tool workflows",
        "responses": {
          "200": {
            "description": "Workflow list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details. 422 responses include per-field `errors`.",
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "field",
                "message"
              ],
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "PageboardReferencePlannerInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "title": "Board name",
            "type": "string",
            "maxLength": 120,
            "default": "Website references"
          },
          "references": {
            "title": "References, one per line",
            "description": "Title | URL | Type | Platform | comma-separated tags. Only the title is required.",
            "type": "string",
            "maxLength": 100000,
            "default": "Quiet studio | https://example.com/studio | Portfolio | Desktop | typography, minimal\nGarden journal | https://example.org/journal | Editorial | Mobile | photography, nature"
          }
        },
        "required": []
      },
      "PageboardReferencePlannerResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "project",
              "report",
              "projectFile",
              "openInApp"
            ],
            "properties": {
              "project": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "title": "Pageboard project",
                "type": "object",
                "required": [
                  "format",
                  "version",
                  "name",
                  "entries"
                ],
                "properties": {
                  "format": {
                    "const": "pageboard-project"
                  },
                  "version": {
                    "const": 1
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "entries": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "required": [
                        "id",
                        "title",
                        "url",
                        "type",
                        "platform",
                        "tags",
                        "notes",
                        "favorite",
                        "accent",
                        "screenshot"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$"
                        },
                        "title": {
                          "type": "string",
                          "maxLength": 120
                        },
                        "url": {
                          "type": "string",
                          "maxLength": 2048
                        },
                        "type": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "platform": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "tags": {
                          "type": "array",
                          "maxItems": 8,
                          "items": {
                            "type": "string",
                            "maxLength": 40
                          }
                        },
                        "notes": {
                          "type": "string",
                          "maxLength": 4000
                        },
                        "favorite": {
                          "type": "boolean"
                        },
                        "accent": {
                          "type": "string",
                          "pattern": "^#[0-9a-fA-F]{6}$"
                        },
                        "screenshot": {
                          "type": "string",
                          "maxLength": 400040,
                          "pattern": "^(|data:image/(png|jpeg|webp);base64,[A-Za-z0-9+/]+=*)$"
                        }
                      }
                    }
                  },
                  "moodboard": {
                    "type": "object",
                    "description": "Optional spatial moodboard on a 1600 × 1000 canvas; array order is the stacking order.",
                    "required": [
                      "items"
                    ],
                    "properties": {
                      "items": {
                        "type": "array",
                        "maxItems": 80,
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "kind",
                            "x",
                            "y"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$"
                            },
                            "kind": {
                              "enum": [
                                "reference",
                                "note",
                                "swatch",
                                "image"
                              ]
                            },
                            "x": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1600
                            },
                            "y": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000
                            },
                            "w": {
                              "type": "integer",
                              "minimum": 120,
                              "maximum": 480
                            },
                            "h": {
                              "type": "integer",
                              "minimum": 90,
                              "maximum": 400
                            },
                            "text": {
                              "type": "string",
                              "maxLength": 300
                            },
                            "color": {
                              "type": "string",
                              "pattern": "^#[0-9a-fA-F]{6}$"
                            },
                            "ref": {
                              "type": "string",
                              "description": "Entry id of a reference card."
                            },
                            "image": {
                              "type": "string",
                              "description": "Embedded PNG/JPEG/WebP data URI of an image card (under 300 KB)."
                            }
                          }
                        }
                      }
                    }
                  }
                }
              },
              "report": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "name",
                  "entries",
                  "favorites",
                  "withScreenshots",
                  "withUrls",
                  "types",
                  "platforms",
                  "tags",
                  "moodboardCards",
                  "bytes"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "entries": {
                    "type": "integer"
                  },
                  "favorites": {
                    "type": "integer"
                  },
                  "withScreenshots": {
                    "type": "integer"
                  },
                  "withUrls": {
                    "type": "integer"
                  },
                  "types": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer"
                    }
                  },
                  "platforms": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer"
                    }
                  },
                  "tags": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer"
                    }
                  },
                  "moodboardCards": {
                    "type": "integer"
                  },
                  "bytes": {
                    "type": "integer"
                  }
                }
              },
              "projectFile": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "openInApp": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      },
      "PageboardBoardInspectorInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "project": {
            "title": "Pageboard project JSON",
            "type": "string",
            "maxLength": 4000000,
            "default": "{\n  \"format\": \"pageboard-project\",\n  \"version\": 1,\n  \"name\": \"A small collection\",\n  \"entries\": [\n    {\n      \"id\": \"studio\",\n      \"title\": \"A quiet studio\",\n      \"url\": \"\",\n      \"type\": \"Portfolio\",\n      \"platform\": \"Desktop\",\n      \"tags\": [\n        \"Editorial\",\n        \"Typography\"\n      ],\n      \"notes\": \"Try a generous margin and a single strong headline.\",\n      \"favorite\": true,\n      \"accent\": \"#d9b99f\",\n      \"screenshot\": \"\"\n    },\n    {\n      \"id\": \"garden\",\n      \"title\": \"The garden journal\",\n      \"url\": \"\",\n      \"type\": \"Editorial\",\n      \"platform\": \"Mobile\",\n      \"tags\": [\n        \"Nature\",\n        \"Photography\"\n      ],\n      \"notes\": \"Look for a calm rhythm between image and text.\",\n      \"favorite\": false,\n      \"accent\": \"#a9b99d\",\n      \"screenshot\": \"\"\n    },\n    {\n      \"id\": \"objects\",\n      \"title\": \"Objects for everyday\",\n      \"url\": \"\",\n      \"type\": \"Shop\",\n      \"platform\": \"Desktop\",\n      \"tags\": [\n        \"Minimal\",\n        \"Product\"\n      ],\n      \"notes\": \"A restrained palette lets the objects stand out.\",\n      \"favorite\": false,\n      \"accent\": \"#bfc3d2\",\n      \"screenshot\": \"\"\n    },\n    {\n      \"id\": \"festival\",\n      \"title\": \"An independent festival\",\n      \"url\": \"\",\n      \"type\": \"Event\",\n      \"platform\": \"Mobile\",\n      \"tags\": [\n        \"Color\",\n        \"Typography\"\n      ],\n      \"notes\": \"Explore expressive type and a clear schedule.\",\n      \"favorite\": false,\n      \"accent\": \"#e2b878\",\n      \"screenshot\": \"\"\n    }\n  ],\n  \"moodboard\": {\n    \"items\": [\n      {\n        \"id\": \"m-studio\",\n        \"kind\": \"reference\",\n        \"x\": 60,\n        \"y\": 60,\n        \"w\": 260,\n        \"h\": 220,\n        \"text\": \"\",\n        \"color\": \"#d9b99f\",\n        \"ref\": \"studio\",\n        \"image\": \"\"\n      },\n      {\n        \"id\": \"m-garden\",\n        \"kind\": \"reference\",\n        \"x\": 360,\n        \"y\": 60,\n        \"w\": 220,\n        \"h\": 220,\n        \"text\": \"\",\n        \"color\": \"#a9b99d\",\n        \"ref\": \"garden\",\n        \"image\": \"\"\n      },\n      {\n        \"id\": \"m-note\",\n        \"kind\": \"note\",\n        \"x\": 620,\n        \"y\": 60,\n        \"w\": 240,\n        \"h\": 150,\n        \"text\": \"Calm, editorial, lots of white space.\",\n        \"color\": \"#fff6d8\",\n        \"ref\": \"\",\n        \"image\": \"\"\n      },\n      {\n        \"id\": \"m-sand\",\n        \"kind\": \"swatch\",\n        \"x\": 620,\n        \"y\": 240,\n        \"w\": 120,\n        \"h\": 110,\n        \"text\": \"Sand\",\n        \"color\": \"#d9b99f\",\n        \"ref\": \"\",\n        \"image\": \"\"\n      },\n      {\n        \"id\": \"m-moss\",\n        \"kind\": \"swatch\",\n        \"x\": 760,\n        \"y\": 240,\n        \"w\": 120,\n        \"h\": 110,\n        \"text\": \"Moss\",\n        \"color\": \"#6f7f5f\",\n        \"ref\": \"\",\n        \"image\": \"\"\n      }\n    ]\n  }\n}"
          }
        },
        "required": []
      },
      "PageboardBoardInspectorResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "project",
              "report",
              "projectFile",
              "htmlFile",
              "openInApp"
            ],
            "properties": {
              "project": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "title": "Pageboard project",
                "type": "object",
                "required": [
                  "format",
                  "version",
                  "name",
                  "entries"
                ],
                "properties": {
                  "format": {
                    "const": "pageboard-project"
                  },
                  "version": {
                    "const": 1
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "entries": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "required": [
                        "id",
                        "title",
                        "url",
                        "type",
                        "platform",
                        "tags",
                        "notes",
                        "favorite",
                        "accent",
                        "screenshot"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$"
                        },
                        "title": {
                          "type": "string",
                          "maxLength": 120
                        },
                        "url": {
                          "type": "string",
                          "maxLength": 2048
                        },
                        "type": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "platform": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "tags": {
                          "type": "array",
                          "maxItems": 8,
                          "items": {
                            "type": "string",
                            "maxLength": 40
                          }
                        },
                        "notes": {
                          "type": "string",
                          "maxLength": 4000
                        },
                        "favorite": {
                          "type": "boolean"
                        },
                        "accent": {
                          "type": "string",
                          "pattern": "^#[0-9a-fA-F]{6}$"
                        },
                        "screenshot": {
                          "type": "string",
                          "maxLength": 400040,
                          "pattern": "^(|data:image/(png|jpeg|webp);base64,[A-Za-z0-9+/]+=*)$"
                        }
                      }
                    }
                  },
                  "moodboard": {
                    "type": "object",
                    "description": "Optional spatial moodboard on a 1600 × 1000 canvas; array order is the stacking order.",
                    "required": [
                      "items"
                    ],
                    "properties": {
                      "items": {
                        "type": "array",
                        "maxItems": 80,
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "kind",
                            "x",
                            "y"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$"
                            },
                            "kind": {
                              "enum": [
                                "reference",
                                "note",
                                "swatch",
                                "image"
                              ]
                            },
                            "x": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1600
                            },
                            "y": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000
                            },
                            "w": {
                              "type": "integer",
                              "minimum": 120,
                              "maximum": 480
                            },
                            "h": {
                              "type": "integer",
                              "minimum": 90,
                              "maximum": 400
                            },
                            "text": {
                              "type": "string",
                              "maxLength": 300
                            },
                            "color": {
                              "type": "string",
                              "pattern": "^#[0-9a-fA-F]{6}$"
                            },
                            "ref": {
                              "type": "string",
                              "description": "Entry id of a reference card."
                            },
                            "image": {
                              "type": "string",
                              "description": "Embedded PNG/JPEG/WebP data URI of an image card (under 300 KB)."
                            }
                          }
                        }
                      }
                    }
                  }
                }
              },
              "report": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "name",
                  "entries",
                  "favorites",
                  "withScreenshots",
                  "withUrls",
                  "types",
                  "platforms",
                  "tags",
                  "moodboardCards",
                  "bytes"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "entries": {
                    "type": "integer"
                  },
                  "favorites": {
                    "type": "integer"
                  },
                  "withScreenshots": {
                    "type": "integer"
                  },
                  "withUrls": {
                    "type": "integer"
                  },
                  "types": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer"
                    }
                  },
                  "platforms": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer"
                    }
                  },
                  "tags": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer"
                    }
                  },
                  "moodboardCards": {
                    "type": "integer"
                  },
                  "bytes": {
                    "type": "integer"
                  }
                }
              },
              "projectFile": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "htmlFile": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "openInApp": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      },
      "PageboardTagOrganizerInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "project": {
            "title": "Pageboard project JSON",
            "type": "string",
            "maxLength": 4000000,
            "default": "{\n  \"format\": \"pageboard-project\",\n  \"version\": 1,\n  \"name\": \"A small collection\",\n  \"entries\": [\n    {\n      \"id\": \"studio\",\n      \"title\": \"A quiet studio\",\n      \"url\": \"\",\n      \"type\": \"Portfolio\",\n      \"platform\": \"Desktop\",\n      \"tags\": [\n        \"Editorial\",\n        \"Typography\"\n      ],\n      \"notes\": \"Try a generous margin and a single strong headline.\",\n      \"favorite\": true,\n      \"accent\": \"#d9b99f\",\n      \"screenshot\": \"\"\n    },\n    {\n      \"id\": \"garden\",\n      \"title\": \"The garden journal\",\n      \"url\": \"\",\n      \"type\": \"Editorial\",\n      \"platform\": \"Mobile\",\n      \"tags\": [\n        \"Nature\",\n        \"Photography\"\n      ],\n      \"notes\": \"Look for a calm rhythm between image and text.\",\n      \"favorite\": false,\n      \"accent\": \"#a9b99d\",\n      \"screenshot\": \"\"\n    },\n    {\n      \"id\": \"objects\",\n      \"title\": \"Objects for everyday\",\n      \"url\": \"\",\n      \"type\": \"Shop\",\n      \"platform\": \"Desktop\",\n      \"tags\": [\n        \"Minimal\",\n        \"Product\"\n      ],\n      \"notes\": \"A restrained palette lets the objects stand out.\",\n      \"favorite\": false,\n      \"accent\": \"#bfc3d2\",\n      \"screenshot\": \"\"\n    },\n    {\n      \"id\": \"festival\",\n      \"title\": \"An independent festival\",\n      \"url\": \"\",\n      \"type\": \"Event\",\n      \"platform\": \"Mobile\",\n      \"tags\": [\n        \"Color\",\n        \"Typography\"\n      ],\n      \"notes\": \"Explore expressive type and a clear schedule.\",\n      \"favorite\": false,\n      \"accent\": \"#e2b878\",\n      \"screenshot\": \"\"\n    }\n  ],\n  \"moodboard\": {\n    \"items\": [\n      {\n        \"id\": \"m-studio\",\n        \"kind\": \"reference\",\n        \"x\": 60,\n        \"y\": 60,\n        \"w\": 260,\n        \"h\": 220,\n        \"text\": \"\",\n        \"color\": \"#d9b99f\",\n        \"ref\": \"studio\",\n        \"image\": \"\"\n      },\n      {\n        \"id\": \"m-garden\",\n        \"kind\": \"reference\",\n        \"x\": 360,\n        \"y\": 60,\n        \"w\": 220,\n        \"h\": 220,\n        \"text\": \"\",\n        \"color\": \"#a9b99d\",\n        \"ref\": \"garden\",\n        \"image\": \"\"\n      },\n      {\n        \"id\": \"m-note\",\n        \"kind\": \"note\",\n        \"x\": 620,\n        \"y\": 60,\n        \"w\": 240,\n        \"h\": 150,\n        \"text\": \"Calm, editorial, lots of white space.\",\n        \"color\": \"#fff6d8\",\n        \"ref\": \"\",\n        \"image\": \"\"\n      },\n      {\n        \"id\": \"m-sand\",\n        \"kind\": \"swatch\",\n        \"x\": 620,\n        \"y\": 240,\n        \"w\": 120,\n        \"h\": 110,\n        \"text\": \"Sand\",\n        \"color\": \"#d9b99f\",\n        \"ref\": \"\",\n        \"image\": \"\"\n      },\n      {\n        \"id\": \"m-moss\",\n        \"kind\": \"swatch\",\n        \"x\": 760,\n        \"y\": 240,\n        \"w\": 120,\n        \"h\": 110,\n        \"text\": \"Moss\",\n        \"color\": \"#6f7f5f\",\n        \"ref\": \"\",\n        \"image\": \"\"\n      }\n    ]\n  }\n}"
          },
          "action": {
            "title": "Tag action",
            "type": "string",
            "enum": [
              "normalize",
              "add",
              "remove"
            ],
            "default": "normalize"
          },
          "tag": {
            "title": "Tag to add or remove",
            "type": "string",
            "maxLength": 40,
            "default": ""
          }
        },
        "required": []
      },
      "PageboardTagOrganizerResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "project",
              "report",
              "changedEntries",
              "projectFile",
              "openInApp"
            ],
            "properties": {
              "project": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "title": "Pageboard project",
                "type": "object",
                "required": [
                  "format",
                  "version",
                  "name",
                  "entries"
                ],
                "properties": {
                  "format": {
                    "const": "pageboard-project"
                  },
                  "version": {
                    "const": 1
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "entries": {
                    "type": "array",
                    "maxItems": 100,
                    "items": {
                      "type": "object",
                      "required": [
                        "id",
                        "title",
                        "url",
                        "type",
                        "platform",
                        "tags",
                        "notes",
                        "favorite",
                        "accent",
                        "screenshot"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$"
                        },
                        "title": {
                          "type": "string",
                          "maxLength": 120
                        },
                        "url": {
                          "type": "string",
                          "maxLength": 2048
                        },
                        "type": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "platform": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "tags": {
                          "type": "array",
                          "maxItems": 8,
                          "items": {
                            "type": "string",
                            "maxLength": 40
                          }
                        },
                        "notes": {
                          "type": "string",
                          "maxLength": 4000
                        },
                        "favorite": {
                          "type": "boolean"
                        },
                        "accent": {
                          "type": "string",
                          "pattern": "^#[0-9a-fA-F]{6}$"
                        },
                        "screenshot": {
                          "type": "string",
                          "maxLength": 400040,
                          "pattern": "^(|data:image/(png|jpeg|webp);base64,[A-Za-z0-9+/]+=*)$"
                        }
                      }
                    }
                  },
                  "moodboard": {
                    "type": "object",
                    "description": "Optional spatial moodboard on a 1600 × 1000 canvas; array order is the stacking order.",
                    "required": [
                      "items"
                    ],
                    "properties": {
                      "items": {
                        "type": "array",
                        "maxItems": 80,
                        "items": {
                          "type": "object",
                          "required": [
                            "id",
                            "kind",
                            "x",
                            "y"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$"
                            },
                            "kind": {
                              "enum": [
                                "reference",
                                "note",
                                "swatch",
                                "image"
                              ]
                            },
                            "x": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1600
                            },
                            "y": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000
                            },
                            "w": {
                              "type": "integer",
                              "minimum": 120,
                              "maximum": 480
                            },
                            "h": {
                              "type": "integer",
                              "minimum": 90,
                              "maximum": 400
                            },
                            "text": {
                              "type": "string",
                              "maxLength": 300
                            },
                            "color": {
                              "type": "string",
                              "pattern": "^#[0-9a-fA-F]{6}$"
                            },
                            "ref": {
                              "type": "string",
                              "description": "Entry id of a reference card."
                            },
                            "image": {
                              "type": "string",
                              "description": "Embedded PNG/JPEG/WebP data URI of an image card (under 300 KB)."
                            }
                          }
                        }
                      }
                    }
                  }
                }
              },
              "report": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "name",
                  "entries",
                  "favorites",
                  "withScreenshots",
                  "withUrls",
                  "types",
                  "platforms",
                  "tags",
                  "moodboardCards",
                  "bytes"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "entries": {
                    "type": "integer"
                  },
                  "favorites": {
                    "type": "integer"
                  },
                  "withScreenshots": {
                    "type": "integer"
                  },
                  "withUrls": {
                    "type": "integer"
                  },
                  "types": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer"
                    }
                  },
                  "platforms": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer"
                    }
                  },
                  "tags": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "integer"
                    }
                  },
                  "moodboardCards": {
                    "type": "integer"
                  },
                  "bytes": {
                    "type": "integer"
                  }
                }
              },
              "changedEntries": {
                "type": "integer"
              },
              "projectFile": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "openInApp": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      },
      "A11ySnapshotInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "url": {
            "title": "Page URL",
            "description": "Fetched once, server-side, with the static HTML only (no JavaScript is executed).",
            "type": "string",
            "format": "uri"
          },
          "html": {
            "title": "Or paste HTML",
            "description": "Takes precedence over the URL. Useful for pages behind a login or local drafts.",
            "type": "string",
            "maxLength": 500000
          },
          "maxFindings": {
            "title": "Max findings listed",
            "type": "integer",
            "minimum": 5,
            "maximum": 500,
            "default": 100
          }
        },
        "required": []
      },
      "A11ySnapshotResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "origin",
              "stats",
              "totals",
              "findings",
              "findingsTruncated",
              "manualChecks",
              "criteriaWithFailures",
              "conformanceStatement"
            ],
            "properties": {
              "origin": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "kind",
                  "truncated"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "url",
                      "pasted"
                    ]
                  },
                  "requestedUrl": {
                    "type": "string"
                  },
                  "finalUrl": {
                    "type": "string"
                  },
                  "status": {
                    "type": "integer"
                  },
                  "contentType": {
                    "type": "string"
                  },
                  "fetchedAt": {
                    "type": "string"
                  },
                  "truncated": {
                    "type": "boolean"
                  }
                }
              },
              "stats": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "elements",
                  "images",
                  "imagesWithAlt",
                  "links",
                  "buttons",
                  "formControls",
                  "headings",
                  "h1Count",
                  "landmarks",
                  "tables",
                  "iframes",
                  "media",
                  "lang",
                  "title"
                ],
                "properties": {
                  "elements": {
                    "type": "integer"
                  },
                  "images": {
                    "type": "integer"
                  },
                  "imagesWithAlt": {
                    "type": "integer"
                  },
                  "links": {
                    "type": "integer"
                  },
                  "buttons": {
                    "type": "integer"
                  },
                  "formControls": {
                    "type": "integer"
                  },
                  "headings": {
                    "type": "integer"
                  },
                  "h1Count": {
                    "type": "integer"
                  },
                  "landmarks": {
                    "type": "integer"
                  },
                  "tables": {
                    "type": "integer"
                  },
                  "iframes": {
                    "type": "integer"
                  },
                  "media": {
                    "type": "integer"
                  },
                  "lang": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "totals": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "findings",
                  "failures",
                  "bestPractice",
                  "needsReview",
                  "critical",
                  "serious",
                  "moderate",
                  "minor"
                ],
                "properties": {
                  "findings": {
                    "type": "integer"
                  },
                  "failures": {
                    "type": "integer"
                  },
                  "bestPractice": {
                    "type": "integer"
                  },
                  "needsReview": {
                    "type": "integer"
                  },
                  "critical": {
                    "type": "integer"
                  },
                  "serious": {
                    "type": "integer"
                  },
                  "moderate": {
                    "type": "integer"
                  },
                  "minor": {
                    "type": "integer"
                  }
                }
              },
              "findings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "ruleId",
                    "title",
                    "wcag",
                    "level",
                    "kind",
                    "severity",
                    "message",
                    "selector",
                    "line",
                    "snippet"
                  ],
                  "properties": {
                    "ruleId": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "wcag": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^\\d\\.\\d\\.\\d+$"
                      }
                    },
                    "level": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "A",
                        "AA",
                        null
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "failure",
                        "best-practice",
                        "needs-review"
                      ]
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "critical",
                        "serious",
                        "moderate",
                        "minor"
                      ]
                    },
                    "message": {
                      "type": "string"
                    },
                    "selector": {
                      "type": "string"
                    },
                    "line": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "snippet": {
                      "type": "string"
                    }
                  }
                }
              },
              "findingsTruncated": {
                "type": "boolean"
              },
              "manualChecks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "sc",
                    "title",
                    "level",
                    "reason"
                  ],
                  "properties": {
                    "sc": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "level": {
                      "type": "string",
                      "enum": [
                        "A",
                        "AA"
                      ]
                    },
                    "reason": {
                      "type": "string"
                    }
                  }
                }
              },
              "criteriaWithFailures": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "WCAG 2.2 success criteria with at least one automated failure."
              },
              "conformanceStatement": {
                "type": "string"
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}