{
  "openapi": "3.1.0",
  "info": {
    "title": "Lighthill PC MCP API",
    "version": "1.0.0",
    "summary": "Read-only access to Lighthill PC's public trade alerts and firm information.",
    "description": "A minimal Model Context Protocol (MCP) server exposed over Streamable HTTP. All operations are JSON-RPC 2.0 messages POSTed to a single endpoint. No authentication is required and nothing is written. Three tools are available: list_trade_alerts, read_trade_alert, and contact_lighthill. Content is provided for general information only and is not legal advice.",
    "termsOfService": "https://www.lighthill.law/terms",
    "contact": {
      "name": "Lighthill PC",
      "email": "contact@lighthill.law",
      "url": "https://www.lighthill.law/contact"
    }
  },
  "servers": [
    {
      "url": "https://www.lighthill.law"
    }
  ],
  "externalDocs": {
    "description": "Human-readable API documentation",
    "url": "https://www.lighthill.law/api"
  },
  "paths": {
    "/mcp": {
      "post": {
        "operationId": "mcpRpc",
        "summary": "MCP JSON-RPC endpoint",
        "description": "Accepts a single JSON-RPC 2.0 request or an array (batch). Supported methods: `initialize`, `tools/list`, `tools/call`. Tool results are returned as MCP content blocks of type `text`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/JsonRpcRequest"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/JsonRpcRequest"
                    }
                  }
                ]
              },
              "examples": {
                "initialize": {
                  "summary": "Handshake",
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 1,
                    "method": "initialize",
                    "params": {}
                  }
                },
                "toolsList": {
                  "summary": "Discover tools",
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 2,
                    "method": "tools/list"
                  }
                },
                "listTradeAlerts": {
                  "summary": "List all trade alerts",
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 3,
                    "method": "tools/call",
                    "params": {
                      "name": "list_trade_alerts",
                      "arguments": {}
                    }
                  }
                },
                "readTradeAlert": {
                  "summary": "Read one alert by slug or URL",
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 4,
                    "method": "tools/call",
                    "params": {
                      "name": "read_trade_alert",
                      "arguments": {
                        "url": "2026-10-26-section-338-canada-duties-product-scope-revised-effective"
                      }
                    }
                  }
                },
                "contact": {
                  "summary": "Firm contact details",
                  "value": {
                    "jsonrpc": "2.0",
                    "id": 5,
                    "method": "tools/call",
                    "params": {
                      "name": "contact_lighthill",
                      "arguments": {}
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response (result or error). Batch requests return an array.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/JsonRpcResponse"
                    },
                    {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/JsonRpcResponse"
                      }
                    }
                  ]
                }
              }
            }
          },
          "202": {
            "description": "Notification accepted (request had no id); empty body."
          },
          "405": {
            "description": "Method not allowed. Only POST is accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          }
        },
        "x-mcp": {
          "protocolVersion": "2025-06-18",
          "transport": "streamable-http",
          "serverCard": "https://www.lighthill.law/.well-known/mcp/server-card.json"
        }
      }
    },
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Service health",
        "description": "Health check in the draft-inadarei-api-health-check format.",
        "responses": {
          "200": {
            "description": "Service is healthy.",
            "content": {
              "application/health+json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          },
          "503": {
            "description": "Service is degraded or failing.",
            "content": {
              "application/health+json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "JsonRpcRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Omit for a notification (no response body)."
          },
          "method": {
            "type": "string",
            "enum": [
              "initialize",
              "tools/list",
              "tools/call"
            ]
          },
          "params": {
            "type": "object"
          }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "required": [
          "jsonrpc",
          "id"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "result": {
            "type": "object"
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "Health": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pass",
              "warn",
              "fail"
            ]
          },
          "version": {
            "type": "string"
          },
          "releaseId": {
            "type": "string"
          },
          "serviceId": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "checks": {
            "type": "object"
          },
          "links": {
            "type": "object"
          }
        }
      },
      "Tool": {
        "type": "object",
        "description": "MCP tool descriptor as returned by tools/list.",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "inputSchema": {
            "type": "object"
          }
        }
      }
    }
  },
  "tags": []
}
