{"openapi":"3.1.0","info":{"title":"Trunk Merge Queue (BYOK) API","version":"0.1.0","description":"Trunk Merge Queue (BYOK) lets an AI assistant read your own Trunk Merge Queue data through the Trunk Merge Queue API with a key you supply (Trunk organization API token). Read-only: 5 tools (get_queue, list_queue_pull_requests, get_submitted_pull_request, list_testing_results, get_testing_details). The BYOK key travels with each request, is used for that one call only and is never stored, logged...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-trunk-merge-queue.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-trunk-merge-queue/docs"},"termsOfService":"https://connectorbay.com/byok-trunk-merge-queue/terms"},"servers":[{"url":"https://byok-trunk-merge-queue.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-trunk-merge-queue/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_queue":{"post":{"operationId":"get_queue","summary":"Get one merge queue: state (running, paused, draining), mode, concurrency, batching and merge settings, required statuse","description":"Get one merge queue: state (running, paused, draining), mode, concurrency, batching and merge settings, required statuses, and the pull requests currently enqueued. Use for \"What is the state of the Trunk merge queue for main\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_owner":{"description":"Repository owner (user or organization).","maxLength":100,"title":"Repo Owner","type":"string"},"repo_name":{"description":"Repository name.","maxLength":100,"title":"Repo Name","type":"string"},"target_branch":{"description":"Target branch the queue merges into, for example main.","maxLength":200,"title":"Target Branch","type":"string"},"repo_host":{"anyOf":[{"const":"github.com","type":"string"},{"type":"null"}],"default":"github.com","description":"Git host of the repository.","title":"Repo Host"}},"required":["repo_owner","repo_name","target_branch"],"title":"get_queueArguments","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_queue_pull_requests":{"post":{"operationId":"list_queue_pull_requests","summary":"List pull requests in a merge queue, optionally by state and time range, with state, priority and PR title, sha and auth","description":"List pull requests in a merge queue, optionally by state and time range, with state, priority and PR title, sha and author. Use for \"Which pull requests are in the Trunk merge queue\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_owner":{"description":"Repository owner (user or organization).","maxLength":100,"title":"Repo Owner","type":"string"},"repo_name":{"description":"Repository name.","maxLength":100,"title":"Repo Name","type":"string"},"target_branch":{"description":"Target branch the queue merges into, for example main.","maxLength":200,"title":"Target Branch","type":"string"},"repo_host":{"anyOf":[{"const":"github.com","type":"string"},{"type":"null"}],"default":"github.com","description":"Git host of the repository.","title":"Repo Host"},"state":{"anyOf":[{"enum":["not_ready","pending","testing","tests_passed","merged","failed","cancelled","pending_failure"],"type":"string"},{"type":"null"}],"default":null,"description":"Only pull requests in this queue state.","title":"State"},"since":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only items that concluded at or after this ISO 8601 time.","title":"Since"},"until":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only items that concluded before this ISO 8601 time.","title":"Until"},"take":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"Page size (1 to 100).","title":"Take"},"cursor":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from a previous nextCursor.","title":"Cursor"}},"required":["repo_owner","repo_name","target_branch"],"title":"list_queue_pull_requestsArguments","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_submitted_pull_request":{"post":{"operationId":"get_submitted_pull_request","summary":"Get one submitted pull request in a merge queue: state, readiness, and optionally the state timeline with test run detai","description":"Get one submitted pull request in a merge queue: state, readiness, and optionally the state timeline with test run details. Use for \"What is the status of PR 482 in the Trunk merge queue\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_owner":{"description":"Repository owner (user or organization).","maxLength":100,"title":"Repo Owner","type":"string"},"repo_name":{"description":"Repository name.","maxLength":100,"title":"Repo Name","type":"string"},"target_branch":{"description":"Target branch the queue merges into, for example main.","maxLength":200,"title":"Target Branch","type":"string"},"pr_number":{"description":"Pull request number.","minimum":1,"title":"Pr Number","type":"integer"},"repo_host":{"anyOf":[{"const":"github.com","type":"string"},{"type":"null"}],"default":"github.com","description":"Git host of the repository.","title":"Repo Host"},"include_timeline":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Include the state timeline.","title":"Include Timeline"}},"required":["repo_owner","repo_name","target_branch","pr_number"],"title":"get_submitted_pull_requestArguments","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_testing_results":{"post":{"operationId":"list_testing_results","summary":"List completed merge queue testing for a time range: PR number, outcome, duration and whether it entered bisection. Use ","description":"List completed merge queue testing for a time range: PR number, outcome, duration and whether it entered bisection. Use for \"How did the Trunk merge queue tests go this week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_owner":{"description":"Repository owner (user or organization).","maxLength":100,"title":"Repo Owner","type":"string"},"repo_name":{"description":"Repository name.","maxLength":100,"title":"Repo Name","type":"string"},"target_branch":{"description":"Target branch the queue merges into, for example main.","maxLength":200,"title":"Target Branch","type":"string"},"since":{"description":"Start of the time range, ISO 8601.","maxLength":40,"title":"Since","type":"string"},"repo_host":{"anyOf":[{"const":"github.com","type":"string"},{"type":"null"}],"default":"github.com","description":"Git host of the repository.","title":"Repo Host"},"until":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"End of the time range, ISO 8601.","title":"Until"},"take":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"Page size (1 to 100).","title":"Take"},"offset":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Rows to skip.","title":"Offset"}},"required":["repo_owner","repo_name","target_branch","since"],"title":"list_testing_resultsArguments","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_testing_details":{"post":{"operationId":"get_testing_details","summary":"Get details of a merge queue test run: test branch and sha, status, required status checks and the pull requests tested ","description":"Get details of a merge queue test run: test branch and sha, status, required status checks and the pull requests tested together. Use for \"What is the Trunk merge queue testing for run tr_1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"repo_owner":{"description":"Repository owner (user or organization).","maxLength":100,"title":"Repo Owner","type":"string"},"repo_name":{"description":"Repository name.","maxLength":100,"title":"Repo Name","type":"string"},"target_branch":{"description":"Target branch the queue merges into, for example main.","maxLength":200,"title":"Target Branch","type":"string"},"test_run_id":{"description":"Test run id from a pull request timeline.","maxLength":120,"title":"Test Run Id","type":"string"},"repo_host":{"anyOf":[{"const":"github.com","type":"string"},{"type":"null"}],"default":"github.com","description":"Git host of the repository.","title":"Repo Host"}},"required":["repo_owner","repo_name","target_branch","test_run_id"],"title":"get_testing_detailsArguments","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}}}}