{
  "openapi": "3.1.0",
  "info": {
    "title": "OpenConnector runtime API reference",
    "version": "0.1.0",
    "description": "Versioned reference for a self-hosted OpenConnector runtime. This website hosts documentation, not an executable connector API. Set runtimeUrl to your own deployment. Authentication depends on your deployment configuration: admin credentials protect management operations, while runtime tokens authorize runtime and MCP clients. Discover provider-specific Action input and output schemas from the runtime catalog or its per-Action OpenAPI document.",
    "license": {
      "name": "Apache-2.0",
      "url": "https://github.com/oomol-lab/open-connector/blob/72de05b1d17b132ff50d1e768679f77ff8e8f3ff/LICENSE.txt"
    }
  },
  "tags": [
    {
      "name": "System",
      "description": "Runtime health and server-level status."
    },
    {
      "name": "Catalog",
      "description": "Provider and action metadata used by users and agents."
    },
    {
      "name": "Connections",
      "description": "Local provider credentials and connection state."
    },
    {
      "name": "OAuth",
      "description": "Local OAuth client configuration and authorization flow."
    },
    {
      "name": "Access",
      "description": "Runtime execution policy and bearer tokens for /v1 and MCP clients."
    },
    {
      "name": "Files",
      "description": "Local temporary file transit for provider actions."
    },
    {
      "name": "Runs",
      "description": "Local action execution and recent run history."
    },
    {
      "name": "Proxy",
      "description": "Provider API proxy requests through local credentials."
    },
    {
      "name": "MCP",
      "description": "Stateless MCP POST endpoint and tool metadata."
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "tags": [
          "System"
        ],
        "summary": "Unauthenticated process health check.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "ok"
                  ],
                  "description": "Process health payload."
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get_health",
        "description": "Unauthenticated process health check."
      }
    },
    "/v1/health": {
      "get": {
        "tags": [
          "System"
        ],
        "summary": "Runtime health check.",
        "description": "Runtime health check.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "runtime": {
                          "type": "string",
                          "description": "Runtime identifier."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "ok",
                        "runtime"
                      ],
                      "description": "Runtime health payload."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          }
        },
        "operationId": "get_v1_health"
      }
    },
    "/api/auth/session": {
      "get": {
        "tags": [
          "System"
        ],
        "summary": "Read local admin auth session state.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LocalAuthSession"
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get_api_auth_session",
        "description": "Read local admin auth session state."
      }
    },
    "/api/auth/logout": {
      "post": {
        "tags": [
          "System"
        ],
        "summary": "Clear the local admin auth cookie.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "ok"
                  ],
                  "description": "Local auth logout response."
                }
              }
            }
          }
        },
        "operationId": "post_api_auth_logout",
        "description": "Clear the local admin auth cookie."
      }
    },
    "/api/providers": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "List provider catalog entries.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ProviderDefinition"
                  }
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get_api_providers",
        "description": "List provider catalog entries."
      }
    },
    "/api/providers/{service}": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Get one provider catalog entry.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderDefinition"
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get_api_providers_by_service",
        "description": "Get one provider catalog entry."
      }
    },
    "/api/actions": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "List all catalog actions.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ActionDefinition"
                  }
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get_api_actions",
        "description": "List all catalog actions."
      }
    },
    "/api/actions/search": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Fuzzy keyword search over the action catalog.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ActionSearchResult"
                  }
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get_api_actions_search",
        "description": "Fuzzy keyword search over the action catalog."
      }
    },
    "/v1/providers": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "List public provider catalog entries.",
        "description": "Closest HTTP analog of MCP list_apps. Categories are objects; MCP list_apps returns strings.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional case-insensitive filter over service, display name, scenario, category, or auth type."
          },
          {
            "name": "service",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Optional provider service id. Repeat to include multiple providers."
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RuntimeProviderMetadata"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          }
        },
        "operationId": "get_v1_providers"
      }
    },
    "/v1/actions": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "List action services, or actions for one service.",
        "description": "Without service, data is [{service}]. With service, data is RuntimeActionMetadata.",
        "parameters": [
          {
            "name": "service",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Provider service id. Omit to list services instead of actions."
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "anyOf": [
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/RuntimeActionService"
                          }
                        },
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/RuntimeActionMetadata"
                          }
                        }
                      ],
                      "description": "Runtime action index payload."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          }
        },
        "operationId": "get_v1_actions"
      }
    },
    "/v1/actions/search": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Fuzzy keyword search over the action catalog.",
        "description": "Fuzzy keyword search over the action catalog.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search text. Provide either q or query."
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Alias for q. Provide either q or query."
          },
          {
            "name": "service",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional provider service id."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            },
            "description": "Maximum actions to return. Defaults to 10. Maximum 50."
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ActionSearchResult"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          },
          "400": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          }
        },
        "operationId": "get_v1_actions_search"
      }
    },
    "/v1/providers/{service}/setup": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "Describe the inputs a provider needs before it can be connected.",
        "description": "Requires administrator authentication. Lists credential fields, OAuth client inputs, scopes, registration help, the callback URL to register and the OAuth client inputs still missing. Never includes saved values.",
        "parameters": [
          {
            "name": "service",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "service path parameter."
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "service": {
                          "type": "string"
                        },
                        "auth": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "no_auth",
                                  "api_key",
                                  "custom_credential",
                                  "oauth2"
                                ],
                                "description": "Credential type."
                              },
                              "fields": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "inputType": {
                                      "type": "string",
                                      "enum": [
                                        "text",
                                        "password",
                                        "textarea",
                                        "json"
                                      ],
                                      "description": "Suggested form control."
                                    },
                                    "required": {
                                      "type": "boolean"
                                    },
                                    "secret": {
                                      "type": "boolean",
                                      "description": "Whether the value is stored as a secret and never returned."
                                    },
                                    "placeholder": {
                                      "type": "string",
                                      "description": "Input placeholder."
                                    },
                                    "description": {
                                      "type": "string",
                                      "description": "Where the user obtains this value."
                                    },
                                    "location": {
                                      "type": "string",
                                      "enum": [
                                        "extra",
                                        "secretExtra"
                                      ],
                                      "description": "Request object an OAuth client field is submitted in; absent for clientId and clientSecret."
                                    },
                                    "defaultValue": {
                                      "type": "string",
                                      "description": "Value applied when an OAuth client field is omitted."
                                    }
                                  },
                                  "additionalProperties": false,
                                  "required": [
                                    "key",
                                    "label",
                                    "inputType",
                                    "required",
                                    "secret"
                                  ],
                                  "description": "One input a connection or OAuth client form asks for."
                                }
                              },
                              "clientFields": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "key": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "inputType": {
                                      "type": "string",
                                      "enum": [
                                        "text",
                                        "password",
                                        "textarea",
                                        "json"
                                      ],
                                      "description": "Suggested form control."
                                    },
                                    "required": {
                                      "type": "boolean"
                                    },
                                    "secret": {
                                      "type": "boolean",
                                      "description": "Whether the value is stored as a secret and never returned."
                                    },
                                    "placeholder": {
                                      "type": "string",
                                      "description": "Input placeholder."
                                    },
                                    "description": {
                                      "type": "string",
                                      "description": "Where the user obtains this value."
                                    },
                                    "location": {
                                      "type": "string",
                                      "enum": [
                                        "extra",
                                        "secretExtra"
                                      ],
                                      "description": "Request object an OAuth client field is submitted in; absent for clientId and clientSecret."
                                    },
                                    "defaultValue": {
                                      "type": "string",
                                      "description": "Value applied when an OAuth client field is omitted."
                                    }
                                  },
                                  "additionalProperties": false,
                                  "required": [
                                    "key",
                                    "label",
                                    "inputType",
                                    "required",
                                    "secret"
                                  ],
                                  "description": "One input a connection or OAuth client form asks for."
                                }
                              },
                              "clientSetup": {
                                "type": "object",
                                "properties": {
                                  "docsUrl": {
                                    "type": "string",
                                    "description": "Provider page where the OAuth app is registered."
                                  },
                                  "steps": {
                                    "type": "array",
                                    "items": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "description": "Ordered setup steps."
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "steps"
                                ],
                                "description": "How to register the provider OAuth app."
                              },
                              "scopes": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "description": "Provider scopes the connector requests."
                              },
                              "authorizationOptions": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "label": {
                                      "type": "string"
                                    },
                                    "description": {
                                      "type": "string"
                                    },
                                    "required": {
                                      "type": "boolean"
                                    },
                                    "defaultSelected": {
                                      "type": "boolean"
                                    },
                                    "risk": {
                                      "type": "string",
                                      "enum": [
                                        "standard",
                                        "sensitive",
                                        "destructive"
                                      ],
                                      "description": "How much access the option grants."
                                    },
                                    "requires": {
                                      "type": "array",
                                      "items": {
                                        "type": "string",
                                        "minLength": 1
                                      },
                                      "description": "Option ids that must be selected together with this one."
                                    }
                                  },
                                  "additionalProperties": false,
                                  "required": [
                                    "id",
                                    "label",
                                    "description",
                                    "required",
                                    "defaultSelected",
                                    "risk"
                                  ],
                                  "description": "One selectable authorization option."
                                }
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "type"
                            ],
                            "description": "One supported credential type with its form metadata."
                          }
                        },
                        "oauthClient": {
                          "type": "object",
                          "properties": {
                            "configured": {
                              "type": "boolean"
                            },
                            "customClientAvailable": {
                              "type": "boolean",
                              "description": "Whether connections may carry their own OAuth client."
                            },
                            "expectedRedirectUri": {
                              "type": "string",
                              "description": "Callback URL to register with the provider."
                            },
                            "missingFields": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              },
                              "description": "Required client inputs absent from the stored configuration."
                            }
                          },
                          "additionalProperties": false,
                          "description": "OAuth client configuration state; present when the provider supports OAuth."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "service",
                        "auth"
                      ],
                      "description": "Setup requirements and OAuth client state for one provider, without saved values."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          },
          "401": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "403": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          }
        },
        "operationId": "get_v1_providers_by_service_setup"
      }
    },
    "/v1/connections": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "List manageable connections.",
        "description": "List manageable connections.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "reauth_required",
                "error",
                "disconnected"
              ],
              "description": "Connection state."
            },
            "description": "Filter by current connection state."
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Stable local connection identifier."
                          },
                          "service": {
                            "type": "string",
                            "description": "Provider service identifier."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "reauth_required",
                              "error",
                              "disconnected"
                            ],
                            "description": "Current connection state."
                          },
                          "alias": {
                            "type": "string",
                            "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
                          },
                          "authType": {
                            "type": "string",
                            "description": "Connection authentication type."
                          },
                          "displayName": {
                            "type": "string",
                            "description": "Human-readable account label."
                          },
                          "accountLabel": {
                            "type": "string",
                            "description": "Same value as displayName. Kept for existing /v1 clients."
                          },
                          "isDefault": {
                            "type": "boolean",
                            "description": "Whether this is the default connection. Same fact as MCP default."
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Granted scopes. Same fact as MCP profile.grantedScopes."
                          },
                          "marketplace": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "Marketplace identifier."
                              },
                              "pricing": {
                                "type": "string",
                                "enum": [
                                  "free",
                                  "metered"
                                ]
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "id",
                              "pricing"
                            ],
                            "description": "Marketplace source for a virtual connection."
                          },
                          "providerAccountId": {
                            "type": "string",
                            "description": "The provider account identifier."
                          },
                          "comment": {
                            "anyOf": [
                              {
                                "type": "string",
                                "description": "An optional administrator note."
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "additionalProperties": false,
                        "description": "A stored connection visible to the administrator."
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          },
          "401": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "403": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          }
        },
        "operationId": "get_v1_connections"
      }
    },
    "/v1/connections/by-id/{appId}": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "Get the current connection state.",
        "description": "Get the current connection state.",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "appId path parameter."
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Stable local connection identifier."
                        },
                        "service": {
                          "type": "string",
                          "description": "Provider service identifier."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "reauth_required",
                            "error",
                            "disconnected"
                          ],
                          "description": "Current connection state."
                        },
                        "alias": {
                          "type": "string",
                          "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
                        },
                        "authType": {
                          "type": "string",
                          "description": "Connection authentication type."
                        },
                        "displayName": {
                          "type": "string",
                          "description": "Human-readable account label."
                        },
                        "accountLabel": {
                          "type": "string",
                          "description": "Same value as displayName. Kept for existing /v1 clients."
                        },
                        "isDefault": {
                          "type": "boolean",
                          "description": "Whether this is the default connection. Same fact as MCP default."
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Granted scopes. Same fact as MCP profile.grantedScopes."
                        },
                        "marketplace": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Marketplace identifier."
                            },
                            "pricing": {
                              "type": "string",
                              "enum": [
                                "free",
                                "metered"
                              ]
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "id",
                            "pricing"
                          ],
                          "description": "Marketplace source for a virtual connection."
                        },
                        "providerAccountId": {
                          "type": "string",
                          "description": "The provider account identifier."
                        },
                        "comment": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "An optional administrator note."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "description": "A stored connection visible to the administrator."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          },
          "401": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "403": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          }
        },
        "operationId": "get_v1_connections_by_id_by_appId"
      }
    },
    "/v1/connection-requests/{connectionRequestId}": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "Get an OAuth authorization result.",
        "description": "Requires the initiating management principal. A consumed callback does not remove the result. Responses use Cache-Control: private, no-store.",
        "parameters": [
          {
            "name": "connectionRequestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "connectionRequestId path parameter."
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "connectionRequestId": {
                          "type": "string"
                        },
                        "service": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "initiated",
                            "connected",
                            "failed",
                            "expired"
                          ],
                          "description": "Authorization request status."
                        },
                        "appId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "The exact connection created or reconnected."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "errorCode": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "Safe failure code, including request_superseded."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "errorMessage": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "Safe failure message."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "expiresAt": {
                          "type": "string"
                        },
                        "createdAt": {
                          "type": "number"
                        },
                        "updatedAt": {
                          "type": "number"
                        }
                      },
                      "additionalProperties": false,
                      "description": "One authorization attempt; results remain available until expiresAt plus 24 hours."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          },
          "401": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "403": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          }
        },
        "operationId": "get_v1_connection_requests_by_connectionRequestId"
      }
    },
    "/v1/connections/{service}/connect": {
      "post": {
        "tags": [
          "Connections"
        ],
        "summary": "Create OAuth connection.",
        "description": "Requires administrator credentials. OAuth returns an authorization request; API key and custom credentials return the saved connection synchronously.",
        "parameters": [
          {
            "name": "service",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "service path parameter."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "returnUri": {
                    "type": "string"
                  },
                  "authorizationOptionIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "extra": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "secretExtra": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "authorizationUrl": {
                          "type": "string"
                        },
                        "stateHandle": {
                          "type": "string"
                        },
                        "connectionRequestId": {
                          "type": "string"
                        },
                        "status": {
                          "const": "initiated",
                          "type": "string"
                        },
                        "expiresAt": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false,
                      "description": "An OAuth authorization attempt. Poll connectionRequestId to obtain its result."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          },
          "400": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "401": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "403": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "409": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          }
        },
        "operationId": "post_v1_connections_by_service_connect"
      }
    },
    "/v1/connections/{service}/connect/api-key": {
      "post": {
        "tags": [
          "Connections"
        ],
        "summary": "Create /api-key connection.",
        "description": "Requires administrator credentials. OAuth returns an authorization request; API key and custom credentials return the saved connection synchronously.",
        "parameters": [
          {
            "name": "service",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "service path parameter."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "apiKey": {
                    "type": "string"
                  },
                  "extra": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "comment": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "apiKey"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Stable local connection identifier."
                        },
                        "service": {
                          "type": "string",
                          "description": "Provider service identifier."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "reauth_required",
                            "error",
                            "disconnected"
                          ],
                          "description": "Current connection state."
                        },
                        "alias": {
                          "type": "string",
                          "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
                        },
                        "authType": {
                          "type": "string",
                          "description": "Connection authentication type."
                        },
                        "displayName": {
                          "type": "string",
                          "description": "Human-readable account label."
                        },
                        "accountLabel": {
                          "type": "string",
                          "description": "Same value as displayName. Kept for existing /v1 clients."
                        },
                        "isDefault": {
                          "type": "boolean",
                          "description": "Whether this is the default connection. Same fact as MCP default."
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Granted scopes. Same fact as MCP profile.grantedScopes."
                        },
                        "marketplace": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Marketplace identifier."
                            },
                            "pricing": {
                              "type": "string",
                              "enum": [
                                "free",
                                "metered"
                              ]
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "id",
                            "pricing"
                          ],
                          "description": "Marketplace source for a virtual connection."
                        },
                        "providerAccountId": {
                          "type": "string",
                          "description": "The provider account identifier."
                        },
                        "comment": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "An optional administrator note."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "description": "A stored connection visible to the administrator."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          },
          "400": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "401": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "403": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "409": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          }
        },
        "operationId": "post_v1_connections_by_service_connect_api_key"
      }
    },
    "/v1/connections/{service}/connect/custom-credential": {
      "post": {
        "tags": [
          "Connections"
        ],
        "summary": "Create /custom-credential connection.",
        "description": "Requires administrator credentials. OAuth returns an authorization request; API key and custom credentials return the saved connection synchronously.",
        "parameters": [
          {
            "name": "service",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "service path parameter."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "values": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "comment": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "values"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Stable local connection identifier."
                        },
                        "service": {
                          "type": "string",
                          "description": "Provider service identifier."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "reauth_required",
                            "error",
                            "disconnected"
                          ],
                          "description": "Current connection state."
                        },
                        "alias": {
                          "type": "string",
                          "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
                        },
                        "authType": {
                          "type": "string",
                          "description": "Connection authentication type."
                        },
                        "displayName": {
                          "type": "string",
                          "description": "Human-readable account label."
                        },
                        "accountLabel": {
                          "type": "string",
                          "description": "Same value as displayName. Kept for existing /v1 clients."
                        },
                        "isDefault": {
                          "type": "boolean",
                          "description": "Whether this is the default connection. Same fact as MCP default."
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Granted scopes. Same fact as MCP profile.grantedScopes."
                        },
                        "marketplace": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Marketplace identifier."
                            },
                            "pricing": {
                              "type": "string",
                              "enum": [
                                "free",
                                "metered"
                              ]
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "id",
                            "pricing"
                          ],
                          "description": "Marketplace source for a virtual connection."
                        },
                        "providerAccountId": {
                          "type": "string",
                          "description": "The provider account identifier."
                        },
                        "comment": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "An optional administrator note."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "description": "A stored connection visible to the administrator."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          },
          "400": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "401": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "403": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "409": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          }
        },
        "operationId": "post_v1_connections_by_service_connect_custom_credential"
      }
    },
    "/v1/connections/by-id/{appId}/connect": {
      "post": {
        "tags": [
          "Connections"
        ],
        "summary": "Reconnect OAuth connection.",
        "description": "Requires administrator credentials. OAuth returns an authorization request; API key and custom credentials return the saved connection synchronously.",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "appId path parameter."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "returnUri": {
                    "type": "string"
                  },
                  "authorizationOptionIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "extra": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "secretExtra": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "authorizationUrl": {
                          "type": "string"
                        },
                        "stateHandle": {
                          "type": "string"
                        },
                        "connectionRequestId": {
                          "type": "string"
                        },
                        "status": {
                          "const": "initiated",
                          "type": "string"
                        },
                        "expiresAt": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false,
                      "description": "An OAuth authorization attempt. Poll connectionRequestId to obtain its result."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          },
          "400": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "401": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "403": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "409": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          }
        },
        "operationId": "post_v1_connections_by_id_by_appId_connect"
      }
    },
    "/v1/connections/by-id/{appId}/connect/api-key": {
      "post": {
        "tags": [
          "Connections"
        ],
        "summary": "Reconnect /api-key connection.",
        "description": "Requires administrator credentials. OAuth returns an authorization request; API key and custom credentials return the saved connection synchronously.",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "appId path parameter."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "apiKey": {
                    "type": "string"
                  },
                  "extra": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "comment": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "apiKey"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Stable local connection identifier."
                        },
                        "service": {
                          "type": "string",
                          "description": "Provider service identifier."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "reauth_required",
                            "error",
                            "disconnected"
                          ],
                          "description": "Current connection state."
                        },
                        "alias": {
                          "type": "string",
                          "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
                        },
                        "authType": {
                          "type": "string",
                          "description": "Connection authentication type."
                        },
                        "displayName": {
                          "type": "string",
                          "description": "Human-readable account label."
                        },
                        "accountLabel": {
                          "type": "string",
                          "description": "Same value as displayName. Kept for existing /v1 clients."
                        },
                        "isDefault": {
                          "type": "boolean",
                          "description": "Whether this is the default connection. Same fact as MCP default."
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Granted scopes. Same fact as MCP profile.grantedScopes."
                        },
                        "marketplace": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Marketplace identifier."
                            },
                            "pricing": {
                              "type": "string",
                              "enum": [
                                "free",
                                "metered"
                              ]
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "id",
                            "pricing"
                          ],
                          "description": "Marketplace source for a virtual connection."
                        },
                        "providerAccountId": {
                          "type": "string",
                          "description": "The provider account identifier."
                        },
                        "comment": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "An optional administrator note."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "description": "A stored connection visible to the administrator."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          },
          "400": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "401": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "403": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "409": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          }
        },
        "operationId": "post_v1_connections_by_id_by_appId_connect_api_key"
      }
    },
    "/v1/connections/by-id/{appId}/connect/custom-credential": {
      "post": {
        "tags": [
          "Connections"
        ],
        "summary": "Reconnect /custom-credential connection.",
        "description": "Requires administrator credentials. OAuth returns an authorization request; API key and custom credentials return the saved connection synchronously.",
        "parameters": [
          {
            "name": "appId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "appId path parameter."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "values": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "comment": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "values"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Stable local connection identifier."
                        },
                        "service": {
                          "type": "string",
                          "description": "Provider service identifier."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "reauth_required",
                            "error",
                            "disconnected"
                          ],
                          "description": "Current connection state."
                        },
                        "alias": {
                          "type": "string",
                          "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
                        },
                        "authType": {
                          "type": "string",
                          "description": "Connection authentication type."
                        },
                        "displayName": {
                          "type": "string",
                          "description": "Human-readable account label."
                        },
                        "accountLabel": {
                          "type": "string",
                          "description": "Same value as displayName. Kept for existing /v1 clients."
                        },
                        "isDefault": {
                          "type": "boolean",
                          "description": "Whether this is the default connection. Same fact as MCP default."
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Granted scopes. Same fact as MCP profile.grantedScopes."
                        },
                        "marketplace": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Marketplace identifier."
                            },
                            "pricing": {
                              "type": "string",
                              "enum": [
                                "free",
                                "metered"
                              ]
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "id",
                            "pricing"
                          ],
                          "description": "Marketplace source for a virtual connection."
                        },
                        "providerAccountId": {
                          "type": "string",
                          "description": "The provider account identifier."
                        },
                        "comment": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": "An optional administrator note."
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "description": "A stored connection visible to the administrator."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          },
          "400": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "401": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "403": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "409": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          }
        },
        "operationId": "post_v1_connections_by_id_by_appId_connect_custom_credential"
      }
    },
    "/v1/apps": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "List connected accounts.",
        "description": "RuntimeConnectedApp rows, not the provider catalog. Use GET /v1/providers or MCP list_apps for providers.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RuntimeConnectedApp"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          }
        },
        "operationId": "get_v1_apps"
      }
    },
    "/v1/apps/authenticated": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "Return authenticated provider service IDs from the supplied candidates.",
        "description": "Return authenticated provider service IDs from the supplied candidates.",
        "parameters": [
          {
            "name": "service",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Candidate service id to check. Repeat to check multiple services."
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Authenticated service IDs from the supplied candidates."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          }
        },
        "operationId": "get_v1_apps_authenticated"
      }
    },
    "/v1/apps/services/{service}": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "List connected accounts for one provider.",
        "description": "List connected accounts for one provider.",
        "parameters": [
          {
            "name": "service",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Provider service identifier."
            },
            "description": "Provider service identifier."
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RuntimeConnectedApp"
                      }
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          },
          "400": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          }
        },
        "operationId": "get_v1_apps_services_by_service"
      }
    },
    "/api/actions/{actionId}": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Get one catalog action.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActionDefinition"
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get_api_actions_by_actionId",
        "description": "Get one catalog action."
      }
    },
    "/api/actions/{actionId}/agent.md": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Get one markdown action guide.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "description": "Markdown guide for one action."
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get_api_actions_by_actionId_agent_md",
        "description": "Get one markdown action guide."
      }
    },
    "/api/connections": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "List local provider connections.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConnectionSummary"
                  }
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get_api_connections",
        "description": "List local provider connections."
      }
    },
    "/api/connections/{service}": {
      "put": {
        "tags": [
          "Connections"
        ],
        "summary": "Create or replace a local provider connection.",
        "description": "The accepted auth type and credential field keys are declared by the provider catalog auth metadata. Unknown fields are rejected.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionUpsertRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionSummary"
                }
              }
            }
          },
          "400": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "put_api_connections_by_service"
      },
      "delete": {
        "tags": [
          "Connections"
        ],
        "summary": "Disconnect a provider.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ConnectionSummary"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "service": {
                          "type": "string"
                        },
                        "configured": {
                          "const": false,
                          "type": "boolean"
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "service",
                        "configured"
                      ],
                      "description": "Disconnected provider summary."
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "delete_api_connections_by_service",
        "description": "Disconnect a provider."
      }
    },
    "/api/oauth/configs": {
      "get": {
        "tags": [
          "OAuth"
        ],
        "summary": "List local OAuth client configurations.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OAuthClientConfigSummary"
                  }
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get_api_oauth_configs",
        "description": "List local OAuth client configurations."
      }
    },
    "/api/oauth/configs/{service}": {
      "put": {
        "tags": [
          "OAuth"
        ],
        "summary": "Upsert local OAuth client configuration.",
        "description": "Open-source users provide their own OAuth app. requestedScopes may narrow the provider-declared defaults but cannot add scopes. Additional extra fields are declared by provider catalog auth metadata.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OAuthClientConfigRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OAuthClientConfigSummary"
                }
              }
            }
          },
          "400": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "put_api_oauth_configs_by_service"
      },
      "delete": {
        "tags": [
          "OAuth"
        ],
        "summary": "Delete local OAuth client configuration.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "service": {
                      "type": "string"
                    },
                    "configured": {
                      "const": false,
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "service",
                    "configured"
                  ],
                  "description": "Deleted OAuth client config summary."
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "delete_api_oauth_configs_by_service",
        "description": "Delete local OAuth client configuration."
      }
    },
    "/api/oauth/authorizations": {
      "post": {
        "tags": [
          "OAuth"
        ],
        "summary": "Start provider OAuth authorization.",
        "description": "The console may provide a connection-scoped OAuth app through clientId/clientSecret and provider-declared extra fields. The provider must be enabled through OOMOL_CONNECT_ALLOWED_CUSTOM_OAUTH and pending OAuth state requires OOMOL_CONNECT_ENCRYPTION_KEY.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "service": {
                    "type": "string",
                    "description": "Provider service identifier."
                  },
                  "connectionName": {
                    "type": "string",
                    "description": "Optional local connection name. Defaults to default."
                  },
                  "clientId": {
                    "type": "string",
                    "description": "Optional connection-scoped OAuth app client id."
                  },
                  "clientSecret": {
                    "type": "string",
                    "description": "Optional connection-scoped OAuth app client secret."
                  },
                  "requestedScopes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Optional non-empty provider-declared scope subset to request.",
                    "minItems": 1
                  },
                  "authorizationOptionIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Optional provider authorization option ids selected for this connection."
                  },
                  "extra": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Provider-declared non-secret OAuth client fields."
                  },
                  "secretExtra": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Provider-declared secret OAuth client fields."
                  }
                },
                "additionalProperties": false,
                "required": [
                  "service"
                ],
                "description": "OAuth authorization creation request."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "service": {
                      "type": "string"
                    },
                    "authorizationUrl": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "service",
                    "authorizationUrl",
                    "state"
                  ],
                  "description": "OAuth authorization start response."
                }
              }
            }
          },
          "400": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "post_api_oauth_authorizations"
      }
    },
    "/api/runtime-tokens": {
      "get": {
        "tags": [
          "Access"
        ],
        "summary": "List runtime API token summaries.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RuntimeTokenSummary"
                  }
                }
              }
            }
          }
        },
        "operationId": "get_api_runtime_tokens",
        "description": "List runtime API token summaries."
      },
      "post": {
        "tags": [
          "Access"
        ],
        "summary": "Create a runtime API token.",
        "description": "The plaintext token is returned once. Only a hash is stored locally. Policy request bodies must not exceed 262144 bytes.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RuntimeTokenCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "string",
                      "description": "Plaintext runtime bearer token. Store it now."
                    },
                    "record": {
                      "$ref": "#/components/schemas/RuntimeTokenSummary"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "token",
                    "record"
                  ],
                  "description": "Runtime token creation response."
                }
              }
            }
          },
          "400": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "post_api_runtime_tokens"
      }
    },
    "/api/runtime-tokens/{id}": {
      "put": {
        "tags": [
          "Access"
        ],
        "summary": "Replace one stored runtime token's permissions.",
        "description": "Policy request bodies must not exceed 262144 bytes.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenPolicy"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimeTokenSummary"
                }
              }
            }
          },
          "400": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "put_api_runtime_tokens_by_id"
      },
      "delete": {
        "tags": [
          "Access"
        ],
        "summary": "Revoke a runtime API token.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "revoked": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "id",
                    "revoked"
                  ],
                  "description": "Runtime token revocation response."
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "delete_api_runtime_tokens_by_id",
        "description": "Revoke a runtime API token."
      }
    },
    "/api/runtime-policy": {
      "get": {
        "tags": [
          "Access"
        ],
        "summary": "Read deployment and persisted Runtime policy layers.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimePolicyState"
                }
              }
            }
          },
          "500": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get_api_runtime_policy",
        "description": "Read deployment and persisted Runtime policy layers."
      },
      "put": {
        "tags": [
          "Access"
        ],
        "summary": "Replace the persisted Runtime action and proxy policy.",
        "description": "Deployment policy remains read-only. Block rules take precedence and non-empty allowlists intersect. Policy request bodies must not exceed 262144 bytes.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicyRules"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuntimePolicyState"
                }
              }
            }
          },
          "400": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "put_api_runtime_policy"
      }
    },
    "/api/files": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "Upload one local transit file.",
        "description": "Stores one temporary local file and returns a download URL for connector actions.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "File content to upload."
                  }
                },
                "additionalProperties": false,
                "required": [
                  "file"
                ],
                "description": "Transit file upload request."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransitFileUpload"
                }
              }
            }
          },
          "400": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "post_api_files"
      }
    },
    "/api/files/{fileId}": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "Download one local transit file.",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Opaque local transit file identifier."
            },
            "description": "Opaque local transit file identifier."
          }
        ],
        "responses": {
          "200": {
            "description": "Transit file bytes.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get_api_files_by_fileId",
        "description": "Download one local transit file."
      },
      "delete": {
        "tags": [
          "Files"
        ],
        "summary": "Delete one local transit file.",
        "parameters": [
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Opaque local transit file identifier."
            },
            "description": "Opaque local transit file identifier."
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fileId": {
                      "type": "string"
                    },
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "fileId",
                    "deleted"
                  ],
                  "description": "Transit file deletion response."
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "delete_api_files_by_fileId",
        "description": "Delete one local transit file."
      }
    },
    "/v1/actions/{actionId}": {
      "get": {
        "tags": [
          "Catalog"
        ],
        "summary": "Get one runtime action.",
        "parameters": [
          {
            "name": "actionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Action id, usually <service>.<name>."
            },
            "description": "Action id, usually <service>.<name>."
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/RuntimeActionMetadata"
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          },
          "404": {
            "description": "unknown_action.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "executionId": {
                          "type": "string",
                          "description": "Execution identifier when action execution began."
                        },
                        "actionId": {
                          "type": "string",
                          "description": "Requested action identifier."
                        },
                        "auditPersisted": {
                          "type": "boolean",
                          "description": "Whether the run audit record was stored."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "actionId"
                      ],
                      "description": "Action failure metadata. Execution fields are omitted when execution did not begin."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          }
        },
        "operationId": "get_v1_actions_by_actionId",
        "description": "Get one runtime action."
      },
      "post": {
        "tags": [
          "Runs"
        ],
        "summary": "Execute a runtime action.",
        "description": "Use the action catalog to discover provider-specific input and output schemas. For a compact strongly typed OpenAPI document for one action, request /openapi.json?actionId=<actionId>. Requests with the same Idempotency-Key, action, input, effective connection, and stored runtime token identity replay the original HTTP status and body of completed successes and failures during the 24-hour replay window. Requests that are still in progress, or whose outcome is uncertain, are not automatically dispatched again. Duplicate suppression does not guarantee exactly-once execution by the provider.",
        "parameters": [
          {
            "name": "actionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Action id, usually <service>.<name>."
            },
            "description": "Action id, usually <service>.<name>."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Optional runtime-wide key for deduplicating retries of the same action request. Leading and trailing whitespace is trimmed; the remaining value must be non-empty and must not exceed 255 UTF-8 bytes. Reuse a key only for retries with the same action, input, effective connection, and stored runtime token. When this header is present, the action input must not exceed an object/array nesting depth of 100 levels."
          },
          {
            "name": "x-oo-connector-alias",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
          },
          {
            "name": "connectionName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
          },
          {
            "name": "alias",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "input": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Action input matching the catalog schema. Omitted input is treated as {}."
                  },
                  "connectionName": {
                    "type": "string",
                    "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
                  },
                  "alias": {
                    "type": "string",
                    "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
                  }
                },
                "additionalProperties": false,
                "description": "Generic action run creation request."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "description": "Action output matching the catalog schema."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "executionId": {
                          "type": "string",
                          "description": "Action execution identifier."
                        },
                        "actionId": {
                          "type": "string",
                          "description": "Executed action identifier."
                        },
                        "auditPersisted": {
                          "type": "boolean",
                          "description": "Whether the run audit record was stored."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "executionId",
                        "actionId",
                        "auditPersisted"
                      ],
                      "description": "Action execution metadata."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          },
          "400": {
            "description": "invalid_input, action_blocked, or action_not_allowed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "executionId": {
                          "type": "string",
                          "description": "Execution identifier when action execution began."
                        },
                        "actionId": {
                          "type": "string",
                          "description": "Requested action identifier."
                        },
                        "auditPersisted": {
                          "type": "boolean",
                          "description": "Whether the run audit record was stored."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "actionId"
                      ],
                      "description": "Action failure metadata. Execution fields are omitted when execution did not begin."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "402": {
            "description": "insufficient_credit.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "executionId": {
                          "type": "string",
                          "description": "Execution identifier when action execution began."
                        },
                        "actionId": {
                          "type": "string",
                          "description": "Requested action identifier."
                        },
                        "auditPersisted": {
                          "type": "boolean",
                          "description": "Whether the run audit record was stored."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "actionId"
                      ],
                      "description": "Action failure metadata. Execution fields are omitted when execution did not begin."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "403": {
            "description": "authorization_failed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "executionId": {
                          "type": "string",
                          "description": "Execution identifier when action execution began."
                        },
                        "actionId": {
                          "type": "string",
                          "description": "Requested action identifier."
                        },
                        "auditPersisted": {
                          "type": "boolean",
                          "description": "Whether the run audit record was stored."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "actionId"
                      ],
                      "description": "Action failure metadata. Execution fields are omitted when execution did not begin."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "404": {
            "description": "unknown_action or connection_not_found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "executionId": {
                          "type": "string",
                          "description": "Execution identifier when action execution began."
                        },
                        "actionId": {
                          "type": "string",
                          "description": "Requested action identifier."
                        },
                        "auditPersisted": {
                          "type": "boolean",
                          "description": "Whether the run audit record was stored."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "actionId"
                      ],
                      "description": "Action failure metadata. Execution fields are omitted when execution did not begin."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "409": {
            "description": "For idempotency, idempotency_request_in_progress means the original request is still running or its outcome is uncertain, while idempotency_key_conflict means the key was reused for a different action, input, effective connection, or stored runtime token. Other runtime conflicts may return their own error code with the same status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "executionId": {
                          "type": "string",
                          "description": "Execution identifier when action execution began."
                        },
                        "actionId": {
                          "type": "string",
                          "description": "Requested action identifier."
                        },
                        "auditPersisted": {
                          "type": "boolean",
                          "description": "Whether the run audit record was stored."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "actionId"
                      ],
                      "description": "Action failure metadata. Execution fields are omitted when execution did not begin."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "413": {
            "description": "The provider response exceeded the runtime size limit, or the upstream answered 413.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "executionId": {
                          "type": "string",
                          "description": "Execution identifier when action execution began."
                        },
                        "actionId": {
                          "type": "string",
                          "description": "Requested action identifier."
                        },
                        "auditPersisted": {
                          "type": "boolean",
                          "description": "Whether the run audit record was stored."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "actionId"
                      ],
                      "description": "Action failure metadata. Execution fields are omitted when execution did not begin."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "429": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "executionId": {
                          "type": "string",
                          "description": "Execution identifier when action execution began."
                        },
                        "actionId": {
                          "type": "string",
                          "description": "Requested action identifier."
                        },
                        "auditPersisted": {
                          "type": "boolean",
                          "description": "Whether the run audit record was stored."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "actionId"
                      ],
                      "description": "Action failure metadata. Execution fields are omitted when execution did not begin."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "500": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {
                        "executionId": {
                          "type": "string",
                          "description": "Execution identifier when action execution began."
                        },
                        "actionId": {
                          "type": "string",
                          "description": "Requested action identifier."
                        },
                        "auditPersisted": {
                          "type": "boolean",
                          "description": "Whether the run audit record was stored."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "actionId"
                      ],
                      "description": "Action failure metadata. Execution fields are omitted when execution did not begin."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          }
        },
        "operationId": "post_v1_actions_by_actionId"
      }
    },
    "/v1/proxy/{service}": {
      "post": {
        "tags": [
          "Proxy"
        ],
        "summary": "Proxy one provider API request.",
        "description": "For providers with a local proxy executor, forwards a provider-relative HTTP request and applies stored provider credentials locally.",
        "parameters": [
          {
            "name": "service",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Provider service identifier."
            },
            "description": "Provider service identifier."
          },
          {
            "name": "x-oo-connector-alias",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
          },
          {
            "name": "connectionName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
          },
          {
            "name": "alias",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "endpoint": {
                    "type": "string",
                    "description": "Provider-relative path beginning with /."
                  },
                  "method": {
                    "type": "string",
                    "description": "HTTP method: DELETE, GET, HEAD, PATCH, POST, or PUT."
                  },
                  "query": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Provider query parameters. Scalar values are forwarded."
                  },
                  "headers": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Provider request headers. Hop-by-hop and auth headers are not forwarded."
                  },
                  "body": {
                    "description": "Provider request body."
                  },
                  "connectionName": {
                    "type": "string",
                    "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
                  },
                  "alias": {
                    "type": "string",
                    "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
                  }
                },
                "additionalProperties": false,
                "required": [
                  "endpoint",
                  "method"
                ],
                "description": "Provider proxy request."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": true,
                      "type": "boolean"
                    },
                    "message": {
                      "const": "OK",
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "description": "Provider HTTP response status."
                        },
                        "headers": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Provider response headers."
                        },
                        "bodyEncoding": {
                          "type": "string",
                          "description": "Present as base64 when the provider response is binary."
                        },
                        "data": {
                          "description": "Provider response payload."
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "status",
                        "headers",
                        "data"
                      ],
                      "description": "Provider proxy response."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "meta"
                  ],
                  "description": "Runtime success envelope."
                }
              }
            }
          },
          "400": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "402": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "403": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "409": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "413": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "429": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "500": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          },
          "501": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "const": false,
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string",
                      "description": "Human-readable error message."
                    },
                    "data": {
                      "description": "Provider or validation error details."
                    },
                    "errorCode": {
                      "type": "string",
                      "description": "Stable machine-readable error code."
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "success",
                    "message",
                    "data",
                    "errorCode",
                    "meta"
                  ],
                  "description": "Runtime failure envelope."
                }
              }
            }
          }
        },
        "operationId": "post_v1_proxy_by_service"
      }
    },
    "/api/runs": {
      "get": {
        "tags": [
          "Runs"
        ],
        "summary": "List recent local action runs.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Maximum number of runs to return."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Cursor returned by the previous page."
          },
          {
            "name": "service",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only return runs whose action id belongs to this service."
          },
          {
            "name": "actionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 256
            },
            "description": "Only return runs for this exact action id."
          },
          {
            "name": "caller",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "http",
                "mcp",
                "web"
              ]
            },
            "description": "Only return runs from this runtime entry point."
          },
          {
            "name": "ok",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Only return successful or failed runs."
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunLogPage"
                }
              }
            }
          }
        },
        "operationId": "get_api_runs",
        "description": "List recent local action runs."
      }
    },
    "/api/runs/{id}": {
      "get": {
        "tags": [
          "Runs"
        ],
        "summary": "Get one local action run.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Action execution identifier."
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunLog"
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "operationId": "get_api_runs_by_id",
        "description": "Get one local action run."
      }
    },
    "/mcp": {
      "post": {
        "tags": [
          "MCP"
        ],
        "summary": "Handle stateless MCP JSON-RPC POST requests.",
        "responses": {
          "200": {
            "description": "MCP JSON-RPC response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        },
        "operationId": "post_mcp",
        "description": "Handle stateless MCP JSON-RPC POST requests."
      }
    },
    "/mcp/tools": {
      "get": {
        "tags": [
          "MCP"
        ],
        "summary": "List discovery-oriented MCP tool summaries.",
        "responses": {
          "200": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tools": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  },
                  "required": [
                    "tools"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "JSON response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get_mcp_tools",
        "description": "List discovery-oriented MCP tool summaries."
      }
    }
  },
  "components": {
    "schemas": {
      "ActionDefinition": {
        "type": "object",
        "additionalProperties": true,
        "description": "Public action catalog definition with runtime execution status."
      },
      "LocalAuthSession": {
        "type": "object",
        "properties": {
          "adminAuthConfigured": {
            "type": "boolean",
            "description": "Whether the local admin API requires an admin bearer token."
          },
          "authenticated": {
            "type": "boolean",
            "description": "Whether this request is authenticated for local admin APIs."
          }
        },
        "additionalProperties": false,
        "required": [
          "adminAuthConfigured",
          "authenticated"
        ],
        "description": "Local web console admin authentication state."
      },
      "ActionSearchResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The unique action identifier."
          },
          "service": {
            "type": "string",
            "description": "The provider service that owns the action."
          },
          "name": {
            "type": "string",
            "description": "The provider-scoped action name."
          },
          "description": {
            "type": "string",
            "description": "The action description."
          },
          "authenticated": {
            "type": "boolean",
            "description": "Whether the provider service has an authenticated local connection."
          },
          "inputSchema": {
            "type": "object",
            "additionalProperties": true,
            "description": "The normalized JSON Schema for the action input."
          },
          "outputSchema": {
            "type": "object",
            "additionalProperties": true,
            "description": "The normalized JSON Schema for the action output."
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "service",
          "name",
          "description",
          "authenticated",
          "inputSchema",
          "outputSchema"
        ],
        "description": "A single action returned by fuzzy keyword search."
      },
      "RuntimeProviderMetadata": {
        "type": "object",
        "properties": {
          "service": {
            "type": "string",
            "description": "Provider service identifier."
          },
          "displayName": {
            "type": "string",
            "description": "Human-readable provider name."
          },
          "iconUrl": {
            "anyOf": [
              {
                "type": "string",
                "description": "Provider icon URL."
              },
              {
                "type": "null"
              }
            ]
          },
          "homepageUrl": {
            "anyOf": [
              {
                "type": "string",
                "description": "Provider homepage URL."
              },
              {
                "type": "null"
              }
            ]
          },
          "scenario": {
            "type": "string",
            "description": "Broad task-oriented provider discovery scenario."
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                }
              },
              "additionalProperties": false,
              "required": [
                "id",
                "displayName"
              ],
              "description": "Catalog category."
            }
          },
          "authTypes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Supported authentication types."
          }
        },
        "additionalProperties": false,
        "required": [
          "service",
          "displayName",
          "iconUrl",
          "homepageUrl",
          "scenario",
          "categories",
          "authTypes"
        ],
        "description": "Public provider catalog row from GET /v1/providers."
      },
      "RuntimeActionService": {
        "type": "object",
        "properties": {
          "service": {
            "type": "string",
            "description": "Provider service identifier."
          }
        },
        "additionalProperties": false,
        "required": [
          "service"
        ],
        "description": "Service index row from GET /v1/actions when service is omitted."
      },
      "RuntimeActionMetadata": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Full action id, usually <service>.<name>."
          },
          "service": {
            "type": "string",
            "description": "Provider service that owns the action."
          },
          "name": {
            "type": "string",
            "description": "Provider-scoped action name."
          },
          "description": {
            "type": "string",
            "description": "Action description."
          },
          "requiredScopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "providerPermissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "inputSchema": {
            "type": "object",
            "additionalProperties": true,
            "description": "Normalized JSON Schema for the action input."
          },
          "outputSchema": {
            "type": "object",
            "additionalProperties": true,
            "description": "Normalized JSON Schema for the action output."
          },
          "followUpActions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "actionId": {
                  "type": "string"
                }
              },
              "additionalProperties": false,
              "required": [
                "actionId"
              ],
              "description": "Follow-up action."
            }
          },
          "asyncLifecycle": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true,
                "description": "Start/status/cancel action ids."
              },
              {
                "type": "null"
              }
            ]
          },
          "execution": {
            "type": "object",
            "properties": {
              "locallyExecutable": {
                "type": "boolean"
              },
              "catalogOnly": {
                "type": "boolean"
              },
              "requiredAuthTypes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "noAuthRunnable": {
                "type": "boolean"
              },
              "needsCredential": {
                "type": "boolean"
              }
            },
            "additionalProperties": false,
            "required": [
              "locallyExecutable",
              "catalogOnly",
              "requiredAuthTypes",
              "noAuthRunnable",
              "needsCredential"
            ],
            "description": "Runtime execution status."
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "service",
          "name",
          "description",
          "requiredScopes",
          "providerPermissions",
          "inputSchema",
          "outputSchema",
          "followUpActions",
          "asyncLifecycle",
          "execution"
        ],
        "description": "Public runtime action metadata."
      },
      "RuntimeConnectedApp": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable local connection identifier."
          },
          "service": {
            "type": "string",
            "description": "Provider service identifier."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "disconnected"
            ]
          },
          "alias": {
            "type": "string",
            "description": "Named connection. Same fact as MCP connectionName; HTTP alias, connectionName, and x-oo-connector-alias are equivalent. Defaults to default."
          },
          "authType": {
            "type": "string",
            "description": "Connection authentication type."
          },
          "displayName": {
            "type": "string",
            "description": "Human-readable account label."
          },
          "accountLabel": {
            "type": "string",
            "description": "Same value as displayName. Kept for existing /v1 clients."
          },
          "isDefault": {
            "type": "boolean",
            "description": "Whether this is the default connection. Same fact as MCP default."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Granted scopes. Same fact as MCP profile.grantedScopes."
          },
          "marketplace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "Marketplace identifier."
              },
              "pricing": {
                "type": "string",
                "enum": [
                  "free",
                  "metered"
                ]
              }
            },
            "additionalProperties": false,
            "required": [
              "id",
              "pricing"
            ],
            "description": "Marketplace source for a virtual connection."
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "service",
          "status",
          "alias",
          "authType",
          "displayName",
          "accountLabel",
          "isDefault",
          "scopes"
        ],
        "description": "Connected account from GET /v1/apps."
      },
      "ConnectionSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable local connection identifier."
          },
          "service": {
            "type": "string",
            "description": "Provider service identifier."
          },
          "authType": {
            "type": "string",
            "description": "Connection authentication type."
          },
          "configured": {
            "type": "boolean",
            "description": "Whether the provider is connected."
          },
          "virtual": {
            "type": "boolean",
            "description": "Whether the connection needs no stored secret."
          },
          "profile": {
            "type": "object",
            "properties": {
              "accountId": {
                "type": "string",
                "description": "Provider-side account, user, workspace, bot, or token identifier."
              },
              "displayName": {
                "type": "string",
                "description": "Human-readable account label shown to users and agents."
              },
              "grantedScopes": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Provider-native scopes granted to the stored credential, when known."
              }
            },
            "additionalProperties": false,
            "required": [
              "accountId",
              "displayName",
              "grantedScopes"
            ],
            "description": "Stable provider account identity safe for users and agents."
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "service",
          "authType",
          "configured",
          "virtual",
          "profile"
        ],
        "description": "Local provider connection summary."
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable machine-readable error code."
              },
              "message": {
                "type": "string",
                "description": "Human-readable error message."
              },
              "details": {}
            },
            "additionalProperties": false,
            "required": [
              "code",
              "message"
            ],
            "description": "Error payload."
          }
        },
        "additionalProperties": false,
        "required": [
          "error"
        ],
        "description": "Standard error response."
      },
      "ConnectionUpsertRequest": {
        "type": "object",
        "properties": {
          "authType": {
            "type": "string",
            "description": "Connection auth type: no_auth, api_key, or custom_credential."
          },
          "connectionName": {
            "type": "string",
            "description": "Optional local connection name. Defaults to default."
          },
          "values": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Credential values keyed by provider-declared field ids."
          }
        },
        "additionalProperties": false,
        "required": [
          "authType"
        ],
        "description": "Connection upsert request."
      },
      "OAuthClientConfigSummary": {
        "type": "object",
        "properties": {
          "service": {
            "type": "string",
            "description": "Provider service identifier."
          },
          "configured": {
            "type": "boolean",
            "description": "Whether a local OAuth client config is configured."
          },
          "customClientAvailable": {
            "type": "boolean",
            "description": "Whether the console may use a connection-scoped OAuth client for this provider."
          },
          "clientId": {
            "anyOf": [
              {
                "type": "string",
                "description": "Configured OAuth client id."
              },
              {
                "type": "null"
              }
            ]
          },
          "expectedRedirectUri": {
            "type": "string",
            "description": "Callback URL to configure in the provider OAuth app."
          },
          "auth": {
            "type": "object",
            "additionalProperties": true,
            "description": "Provider OAuth capability metadata."
          },
          "requestedScopes": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Configured scope subset, or null when provider defaults are used."
              },
              {
                "type": "null"
              }
            ]
          },
          "effectiveScopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Scopes the runtime will include in new authorization requests."
          }
        },
        "additionalProperties": false,
        "required": [
          "service",
          "configured",
          "customClientAvailable",
          "clientId",
          "expectedRedirectUri",
          "auth",
          "requestedScopes",
          "effectiveScopes"
        ],
        "description": "OAuth client config summary safe for the local console."
      },
      "OAuthClientConfigRequest": {
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string",
            "description": "OAuth app client id."
          },
          "clientSecret": {
            "type": "string",
            "description": "OAuth app client secret. Optional only for public-client providers."
          },
          "requestedScopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Non-empty provider-declared scope subset to request. Omit to use every provider default.",
            "minItems": 1
          },
          "extra": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Additional OAuth client config values keyed by provider-declared field ids."
          },
          "secretExtra": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Sensitive OAuth client config values keyed by provider-declared field ids."
          }
        },
        "additionalProperties": false,
        "required": [
          "clientId"
        ],
        "description": "User-provided OAuth app client configuration."
      },
      "RuntimeTokenSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Runtime token identifier."
          },
          "name": {
            "type": "string",
            "description": "User-facing token label."
          },
          "allowedActions": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Policy rule. The server enforces a 256-byte UTF-8 limit."
            },
            "description": "Action allow rules applied to this stored runtime token."
          },
          "blockedActions": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Policy rule. The server enforces a 256-byte UTF-8 limit."
            },
            "description": "Action block rules applied to this stored runtime token."
          },
          "allowedProxies": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Policy rule. The server enforces a 256-byte UTF-8 limit."
            },
            "description": "Provider proxies explicitly granted to this token. An empty list grants no proxy access."
          },
          "allowedConnections": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Opaque stable connection ID returned by a connection API."
            },
            "description": "Stable connection IDs granted to this stored runtime token. An empty list is unrestricted connection access. IDs are opaque values returned by the connection APIs. Virtual no_auth connections do not require grants."
          },
          "createdAt": {
            "type": "string",
            "description": "Creation timestamp."
          },
          "lastUsedAt": {
            "type": "string",
            "description": "Last successful use timestamp."
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "allowedActions",
          "blockedActions",
          "allowedProxies",
          "allowedConnections",
          "createdAt"
        ],
        "description": "Runtime API token summary. Plaintext tokens and token hashes are not returned."
      },
      "RuntimeTokenCreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "User-facing token label."
          },
          "allowedActions": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Policy rule. The server enforces a 256-byte UTF-8 limit."
            },
            "description": "Optional action allow rules for the new token."
          },
          "blockedActions": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Policy rule. The server enforces a 256-byte UTF-8 limit."
            },
            "description": "Optional action block rules for the new token."
          },
          "allowedProxies": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Policy rule. The server enforces a 256-byte UTF-8 limit."
            },
            "description": "Optional provider proxy grants for the new token. Omit or leave empty to deny proxy access."
          },
          "allowedConnections": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Opaque stable connection ID returned by a connection API."
            },
            "description": "Optional stable connection IDs granted to the new token. Omit or leave empty for unrestricted connection access. A non-empty list matches exact opaque IDs returned by the connection APIs. Virtual no_auth connections do not require grants."
          }
        },
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "description": "Runtime token creation request."
      },
      "TokenPolicy": {
        "type": "object",
        "properties": {
          "allowedActions": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Policy rule. The server enforces a 256-byte UTF-8 limit."
            },
            "description": "Action allow rules for this token."
          },
          "blockedActions": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Policy rule. The server enforces a 256-byte UTF-8 limit."
            },
            "description": "Action block rules for this token."
          },
          "allowedProxies": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Policy rule. The server enforces a 256-byte UTF-8 limit."
            },
            "description": "Provider proxies explicitly granted to this token. An empty list grants no proxy access."
          },
          "allowedConnections": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Opaque stable connection ID returned by a connection API."
            },
            "description": "Stable connection IDs granted to this stored token. An empty list is unrestricted connection access. A non-empty list matches exact opaque IDs returned by the connection APIs. Virtual no_auth connections do not require grants."
          }
        },
        "additionalProperties": false,
        "required": [
          "allowedActions",
          "blockedActions",
          "allowedProxies",
          "allowedConnections"
        ],
        "description": "Complete replacement of one stored runtime token's action, proxy, and connection permissions."
      },
      "PolicyRules": {
        "type": "object",
        "properties": {
          "allowedActions": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Policy rule. The server enforces a 256-byte UTF-8 limit."
            },
            "description": "Action allow rules."
          },
          "blockedActions": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Policy rule. The server enforces a 256-byte UTF-8 limit."
            },
            "description": "Action block rules."
          },
          "allowedProxies": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Policy rule. The server enforces a 256-byte UTF-8 limit."
            },
            "description": "Proxy service allow rules."
          },
          "blockedProxies": {
            "type": "array",
            "maxItems": 128,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Policy rule. The server enforces a 256-byte UTF-8 limit."
            },
            "description": "Proxy service block rules."
          }
        },
        "additionalProperties": false,
        "required": [
          "allowedActions",
          "blockedActions",
          "allowedProxies",
          "blockedProxies"
        ],
        "description": "One complete action and proxy policy layer."
      },
      "RuntimePolicyState": {
        "type": "object",
        "properties": {
          "deployment": {
            "$ref": "#/components/schemas/PolicyRules"
          },
          "runtime": {
            "$ref": "#/components/schemas/PolicyRules"
          },
          "updatedAt": {
            "type": "string",
            "description": "Last Runtime policy update timestamp, when configured."
          }
        },
        "additionalProperties": false,
        "required": [
          "deployment",
          "runtime"
        ],
        "description": "Deployment and persisted Runtime policy layers. Deployment rules are read-only."
      },
      "PolicyCheck": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "enum": [
              "deployment",
              "runtime",
              "token"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "allow_match",
              "block_match",
              "allow_miss"
            ]
          },
          "rule": {
            "type": "string",
            "description": "First matching policy rule, when one matched."
          }
        },
        "additionalProperties": false,
        "required": [
          "source",
          "outcome"
        ],
        "description": "One policy layer's decisive or matching check."
      },
      "PolicyDecision": {
        "type": "object",
        "properties": {
          "allowed": {
            "type": "boolean",
            "description": "Whether policy permits execution."
          },
          "code": {
            "type": "string",
            "enum": [
              "action_not_allowed",
              "action_blocked",
              "proxy_not_allowed",
              "proxy_blocked",
              "connection_not_allowed"
            ]
          },
          "message": {
            "type": "string",
            "description": "Policy denial message."
          },
          "checks": {
            "type": "array",
            "maxItems": 3,
            "items": {
              "$ref": "#/components/schemas/PolicyCheck"
            }
          }
        },
        "additionalProperties": false,
        "required": [
          "allowed",
          "checks"
        ],
        "description": "Layered execution policy decision. code and message are present on denial."
      },
      "TransitFileUpload": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string",
            "description": "Opaque local transit file identifier."
          },
          "downloadUrl": {
            "type": "string",
            "description": "URL that serves the uploaded file."
          },
          "sizeBytes": {
            "type": "number",
            "description": "Uploaded file size in bytes."
          },
          "name": {
            "type": "string",
            "description": "Original uploaded filename."
          },
          "mimeType": {
            "type": "string",
            "description": "Uploaded file MIME type."
          }
        },
        "additionalProperties": false,
        "required": [
          "fileId",
          "downloadUrl",
          "sizeBytes",
          "name",
          "mimeType"
        ],
        "description": "Local transit file upload response."
      },
      "ProviderDefinition": {
        "type": "object",
        "additionalProperties": true,
        "description": "Public provider catalog definition."
      },
      "RunLog": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Run identifier."
          },
          "service": {
            "type": "string",
            "description": "Provider service that owns the executed action."
          },
          "actionId": {
            "type": "string",
            "description": "Executed action id."
          },
          "caller": {
            "type": "string",
            "description": "Runtime entry point that executed the run."
          },
          "startedAt": {
            "type": "string",
            "description": "Start timestamp."
          },
          "completedAt": {
            "type": "string",
            "description": "Completion timestamp."
          },
          "durationMs": {
            "type": "number",
            "description": "Run duration in milliseconds."
          },
          "ok": {
            "type": "boolean",
            "description": "Whether the run succeeded."
          },
          "connectionProfile": {
            "type": "object",
            "additionalProperties": true,
            "description": "Provider account identity that the action used, when a connection was available."
          },
          "connectionId": {
            "type": "string",
            "description": "Stable connection identifier used by the run."
          },
          "runtimeTokenId": {
            "type": "string",
            "description": "Stored runtime token identifier used by the run."
          },
          "policy": {
            "$ref": "#/components/schemas/PolicyDecision"
          },
          "inputSummary": {
            "description": "Redacted action input summary."
          },
          "outputSummary": {
            "description": "Redacted action output summary."
          },
          "errorCode": {
            "type": "string",
            "description": "Error code when the run failed."
          },
          "errorMessage": {
            "type": "string",
            "description": "Error message when the run failed."
          }
        },
        "additionalProperties": false,
        "required": [
          "id",
          "service",
          "actionId",
          "caller",
          "startedAt",
          "completedAt",
          "durationMs",
          "ok"
        ],
        "description": "Recent action run entry."
      },
      "RunLogPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RunLog"
            },
            "description": "Run entries for this page."
          },
          "nextCursor": {
            "type": "string",
            "description": "Cursor for the next page, when more runs are available."
          }
        },
        "additionalProperties": false,
        "required": [
          "items"
        ],
        "description": "Paginated action run list."
      }
    },
    "securitySchemes": {
      "RuntimeToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Runtime bearer token or configured JWT for /v1 and /mcp clients. Some management operations require administrator credentials instead. Follow the deployment's authentication configuration."
      },
      "AdminToken": {
        "type": "http",
        "scheme": "bearer",
        "description": "Administrator credential for management operations when admin authentication is enabled. Keep it separate from runtime tokens and provider credentials."
      }
    }
  },
  "x-runtime-source": {
    "repository": "https://github.com/oomol-lab/open-connector",
    "revision": "72de05b1d17b132ff50d1e768679f77ff8e8f3ff",
    "entry": "src/server/api/openapi.ts"
  },
  "x-reference-annotations": [
    "operationId",
    "fallback descriptions",
    "servers",
    "authentication scheme descriptions"
  ],
  "servers": [
    {
      "url": "{runtimeUrl}",
      "description": "Set runtimeUrl to the base URL of your OpenConnector deployment; never the documentation website.",
      "variables": {
        "runtimeUrl": {
          "default": "http://localhost:3000"
        }
      }
    }
  ],
  "externalDocs": {
    "description": "Runtime setup, authentication and clients",
    "url": "https://openconnector.io/docs/clients/"
  }
}
