{"openapi":"3.1.0","info":{"title":"GitLab Protection Rules (BYOK) API","version":"0.1.0","description":"GitLab Protection Rules (BYOK) lets an AI assistant read your own GitLab Protection Rules data through the GitLab Protection Rules API with a key you supply (personal access token (read_api scope)). Read-only: 10 tools (list_protected_branches, get_protected_branch, list_protected_tags, get_protected_tag, list_protected_environments, get_protected_environment, get_project_approval_settings,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-gitlab-protection.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-gitlab-protection/docs"},"termsOfService":"https://connectorbay.com/byok-gitlab-protection/terms"},"servers":[{"url":"https://byok-gitlab-protection.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-gitlab-protection/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_protected_branches":{"post":{"operationId":"list_protected_branches","summary":"List a project's protected branches and wildcards with force-push and code owner settings and who may push or merge. Eac","description":"List a project's protected branches and wildcards with force-push and code owner settings and who may push or merge. Each entry has an access level (0 none, 30 developer, 40 maintainer) and may name a user ID, group ID or deploy key ID. Use for \"Which branches are protected in gitlab-org/gitlab and who can merge to them\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project":{"description":"Numeric project ID, or the full path with namespace such as 'gitlab-org/gitlab' (slashes are encoded for you).","maxLength":200,"title":"Project","type":"string"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Name or part of a name of protected branches to look for.","title":"Search"}},"required":["project"],"title":"list_protected_branchesArguments","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_protected_branch":{"post":{"operationId":"get_protected_branch","summary":"Get one protected branch or wildcard rule by its name or pattern, with push and merge permissions. Use for \"Is force pus","description":"Get one protected branch or wildcard rule by its name or pattern, with push and merge permissions. Use for \"Is force push allowed on main in gitlab-org/gitlab\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project":{"description":"Numeric project ID, or the full path with namespace such as 'gitlab-org/gitlab' (slashes are encoded for you).","maxLength":200,"title":"Project","type":"string"},"name":{"description":"Branch name or wildcard pattern exactly as protected, for example 'main' or 'release/*'.","maxLength":200,"title":"Name","type":"string"}},"required":["project","name"],"title":"get_protected_branchArguments","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_protected_tags":{"post":{"operationId":"list_protected_tags","summary":"List a project's protected tags and wildcards with who may create them. Each entry has an access level (0 none, 30 devel","description":"List a project's protected tags and wildcards with who may create them. Each entry has an access level (0 none, 30 developer, 40 maintainer) and may name a user ID, group ID or deploy key ID. Use for \"Which tags are protected in gitlab-org/gitlab\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project":{"description":"Numeric project ID, or the full path with namespace such as 'gitlab-org/gitlab' (slashes are encoded for you).","maxLength":200,"title":"Project","type":"string"}},"required":["project"],"title":"list_protected_tagsArguments","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_protected_tag":{"post":{"operationId":"get_protected_tag","summary":"Get one protected tag or wildcard rule by its name or pattern, with who may create matching tags. Use for \"Who can creat","description":"Get one protected tag or wildcard rule by its name or pattern, with who may create matching tags. Use for \"Who can create release tags in gitlab-org/gitlab\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project":{"description":"Numeric project ID, or the full path with namespace such as 'gitlab-org/gitlab' (slashes are encoded for you).","maxLength":200,"title":"Project","type":"string"},"name":{"description":"Tag name or wildcard pattern exactly as protected, for example 'v*'.","maxLength":200,"title":"Name","type":"string"}},"required":["project","name"],"title":"get_protected_tagArguments","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_protected_environments":{"post":{"operationId":"list_protected_environments","summary":"List a project's protected environments with the access levels allowed to deploy and the number of approvals required (P","description":"List a project's protected environments with the access levels allowed to deploy and the number of approvals required (Premium and Ultimate). Use for \"Which environments of gitlab-org/gitlab are protected and how many approvals does production need\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project":{"description":"Numeric project ID, or the full path with namespace such as 'gitlab-org/gitlab' (slashes are encoded for you).","maxLength":200,"title":"Project","type":"string"}},"required":["project"],"title":"list_protected_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_protected_environment":{"post":{"operationId":"get_protected_environment","summary":"Get one protected environment by name with its deploy access levels and required approval count. Use for \"Who may deploy","description":"Get one protected environment by name with its deploy access levels and required approval count. Use for \"Who may deploy to production in gitlab-org/gitlab\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project":{"description":"Numeric project ID, or the full path with namespace such as 'gitlab-org/gitlab' (slashes are encoded for you).","maxLength":200,"title":"Project","type":"string"},"name":{"description":"Environment name, for example 'production'.","maxLength":200,"title":"Name","type":"string"}},"required":["project","name"],"title":"get_protected_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/get_project_approval_settings":{"post":{"operationId":"get_project_approval_settings","summary":"Get a project's merge request approval settings: author self-approval, committer approval, reset on push and reauthentic","description":"Get a project's merge request approval settings: author self-approval, committer approval, reset on push and reauthentication. Use for \"Can authors approve their own merge requests in gitlab-org/gitlab\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project":{"description":"Numeric project ID, or the full path with namespace such as 'gitlab-org/gitlab' (slashes are encoded for you).","maxLength":200,"title":"Project","type":"string"}},"required":["project"],"title":"get_project_approval_settingsArguments","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_project_approval_rules":{"post":{"operationId":"list_project_approval_rules","summary":"List a project's merge request approval rules with rule type, report type and number of approvals required (approver nam","description":"List a project's merge request approval rules with rule type, report type and number of approvals required (approver names are left out). Use for \"What merge request approval rules does gitlab-org/gitlab have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project":{"description":"Numeric project ID, or the full path with namespace such as 'gitlab-org/gitlab' (slashes are encoded for you).","maxLength":200,"title":"Project","type":"string"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"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":["project"],"title":"list_project_approval_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/get_project_approval_rule":{"post":{"operationId":"get_project_approval_rule","summary":"Get one merge request approval rule of a project by ID (approver names are left out). Use for \"How many approvals does a","description":"Get one merge request approval rule of a project by ID (approver names are left out). Use for \"How many approvals does approval rule 1 of gitlab-org/gitlab require\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project":{"description":"Numeric project ID, or the full path with namespace such as 'gitlab-org/gitlab' (slashes are encoded for you).","maxLength":200,"title":"Project","type":"string"},"approval_rule_id":{"description":"Numeric ID of the approval rule (from list_project_approval_rules).","title":"Approval Rule Id","type":"integer"}},"required":["project","approval_rule_id"],"title":"get_project_approval_ruleArguments","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_project_push_rules":{"post":{"operationId":"get_project_push_rules","summary":"Get a project's push rules: branch name and commit message patterns, file size limit, secret prevention and signed commi","description":"Get a project's push rules: branch name and commit message patterns, file size limit, secret prevention and signed commit requirements (Premium and Ultimate). Returns the text null when none are set. Use for \"Does gitlab-org/gitlab require signed commits\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"project":{"description":"Numeric project ID, or the full path with namespace such as 'gitlab-org/gitlab' (slashes are encoded for you).","maxLength":200,"title":"Project","type":"string"}},"required":["project"],"title":"get_project_push_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}}}}