{"openapi":"3.1.0","info":{"title":"GitHub Rulesets (BYOK) API","version":"0.1.0","description":"GitHub Rulesets (BYOK) lets an AI assistant read your own GitHub Rulesets data through the GitHub Rulesets API with a key you supply (personal access token). Read-only: 9 tools (list_repo_rulesets, get_repo_ruleset, get_repo_ruleset_history, list_repo_rule_suites, get_repo_rule_suite, get_branch_rules, list_org_rulesets, get_org_ruleset, list_org_rule_suites). The BYOK key travels with each...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-github-rulesets.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-github-rulesets/docs"},"termsOfService":"https://connectorbay.com/byok-github-rulesets/terms"},"servers":[{"url":"https://byok-github-rulesets.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-github-rulesets/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_repo_rulesets":{"post":{"operationId":"list_repo_rulesets","summary":"List the rulesets that apply to a repository (its own and inherited from the organization) with target, enforcement mode","description":"List the rulesets that apply to a repository (its own and inherited from the organization) with target, enforcement mode, conditions and rules. Use for \"Which rulesets protect 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"},"includes_parents":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"True to include rulesets inherited from the organization.","title":"Includes Parents"},"targets":{"anyOf":[{"maxLength":50,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated ruleset targets to include: branch, tag, push (default all).","title":"Targets"},"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_repo_rulesetsArguments","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_repo_ruleset":{"post":{"operationId":"get_repo_ruleset","summary":"Get one repository ruleset with its rules, conditions and bypass actors. Use for \"What rules does ruleset 42 of octocat/","description":"Get one repository ruleset with its rules, conditions and bypass actors. Use for \"What rules does ruleset 42 of octocat/Hello-World enforce\".","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"},"ruleset_id":{"description":"Ruleset id (integer) from the ruleset list.","minimum":1,"title":"Ruleset Id","type":"integer"},"includes_parents":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"True to also resolve rulesets inherited from the organization.","title":"Includes Parents"}},"required":["owner","repo","ruleset_id"],"title":"get_repo_rulesetArguments","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_repo_ruleset_history":{"post":{"operationId":"get_repo_ruleset_history","summary":"List the edit history of a repository ruleset: version ids, editors and times. Use for \"Who changed ruleset 42 of octoca","description":"List the edit history of a repository ruleset: version ids, editors and times. Use for \"Who changed ruleset 42 of octocat/Hello-World and when\".","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"},"ruleset_id":{"description":"Ruleset id (integer) from the ruleset list.","minimum":1,"title":"Ruleset 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","ruleset_id"],"title":"get_repo_ruleset_historyArguments","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_repo_rule_suites":{"post":{"operationId":"list_repo_rule_suites","summary":"List recent push evaluations against a repository's rulesets (pass, fail or bypass) with actor, ref and commits. Use for","description":"List recent push evaluations against a repository's rulesets (pass, fail or bypass) with actor, ref and commits. Use for \"Which pushes to octocat/Hello-World failed a ruleset this week\".","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"},"ref":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only rule evaluations for this ref, for example 'refs/heads/main'.","title":"Ref"},"time_period":{"anyOf":[{"enum":["hour","day","week","month"],"type":"string"},{"type":"null"}],"default":"day","description":"How far back to look: hour, day, week or month.","title":"Time Period"},"actor_name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only pushes by this GitHub login.","title":"Actor Name"},"rule_suite_result":{"anyOf":[{"enum":["pass","fail","bypass","all"],"type":"string"},{"type":"null"}],"default":"all","description":"Only evaluations with this result.","title":"Rule Suite Result"},"evaluate_status":{"anyOf":[{"enum":["all","active","evaluate"],"type":"string"},{"type":"null"}],"default":"all","description":"Only active rules, evaluate-mode rules or all.","title":"Evaluate Status"},"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_repo_rule_suitesArguments","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_repo_rule_suite":{"post":{"operationId":"get_repo_rule_suite","summary":"Get one rule evaluation (rule suite) of a repository: result and per-rule outcomes. Use for \"Why did rule evaluation 6 o","description":"Get one rule evaluation (rule suite) of a repository: result and per-rule outcomes. Use for \"Why did rule evaluation 6 of octocat/Hello-World fail\".","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"},"rule_suite_id":{"description":"Rule suite id from list_repo_rule_suites.","minimum":1,"title":"Rule Suite Id","type":"integer"}},"required":["owner","repo","rule_suite_id"],"title":"get_repo_rule_suiteArguments","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_branch_rules":{"post":{"operationId":"get_branch_rules","summary":"List all active rules that apply to one branch of a repository. Use for \"Which rules apply to the main branch of octocat","description":"List all active rules that apply to one branch of a repository. Use for \"Which rules apply to the main branch 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"},"branch":{"description":"Branch name, for example 'main'.","maxLength":200,"title":"Branch","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","branch"],"title":"get_branch_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_org_rulesets":{"post":{"operationId":"list_org_rulesets","summary":"List an organization's rulesets with target, enforcement mode, conditions and rules. Use for \"Which organization ruleset","description":"List an organization's rulesets with target, enforcement mode, conditions and rules. Use for \"Which organization rulesets does octo-org have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"targets":{"anyOf":[{"maxLength":50,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated ruleset targets to include: branch, tag, push (default all).","title":"Targets"},"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":["org"],"title":"list_org_rulesetsArguments","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_org_ruleset":{"post":{"operationId":"get_org_ruleset","summary":"Get one organization ruleset with its rules, conditions and bypass actors. Use for \"What does organization ruleset 42 of","description":"Get one organization ruleset with its rules, conditions and bypass actors. Use for \"What does organization ruleset 42 of octo-org enforce\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"ruleset_id":{"description":"Ruleset id (integer) from the ruleset list.","minimum":1,"title":"Ruleset Id","type":"integer"}},"required":["org","ruleset_id"],"title":"get_org_rulesetArguments","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_org_rule_suites":{"post":{"operationId":"list_org_rule_suites","summary":"List recent push evaluations against an organization's rulesets across its repositories. Use for \"Which pushes in octo-o","description":"List recent push evaluations against an organization's rulesets across its repositories. Use for \"Which pushes in octo-org were blocked by a ruleset today\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"repository_name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only evaluations for this repository name.","title":"Repository Name"},"ref":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only rule evaluations for this ref, for example 'refs/heads/main'.","title":"Ref"},"time_period":{"anyOf":[{"enum":["hour","day","week","month"],"type":"string"},{"type":"null"}],"default":"day","description":"How far back to look: hour, day, week or month.","title":"Time Period"},"actor_name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only pushes by this GitHub login.","title":"Actor Name"},"rule_suite_result":{"anyOf":[{"enum":["pass","fail","bypass","all"],"type":"string"},{"type":"null"}],"default":"all","description":"Only evaluations with this result.","title":"Rule Suite Result"},"evaluate_status":{"anyOf":[{"enum":["all","active","evaluate"],"type":"string"},{"type":"null"}],"default":"all","description":"Only active rules, evaluate-mode rules or all.","title":"Evaluate Status"},"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":["org"],"title":"list_org_rule_suitesArguments","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}}}}