{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"SlideDrift Agent API","version":"1.0.0","summary":"Discovery and transport contract for the SlideDrift MCP server.","description":"SlideDrift's supported external agent interface is an OAuth-protected Model Context Protocol server. MCP clients discover the current tool names, descriptions, input schemas, output schemas, and safety annotations through the MCP initialize and tools/list methods. This OpenAPI document describes the HTTP transport, authorization metadata, and error shapes; it does not expose SlideDrift's private browser APIs as a public REST API."},"servers":[{"url":"https://slidedrift.com","description":"SlideDrift production"}],"tags":[{"name":"Discovery","description":"Public machine-readable descriptions of the supported agent interface."},{"name":"MCP","description":"OAuth-protected Streamable HTTP transport for SlideDrift MCP."}],"paths":{"/openapi.json":{"get":{"operationId":"getSlideDriftAgentOpenApi","summary":"Read the SlideDrift agent OpenAPI description","description":"Returns this public OpenAPI 3.1 document. It is a discovery contract and does not start a job or mutate account data.","tags":["Discovery"],"responses":{"200":{"description":"The current SlideDrift agent transport contract.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"operationId":"getSlideDriftProtectedResourceMetadata","summary":"Discover SlideDrift MCP authorization metadata","description":"Returns RFC 9728 protected-resource metadata, including the MCP resource URL, authorization server, and enforced SlideDrift permission vocabulary.","tags":["Discovery"],"responses":{"200":{"description":"Protected-resource metadata for the SlideDrift MCP server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtectedResourceMetadata"}}}}}}},"/api/mcp":{"post":{"operationId":"callSlideDriftMcp","summary":"Send a JSON-RPC request to SlideDrift MCP","description":"Sends an MCP JSON-RPC request over Streamable HTTP. Start with initialize, then use tools/list to retrieve the live function-calling schemas. Tool calls remain subject to ownership, plan, credit, scope, rate-limit, and explicit-confirmation checks. Current SlideDrift consent grants the displayed resource scopes as one connection bundle; selective scope grants are not yet offered in the UI.","tags":["MCP"],"security":[{"slideDriftOAuth":["carousels:read","carousels:write","brand_kits:read","exports:create","shares:write","social:write"]}],"requestBody":{"required":true,"description":"A Model Context Protocol JSON-RPC request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcRequest"}}}},"responses":{"200":{"description":"An MCP JSON-RPC response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcResponse"}}}},"400":{"description":"The JSON-RPC or MCP request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcResponse"}}}},"401":{"description":"A valid SlideDrift OAuth bearer token is required.","headers":{"WWW-Authenticate":{"description":"Bearer challenge with RFC 9728 protected-resource metadata URL.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpAuthorizationError"}}}}}}}},"components":{"securitySchemes":{"slideDriftOAuth":{"type":"oauth2","description":"OAuth 2.1 authorization-code flow with PKCE. SlideDrift validates issuer, audience, expiry, enabled connection state, account ownership, and the resource scopes below on every MCP request.","flows":{"authorizationCode":{"authorizationUrl":"https://hjrmfwntojhjkkvnebor.supabase.co/auth/v1/oauth/authorize","tokenUrl":"https://hjrmfwntojhjkkvnebor.supabase.co/auth/v1/oauth/token","scopes":{"carousels:read":"Read owned carousels, templates, jobs, credits, campaigns, and schedule state.","carousels:write":"Create and edit owned carousels and campaign drafts after required confirmations.","brand_kits:read":"Read brand kits owned by the connected SlideDrift account.","exports:create":"Create paid PDF or PNG exports after an exact quote and confirmation.","shares:write":"Create or disable public carousel share links after confirmation.","social:write":"Create, update, schedule, or cancel LinkedIn posts after the relevant confirmation."}}}}},"schemas":{"ProtectedResourceMetadata":{"type":"object","required":["resource","authorization_servers","scopes_supported"],"properties":{"resource":{"type":"string","format":"uri"},"authorization_servers":{"type":"array","minItems":1,"items":{"type":"string","format":"uri"}},"scopes_supported":{"type":"array","uniqueItems":true,"items":{"type":"string","enum":["carousels:read","carousels:write","brand_kits:read","exports:create","shares:write","social:write"]}}}},"JsonRpcRequest":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"method":{"type":"string","description":"MCP method such as initialize, tools/list, or tools/call."},"params":{"type":"object","additionalProperties":true}},"additionalProperties":false},"JsonRpcResponse":{"type":"object","required":["jsonrpc"],"properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"null"}]},"result":{"type":"object","additionalProperties":true},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"data":{"type":"object","additionalProperties":true}}}}},"McpAuthorizationError":{"type":"object","required":["error","error_description"],"properties":{"error":{"type":"string","examples":["invalid_token"]},"error_description":{"type":"string","examples":["No authorization provided"]}}},"ProblemDetails":{"type":"object","required":["type","title","status","detail","code","resolution"],"properties":{"type":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"code":{"type":"string"},"resolution":{"type":"string"},"instance":{"type":"string","format":"uri-reference"}}}}}}