{"openapi":"3.1.0","info":{"title":"GitHub Environments (BYOK) API","version":"0.1.0","description":"GitHub Environments (BYOK) lets an AI assistant read your own GitHub Environments data through the GitHub Environments API with a key you supply (personal access token). Read-only: 10 tools (list_environments, get_environment, list_branch_policies, list_protection_rules, list_protection_rule_apps, list_environment_secret_names, list_environment_variable_names, list_deployments,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-github-environments.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-github-environments/docs"},"termsOfService":"https://connectorbay.com/byok-github-environments/terms"},"servers":[{"url":"https://byok-github-environments.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-github-environments/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_environments":{"post":{"operationId":"list_environments","summary":"List a repository's deployment environments with protection rules and branch policy flags. Use for \"Which deployment env","description":"List a repository's deployment environments with protection rules and branch policy flags. Use for \"Which deployment environments does octocat/Hello-World have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"Account that owns the repository (user or organization login), for example 'octocat'.","maxLength":200,"title":"Owner","type":"string"},"repo":{"description":"Repository name without the owner, for example 'Hello-World'.","maxLength":200,"title":"Repo","type":"string"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many results to return (1 to 100).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["owner","repo"],"title":"list_environmentsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_environment":{"post":{"operationId":"get_environment","summary":"Get one deployment environment with its protection rules (wait timer, required reviewers) and branch policy. Use for \"Wh","description":"Get one deployment environment with its protection rules (wait timer, required reviewers) and branch policy. Use for \"What protection rules does the production environment of octocat/Hello-World have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"Account that owns the repository (user or organization login), for example 'octocat'.","maxLength":200,"title":"Owner","type":"string"},"repo":{"description":"Repository name without the owner, for example 'Hello-World'.","maxLength":200,"title":"Repo","type":"string"},"environment_name":{"description":"Environment name, for example 'production' (see list_environments).","maxLength":100,"title":"Environment Name","type":"string"}},"required":["owner","repo","environment_name"],"title":"get_environmentArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_branch_policies":{"post":{"operationId":"list_branch_policies","summary":"List the branch and tag name patterns allowed to deploy to an environment. Use for \"Which branches may deploy to the pro","description":"List the branch and tag name patterns allowed to deploy to an environment. Use for \"Which branches may deploy to the production environment of octocat/Hello-World\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"Account that owns the repository (user or organization login), for example 'octocat'.","maxLength":200,"title":"Owner","type":"string"},"repo":{"description":"Repository name without the owner, for example 'Hello-World'.","maxLength":200,"title":"Repo","type":"string"},"environment_name":{"description":"Environment name, for example 'production' (see list_environments).","maxLength":100,"title":"Environment Name","type":"string"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many results to return (1 to 100).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["owner","repo","environment_name"],"title":"list_branch_policiesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_protection_rules":{"post":{"operationId":"list_protection_rules","summary":"List the custom deployment protection rules (GitHub App gates) enabled on an environment. Use for \"Which custom protecti","description":"List the custom deployment protection rules (GitHub App gates) enabled on an environment. Use for \"Which custom protection rules gate the production environment of octocat/Hello-World\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"Account that owns the repository (user or organization login), for example 'octocat'.","maxLength":200,"title":"Owner","type":"string"},"repo":{"description":"Repository name without the owner, for example 'Hello-World'.","maxLength":200,"title":"Repo","type":"string"},"environment_name":{"description":"Environment name, for example 'production' (see list_environments).","maxLength":100,"title":"Environment Name","type":"string"}},"required":["owner","repo","environment_name"],"title":"list_protection_rulesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_protection_rule_apps":{"post":{"operationId":"list_protection_rule_apps","summary":"List GitHub Apps that could be added as custom deployment protection rules on an environment. Use for \"Which apps can I ","description":"List GitHub Apps that could be added as custom deployment protection rules on an environment. Use for \"Which apps can I use as protection rules for the production environment of octocat/Hello-World\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"Account that owns the repository (user or organization login), for example 'octocat'.","maxLength":200,"title":"Owner","type":"string"},"repo":{"description":"Repository name without the owner, for example 'Hello-World'.","maxLength":200,"title":"Repo","type":"string"},"environment_name":{"description":"Environment name, for example 'production' (see list_environments).","maxLength":100,"title":"Environment Name","type":"string"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many results to return (1 to 100).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["owner","repo","environment_name"],"title":"list_protection_rule_appsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_environment_secret_names":{"post":{"operationId":"list_environment_secret_names","summary":"List the names and dates of an environment's Actions secrets (values are never returned by GitHub). Use for \"Which secre","description":"List the names and dates of an environment's Actions secrets (values are never returned by GitHub). Use for \"Which secrets are defined on the production environment of octocat/Hello-World\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"Account that owns the repository (user or organization login), for example 'octocat'.","maxLength":200,"title":"Owner","type":"string"},"repo":{"description":"Repository name without the owner, for example 'Hello-World'.","maxLength":200,"title":"Repo","type":"string"},"environment_name":{"description":"Environment name, for example 'production' (see list_environments).","maxLength":100,"title":"Environment Name","type":"string"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many results to return (1 to 100).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["owner","repo","environment_name"],"title":"list_environment_secret_namesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_environment_variable_names":{"post":{"operationId":"list_environment_variable_names","summary":"List the names and dates of an environment's Actions variables (variable values are left out). Use for \"Which variables ","description":"List the names and dates of an environment's Actions variables (variable values are left out). Use for \"Which variables are defined on the production environment of octocat/Hello-World\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"Account that owns the repository (user or organization login), for example 'octocat'.","maxLength":200,"title":"Owner","type":"string"},"repo":{"description":"Repository name without the owner, for example 'Hello-World'.","maxLength":200,"title":"Repo","type":"string"},"environment_name":{"description":"Environment name, for example 'production' (see list_environments).","maxLength":100,"title":"Environment Name","type":"string"},"per_page":{"anyOf":[{"maximum":30,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many results to return (1 to 30).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["owner","repo","environment_name"],"title":"list_environment_variable_namesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_deployments":{"post":{"operationId":"list_deployments","summary":"List a repository's deployments, optionally filtered by environment, ref, SHA or task, newest first. Use for \"What were ","description":"List a repository's deployments, optionally filtered by environment, ref, SHA or task, newest first. Use for \"What were the latest deployments to production for octocat/Hello-World\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"Account that owns the repository (user or organization login), for example 'octocat'.","maxLength":200,"title":"Owner","type":"string"},"repo":{"description":"Repository name without the owner, for example 'Hello-World'.","maxLength":200,"title":"Repo","type":"string"},"environment":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only deployments to this environment name.","title":"Environment"},"ref":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only deployments of this branch, tag or SHA ref.","title":"Ref"},"sha":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only deployments of this commit SHA.","title":"Sha"},"task":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only deployments of this task, for example 'deploy'.","title":"Task"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many results to return (1 to 100).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["owner","repo"],"title":"list_deploymentsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_deployment_statuses":{"post":{"operationId":"list_deployment_statuses","summary":"List the status history of one deployment (queued, in_progress, success, failure ...) with environment URL and log URL. ","description":"List the status history of one deployment (queued, in_progress, success, failure ...) with environment URL and log URL. Use for \"Did deployment 1 of octocat/Hello-World succeed\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"Account that owns the repository (user or organization login), for example 'octocat'.","maxLength":200,"title":"Owner","type":"string"},"repo":{"description":"Repository name without the owner, for example 'Hello-World'.","maxLength":200,"title":"Repo","type":"string"},"deployment_id":{"description":"Deployment id from list_deployments.","minimum":1,"title":"Deployment Id","type":"integer"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many results to return (1 to 100).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["owner","repo","deployment_id"],"title":"list_deployment_statusesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_pending_deployments":{"post":{"operationId":"get_pending_deployments","summary":"List the environments a workflow run is waiting on, with wait timers and required reviewers. Use for \"Which environments","description":"List the environments a workflow run is waiting on, with wait timers and required reviewers. Use for \"Which environments is workflow run 30433642 of octocat/Hello-World waiting on\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"Account that owns the repository (user or organization login), for example 'octocat'.","maxLength":200,"title":"Owner","type":"string"},"repo":{"description":"Repository name without the owner, for example 'Hello-World'.","maxLength":200,"title":"Repo","type":"string"},"run_id":{"description":"Workflow run id from the Actions run list.","minimum":1,"title":"Run Id","type":"integer"}},"required":["owner","repo","run_id"],"title":"get_pending_deploymentsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}