{"openapi":"3.1.0","info":{"title":"Mergify (BYOK) API","version":"0.1.0","description":"Mergify (BYOK) lets an AI assistant read your own Mergify data through the Mergify API with a key you supply (Mergify application key). Read-only: 12 tools (get_application, get_merge_queue_status, list_merge_queues, get_queue_configuration, get_queue_pause, list_activity_events, get_time_to_merge, get_queue_size_stats, get_queue_failure_rate, search_ci_tests, get_ci_test,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-mergify.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-mergify/docs"},"termsOfService":"https://connectorbay.com/byok-mergify/terms"},"servers":[{"url":"https://byok-mergify.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-mergify/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/get_application":{"post":{"operationId":"get_application","summary":"Show which Mergify application key is in use: its ID, name, scope and the GitHub account it is limited to. Use for \"Whic","description":"Show which Mergify application key is in use: its ID, name, scope and the GitHub account it is limited to. Use for \"Which Mergify application key and account scope am I using\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_applicationArguments","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_merge_queue_status":{"post":{"operationId":"get_merge_queue_status","summary":"Show the live merge queue of a repository: queue mode, pause state, batches being tested and pull requests waiting, with","description":"Show the live merge queue of a repository: queue mode, pause state, batches being tested and pull requests waiting, with estimated merge times. Use for \"What is in the Mergify merge queue of acme/web right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"GitHub owner (user or organization login) of the repository, for example 'acme'.","maxLength":100,"title":"Owner","type":"string"},"repository":{"description":"Repository name without the owner, for example 'web'.","maxLength":100,"title":"Repository","type":"string"},"branch":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only this base branch, for example 'main'.","title":"Branch"}},"required":["owner","repository"],"title":"get_merge_queue_statusArguments","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_merge_queues":{"post":{"operationId":"list_merge_queues","summary":"List the merge queues of a repository with the branch of each and the pull requests in it. Use for \"Which pull requests ","description":"List the merge queues of a repository with the branch of each and the pull requests in it. Use for \"Which pull requests are in the Mergify queues of acme/web\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"GitHub owner (user or organization login) of the repository, for example 'acme'.","maxLength":100,"title":"Owner","type":"string"},"repository":{"description":"Repository name without the owner, for example 'web'.","maxLength":100,"title":"Repository","type":"string"}},"required":["owner","repository"],"title":"list_merge_queuesArguments","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_queue_configuration":{"post":{"operationId":"get_queue_configuration","summary":"Show the merge queue rules (names and settings) Mergify reads from a repository's configuration. Use for \"Which merge qu","description":"Show the merge queue rules (names and settings) Mergify reads from a repository's configuration. Use for \"Which merge queue rules does acme/web have in Mergify\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"GitHub owner (user or organization login) of the repository, for example 'acme'.","maxLength":100,"title":"Owner","type":"string"},"repository":{"description":"Repository name without the owner, for example 'web'.","maxLength":100,"title":"Repository","type":"string"}},"required":["owner","repository"],"title":"get_queue_configurationArguments","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_queue_pause":{"post":{"operationId":"get_queue_pause","summary":"Show whether the merge queue of a repository is paused, with the reason and pause date. Use for \"Is the Mergify merge qu","description":"Show whether the merge queue of a repository is paused, with the reason and pause date. Use for \"Is the Mergify merge queue of acme/web paused\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"GitHub owner (user or organization login) of the repository, for example 'acme'.","maxLength":100,"title":"Owner","type":"string"},"repository":{"description":"Repository name without the owner, for example 'web'.","maxLength":100,"title":"Repository","type":"string"}},"required":["owner","repository"],"title":"get_queue_pauseArguments","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_activity_events":{"post":{"operationId":"list_activity_events","summary":"List recent Mergify activity events of a repository (queue entries, merges, check results, failures) newest first, filte","description":"List recent Mergify activity events of a repository (queue entries, merges, check results, failures) newest first, filterable by pull request, base branch, outcome and time range. Returns the first page only. Use for \"What did Mergify do on pull request 42 of acme/web\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"GitHub owner (user or organization login) of the repository, for example 'acme'.","maxLength":100,"title":"Owner","type":"string"},"repository":{"description":"Repository name without the owner, for example 'web'.","maxLength":100,"title":"Repository","type":"string"},"pull_request":{"anyOf":[{"maximum":10000000,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only events of this pull request number.","title":"Pull Request"},"base_ref":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only events for pull requests targeting this base branch.","title":"Base Ref"},"outcome":{"anyOf":[{"enum":["success","failure","pending","neutral"],"type":"string"},{"type":"null"}],"default":null,"description":"Only events with this derived outcome.","title":"Outcome"},"received_from":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Start of the time range (ISO 8601 date-time with a UTC offset).","title":"Received From"},"received_to":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"End of the time range (ISO 8601 date-time with a UTC offset).","title":"Received To"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Events per page (1 to 100).","title":"Per Page"}},"required":["owner","repository"],"title":"list_activity_eventsArguments","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_time_to_merge":{"post":{"operationId":"get_time_to_merge","summary":"Show time to merge statistics for every merge queue of a repository, optionally at a given moment or for one branch. Use","description":"Show time to merge statistics for every merge queue of a repository, optionally at a given moment or for one branch. Use for \"How long do pull requests take to merge through the Mergify queue of acme/web\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"GitHub owner (user or organization login) of the repository, for example 'acme'.","maxLength":100,"title":"Owner","type":"string"},"repository":{"description":"Repository name without the owner, for example 'web'.","maxLength":100,"title":"Repository","type":"string"},"at":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Statistics at this moment (ISO 8601 date-time with a UTC offset); defaults to now.","title":"At"},"branch":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only this base branch, for example 'main'.","title":"Branch"}},"required":["owner","repository"],"title":"get_time_to_mergeArguments","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_queue_size_stats":{"post":{"operationId":"get_queue_size_stats","summary":"Show how many pull requests were in the merge queue over time, grouped by base branch and queue. Use for \"How long has t","description":"Show how many pull requests were in the merge queue over time, grouped by base branch and queue. Use for \"How long has the Mergify queue of acme/web been over ten pull requests this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"GitHub owner (user or organization login) of the repository, for example 'acme'.","maxLength":100,"title":"Owner","type":"string"},"repository":{"description":"Repository name without the owner, for example 'web'.","maxLength":100,"title":"Repository","type":"string"},"base_ref":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only pull requests targeting this base branch.","title":"Base Ref"},"queue_name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only this merge queue, as named in the Mergify configuration.","title":"Queue Name"},"start_at":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Start of the time range as an ISO 8601 date-time with a UTC offset, for example 2026-01-01T00:00:00Z.","title":"Start At"},"end_at":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"End of the time range as an ISO 8601 date-time with a UTC offset, for example 2026-02-01T00:00:00Z.","title":"End At"}},"required":["owner","repository"],"title":"get_queue_size_statsArguments","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_queue_failure_rate":{"post":{"operationId":"get_queue_failure_rate","summary":"Show the merge queue failure rate over time, grouped by base branch and queue. Use for \"What is the failure rate of the ","description":"Show the merge queue failure rate over time, grouped by base branch and queue. Use for \"What is the failure rate of the Mergify queue of acme/web\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"GitHub owner (user or organization login) of the repository, for example 'acme'.","maxLength":100,"title":"Owner","type":"string"},"repository":{"description":"Repository name without the owner, for example 'web'.","maxLength":100,"title":"Repository","type":"string"},"base_ref":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only pull requests targeting this base branch.","title":"Base Ref"},"queue_name":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only this merge queue, as named in the Mergify configuration.","title":"Queue Name"},"start_at":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Start of the time range as an ISO 8601 date-time with a UTC offset, for example 2026-01-01T00:00:00Z.","title":"Start At"},"end_at":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"End of the time range as an ISO 8601 date-time with a UTC offset, for example 2026-02-01T00:00:00Z.","title":"End At"}},"required":["owner","repository"],"title":"get_queue_failure_rateArguments","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/search_ci_tests":{"post":{"operationId":"search_ci_tests","summary":"Search the CI tests Mergify tracks in a repository with flakiness metrics, filtered by name (globs allowed), pipeline, j","description":"Search the CI tests Mergify tracks in a repository with flakiness metrics, filtered by name (globs allowed), pipeline, job or quarantine state. Returns the first page only. Use for \"Which tests in acme/web are flaky according to Mergify\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"GitHub owner (user or organization login) of the repository, for example 'acme'.","maxLength":100,"title":"Owner","type":"string"},"repository":{"description":"Repository name without the owner, for example 'web'.","maxLength":100,"title":"Repository","type":"string"},"test_name":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Test name filter; glob patterns such as 'test_login*' are accepted.","title":"Test Name"},"pipeline_name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only tests of this pipeline.","title":"Pipeline Name"},"job_name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only tests of this job.","title":"Job Name"},"health_status":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Only tests with this health status, for example healthy, flaky or broken.","title":"Health Status"},"is_quarantined":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for only quarantined tests, false for only non-quarantined ones.","title":"Is Quarantined"},"sort":{"anyOf":[{"enum":["executions_count","test_name","pipeline_name","job_name","health_status","failed_executions_impact","failed_executions_ratio"],"type":"string"},{"type":"null"}],"default":"test_name","description":"Sort field.","title":"Sort"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"asc","description":"Sort direction.","title":"Direction"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Tests per page (1 to 100).","title":"Per Page"}},"required":["owner","repository"],"title":"search_ci_testsArguments","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_ci_test":{"post":{"operationId":"get_ci_test","summary":"Get one CI test by ID: health status, success, failure and flakiness ratios, first and last failure, framework and file ","description":"Get one CI test by ID: health status, success, failure and flakiness ratios, first and last failure, framework and file path. Use for \"How flaky is test t1 in acme/web\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"GitHub owner (user or organization login) of the repository, for example 'acme'.","maxLength":100,"title":"Owner","type":"string"},"repository":{"description":"Repository name without the owner, for example 'web'.","maxLength":100,"title":"Repository","type":"string"},"test_id":{"description":"Test ID as returned by search_ci_tests.","maxLength":200,"title":"Test Id","type":"string"},"pipeline_name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only read executions in this pipeline.","title":"Pipeline Name"},"job_name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only read executions in this job.","title":"Job Name"}},"required":["owner","repository","test_id"],"title":"get_ci_testArguments","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_quarantined_tests":{"post":{"operationId":"list_quarantined_tests","summary":"List the CI tests quarantined in a repository with reason, scope (branch, pipeline, job), source and health. Returns the","description":"List the CI tests quarantined in a repository with reason, scope (branch, pipeline, job), source and health. Returns the first page only. Use for \"Which tests are quarantined in acme/web\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"GitHub owner (user or organization login) of the repository, for example 'acme'.","maxLength":100,"title":"Owner","type":"string"},"repository":{"description":"Repository name without the owner, for example 'web'.","maxLength":100,"title":"Repository","type":"string"},"test_name":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Only quarantines of this test name.","title":"Test Name"},"branch_name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only quarantines that apply to this branch.","title":"Branch Name"},"pipeline_name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only quarantines that apply to this pipeline.","title":"Pipeline Name"},"job_name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only quarantines that apply to this job.","title":"Job Name"},"sort":{"anyOf":[{"enum":["created_at","test_name","pipeline_name","job_name","health_status","source"],"type":"string"},{"type":"null"}],"default":"created_at","description":"Sort field.","title":"Sort"},"direction":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"asc","description":"Sort direction.","title":"Direction"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Quarantines per page (1 to 100).","title":"Per Page"}},"required":["owner","repository"],"title":"list_quarantined_testsArguments","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}}}}