{
  "$schema": "https://www.digitaltableteur.com/schemas/contract-spec/1.0/contract.schema.json",
  "specVersion": "1.0",
  "name": "MCPActionButton",
  "status": "beta",
  "description": "Button that invokes an MCP tool from chat and docs surfaces and reflects its pending, success, and error state.",
  "props": {
    "toolId": {
      "type": "string",
      "optional": false,
      "description": "Identifier for the MCP tool to invoke"
    },
    "payload": {
      "type": "Record<string, unknown>",
      "optional": true,
      "description": "Optional payload for the MCP call"
    },
    "onExecute": {
      "type": "(input: {\n    toolId: string;\n    payload?: Record<string, unknown>;\n  }) => Promise<unknown>",
      "optional": true,
      "description": "Async executor for the MCP action"
    },
    "onResult": {
      "type": "(result: unknown) => void",
      "optional": true,
      "description": "Callback for successful results"
    },
    "onError": {
      "type": "(error: unknown) => void",
      "optional": true,
      "description": "Callback for errors"
    },
    "children": {
      "type": "React.ReactNode",
      "optional": true,
      "description": "Button label override"
    }
  },
  "accessibility": {
    "criteria": [
      {
        "id": "axe-no-violations",
        "statement": "Required stories produce no axe violations at the configured severity.",
        "verification": "automated",
        "wcag": [
          "2.5.8"
        ],
        "check": "npm run test:stories:matrix:ci",
        "evidence": [
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-default.dark.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:27:15.868Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-default.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:14:34.000Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-default.light.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:20:40.927Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-example.dark.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:27:16.332Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-example.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:14:34.433Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-example.light.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:20:41.382Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-forced-colors.dark.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:27:16.567Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:14:34.662Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-forced-colors.light.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:20:41.613Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-playground.dark.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:27:16.097Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-playground.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:14:34.219Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-playground.light.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:20:41.161Z",
            "passed": true,
            "runner": "local-audit-fixes"
          }
        ]
      },
      {
        "id": "accessibility-tree",
        "statement": "The accessibility tree (role, name, state) matches the committed snapshot for every required story.",
        "verification": "automated",
        "wcag": [
          "1.3.1",
          "4.1.2"
        ],
        "check": "npm run test:stories:matrix:ci",
        "evidence": [
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-default.dark.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:27:15.868Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-default.forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:32:40.154Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-default.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:14:34.000Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-default.light.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:20:40.927Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-example.dark.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:27:16.332Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-example.forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:32:40.582Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-example.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:14:34.433Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-example.light.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:20:41.382Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-forced-colors.dark.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:27:16.567Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-forced-colors.forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:32:40.789Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:14:34.662Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-forced-colors.light.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:20:41.613Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-playground.dark.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:27:16.097Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-playground.forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:32:40.376Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-playground.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:14:34.219Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-playground.light.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:20:41.161Z",
            "passed": true,
            "runner": "local-audit-fixes"
          }
        ]
      },
      {
        "id": "forced-colors-real-browser",
        "statement": "The component remains legible and operable under a real browser forced-colors: active pass.",
        "verification": "automated",
        "check": "npm run test:stories:hc",
        "evidence": [
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-default.forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:32:40.154Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-example.forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:32:40.582Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-forced-colors.forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:32:40.789Z",
            "passed": true,
            "runner": "local-audit-fixes"
          },
          {
            "artifact": "../../../nextjs-app/shared/components/MCPActionButton/__a11y-evidence__/site-mcpactionbutton-playground.forced-colors.json",
            "sourceCommit": "ffbeeeec52e120b19494e2ac7b4dbab8ff13ceb3",
            "capturedAt": "2026-11-07T09:32:40.376Z",
            "passed": true,
            "runner": "local-audit-fixes"
          }
        ]
      },
      {
        "id": "human-a11y-review",
        "statement": "A human completed an end-to-end accessibility review of this component.",
        "verification": "manual",
        "note": "2026-05-28 — Promoted from alpha: Example + ForcedColors stories present; Storybook axe gate enabled.",
        "reviewedAt": "2026-05-28"
      }
    ]
  },
  "source": [
    "../../../nextjs-app/shared/components/MCPActionButton/MCPActionButton.module.css",
    "../../../nextjs-app/shared/components/MCPActionButton/MCPActionButton.tsx"
  ]
}
