{"openapi":"3.0.3","info":{"title":"LegalScout Public API","version":"1.3.0","description":"Agent-facing LegalScout HTTP API: health, discovery files, attorney directory, and the Streamable HTTP MCP endpoint. Authenticated product APIs (dashboard, billing, matters) are not part of this public surface.","contact":{"name":"LegalScout","email":"scout@legalscout.ai","url":"https://legalscout.net"}},"servers":[{"url":"https://legalscout.net","description":"Production (apex)"},{"url":"https://www.legalscout.net","description":"Production (www)"}],"tags":[{"name":"Discovery","description":"Machine-readable files for crawlers and agents"},{"name":"Directory","description":"Public attorney directory"},{"name":"MCP","description":"Model Context Protocol (Streamable HTTP)"}],"paths":{"/api/health":{"get":{"tags":["Discovery"],"operationId":"getHealth","summary":"Liveness check","responses":{"200":{"description":"Service is up","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"ok"}}}}}},"404":{"description":"Structured JSON error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonError"}}}},"500":{"description":"Structured JSON error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonError"}}}}}}},"/openapi.json":{"get":{"tags":["Discovery"],"operationId":"getOpenApiJson","summary":"OpenAPI 3 specification (JSON)","responses":{"200":{"description":"OpenAPI document","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/openapi.yaml":{"get":{"tags":["Discovery"],"operationId":"getOpenApiYaml","summary":"OpenAPI 3 specification (YAML)","responses":{"200":{"description":"OpenAPI document","content":{"application/yaml":{"schema":{"type":"string"}}}}}}},"/llms.txt":{"get":{"tags":["Discovery"],"operationId":"getLlmsTxt","summary":"Agent-oriented site index","responses":{"200":{"description":"Plain-text llms.txt","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/sitemap.xml":{"get":{"tags":["Discovery"],"operationId":"getSitemap","summary":"XML sitemap","responses":{"200":{"description":"Sitemap","content":{"application/xml":{"schema":{"type":"string"}}}}}}},"/.well-known/mcp.json":{"get":{"tags":["MCP"],"operationId":"getMcpServerCard","summary":"MCP server card (SEP-1649)","responses":{"200":{"description":"MCP server card","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/connect":{"get":{"tags":["MCP"],"operationId":"getConnectPage","summary":"Canonical MCP connection details (HTML or markdown via Accept)","responses":{"200":{"description":"Connection details","content":{"text/html":{"schema":{"type":"string"}},"text/markdown":{"schema":{"type":"string"}}}}}}},"/find-a-lawyer":{"get":{"tags":["Directory"],"operationId":"getAttorneyDirectory","summary":"Public discovery-enabled attorney directory","parameters":[{"name":"practice","in":"query","schema":{"type":"string"},"description":"Practice area filter"}],"responses":{"200":{"description":"Directory page","content":{"text/html":{"schema":{"type":"string"}},"text/markdown":{"schema":{"type":"string"}}}}}}},"/api/mcp":{"post":{"tags":["MCP"],"operationId":"postMcp","summary":"LegalScout MCP endpoint (Streamable HTTP / JSON-RPC)","description":"POST JSON-RPC 2.0 messages. Clients should send Accept: application/json, text/event-stream and MCP-Protocol-Version. Public tools work without auth.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method"],"properties":{"jsonrpc":{"type":"string","example":"2.0"},"id":{},"method":{"type":"string","example":"initialize"},"params":{"type":"object"}}}}}},"responses":{"200":{"description":"JSON-RPC result or SSE stream","content":{"application/json":{"schema":{"type":"object"}},"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"Structured JSON error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonError"}}}},"404":{"description":"Structured JSON error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonError"}}}}}},"get":{"tags":["MCP"],"operationId":"getMcpDiscover","summary":"Lightweight MCP discovery document (?discover=1)","parameters":[{"name":"discover","in":"query","schema":{"type":"string","example":"1"}}],"responses":{"200":{"description":"Discovery JSON when discover=1","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"schemas":{"JsonError":{"type":"object","required":["error","status"],"properties":{"error":{"type":"object","required":["code","message","hint"],"properties":{"code":{"type":"string","example":"NOT_FOUND"},"message":{"type":"string"},"hint":{"type":"string"}}},"status":{"type":"integer","example":404},"path":{"type":"string","nullable":true},"docs":{"type":"string","example":"https://legalscout.net/openapi.json"}}}}}}